pflow stores configuration in ~/.pflow/. This page covers the settings file structure, environment variables, node filtering, and file locations.
Settings file
pflow stores user configuration in ~/.pflow/settings.json. View current settings with:
Structure
{
"version": "1.0.0",
"registry": {
"nodes": {
"allow": ["*"],
"deny": ["pflow.nodes.git.*", "pflow.nodes.github.*"]
},
"include_test_nodes": false,
"output_mode": "smart"
},
"runtime": {
"template_resolution_mode": "strict"
},
"llm": {
"default_model": null,
"discovery_model": null,
"filtering_model": null
},
"env": {}
}
Fields
| Field | Default | Description |
|---|
registry.nodes.allow | ["*"] | Patterns for nodes to include |
registry.nodes.deny | ["pflow.nodes.git.*", "pflow.nodes.github.*"] | Patterns for nodes to exclude |
registry.include_test_nodes | false | Show internal test nodes |
registry.output_mode | "smart" | Output display mode for registry run: "smart", "structure", or "full" |
runtime.template_resolution_mode | "strict" | "strict" or "permissive" |
llm.default_model | null | Default model for all pflow LLM usage |
llm.discovery_model | null | Model for discovery commands (overrides default) |
llm.filtering_model | null | Model for smart filtering (overrides default) |
env | {} | API keys and environment variables |
Commands
# Initialize settings file
pflow settings init
# Show current settings
pflow settings show
# Reset to defaults
pflow settings reset
LLM model configuration
pflow uses LLMs for discovery features, smart filtering, and the LLM node in workflows. Set up an API key, and pflow auto-detects which model to use.
API key setup
# Set an API key (any llm-supported provider works)
pflow settings set-env OPENAI_API_KEY "sk-..."
pflow auto-detects available providers based on configured API keys.
Override the model (optional)
To use a specific model instead of auto-detection:
# Set a default model for all pflow features
pflow settings llm set-default gpt-5.2
# Or configure specific features
pflow settings llm set-discovery anthropic/claude-haiku-4-5
pflow settings llm set-filtering gemini-3-flash-preview
# View current configuration
pflow settings llm show
Resolution order
pflow auto-detects a model based on your configured API keys. To override this or see the full resolution order and default models, see LLM model settings.
Environment variables
API keys
Store API keys in the settings file for security (automatically chmod 600):
pflow settings set-env ANTHROPIC_API_KEY "sk-ant-..."
pflow settings set-env OPENAI_API_KEY "sk-proj-..."
API keys stored via pflow settings set-env are used automatically for workflow inputs and discovery features. Your agent can’t set these for security reasons.
Precedence order (highest to lowest):
- CLI parameters (
--param key=value)
- Settings file (
~/.pflow/settings.json → env)
- System environment variables
pflow configuration variables
| Variable | Default | Description |
|---|
PFLOW_INCLUDE_TEST_NODES | false | Show test nodes in registry |
PFLOW_TEMPLATE_RESOLUTION_MODE | strict | strict or permissive |
PFLOW_SHELL_STRICT | false | Block dangerous shell commands |
Trace configuration
Control trace file verbosity:
| Variable | Default | Description |
|---|
PFLOW_TRACE_PROMPT_MAX | 50000 | Max prompt length in traces |
PFLOW_TRACE_RESPONSE_MAX | 20000 | Max response length in traces |
PFLOW_TRACE_STORE_MAX | 10000 | Max shared store value length |
PFLOW_TRACE_DICT_MAX | 50000 | Max dict size in traces |
PFLOW_TRACE_LLM_CALLS_MAX | 100 | Max LLM calls to track |
Node filtering
Control which nodes are available using allow/deny patterns.
Pattern syntax
pflow uses glob-style patterns (fnmatch):
| Pattern | Matches |
|---|
* | Everything |
pflow.nodes.file.* | All file nodes |
mcp-github-* | All GitHub MCP tools |
shell | Exact match only |
Evaluation order
- Test nodes - Filtered first based on
include_test_nodes
- Deny patterns - If matched, node is excluded
- Allow patterns - If matched, node is included
- Default - Included only if
* is in allow list
Deny patterns take precedence over allow patterns. If a node matches both, it’s excluded.
Commands
# Allow a pattern
pflow settings allow "pflow.nodes.git.*"
# Deny a pattern
pflow settings deny "shell"
# Remove a pattern
pflow settings remove "shell" --deny
# Check if a node would be included
pflow settings check read-file
# Verify filtering took effect
pflow registry list # See all available nodes
pflow registry list github # Filter to specific nodes
Examples
Enable git/github nodes (denied by default):
pflow settings allow "pflow.nodes.git.*"
pflow settings allow "pflow.nodes.github.*"
Block shell access:
pflow settings deny "shell"
Allow only specific nodes:
# First, remove the wildcard
pflow settings remove "*" --allow
# Then add specific patterns
pflow settings allow "pflow.nodes.file.*"
pflow settings allow "llm"
pflow settings allow "http"
File locations
pflow stores all data in ~/.pflow/:
~/.pflow/
├── settings.json # User settings + API keys
├── mcp-servers.json # MCP server configurations
├── registry.json # Node registry cache
├── workflows/ # Saved workflows
├── debug/ # Trace files
└── cache/ # Execution cache
What’s safe to delete
| Path | Safe to Delete | Notes |
|---|
registry.json | Yes | Regenerates on next pflow registry scan |
debug/ | Yes | Debug traces only, can grow large |
cache/ | Yes | Execution cache, regenerates |
settings.json | Caution | Contains API keys, reverts to defaults |
mcp-servers.json | Caution | Removes MCP server configurations |
workflows/ | No | User-created workflows |
MCP server configuration
MCP servers are configured in ~/.pflow/mcp-servers.json. See Adding MCP servers for details.
The file uses the standard MCP configuration format:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@github/mcp-server"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
Environment variables in the config (${VAR}) are resolved from:
- System environment variables
- pflow settings (
pflow settings set-env)