Skip to main content
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:
pflow settings show

Structure

{
  "version": "1.0.0",
  "registry": {
    "nodes": {
      "allow": ["*"],
      "deny": ["pflow.nodes.git.*", "pflow.nodes.github.*"]
    },
    "include_test_nodes": false
  },
  "runtime": {
    "template_resolution_mode": "strict"
  },
  "env": {}
}

Fields

FieldDefaultDescription
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_nodesfalseShow internal test nodes
runtime.template_resolution_mode"strict""strict" or "permissive"
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

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):
  1. CLI parameters (--param key=value)
  2. Settings file (~/.pflow/settings.jsonenv)
  3. System environment variables

pflow configuration variables

VariableDefaultDescription
PFLOW_INCLUDE_TEST_NODESfalseShow test nodes in registry
PFLOW_TEMPLATE_RESOLUTION_MODEstrictstrict or permissive
PFLOW_SHELL_STRICTfalseBlock dangerous shell commands

Trace configuration

Control trace file verbosity:
VariableDefaultDescription
PFLOW_TRACE_PROMPT_MAX50000Max prompt length in traces
PFLOW_TRACE_RESPONSE_MAX20000Max response length in traces
PFLOW_TRACE_STORE_MAX10000Max shared store value length
PFLOW_TRACE_DICT_MAX50000Max dict size in traces
PFLOW_TRACE_LLM_CALLS_MAX100Max LLM calls to track

Node filtering

Control which nodes are available using allow/deny patterns.

Pattern syntax

pflow uses glob-style patterns (fnmatch):
PatternMatches
*Everything
pflow.nodes.file.*All file nodes
mcp-github-*All GitHub MCP tools
shellExact match only

Evaluation order

  1. Test nodes - Filtered first based on include_test_nodes
  2. Deny patterns - If matched, node is excluded
  3. Allow patterns - If matched, node is included
  4. 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.*"
Git and GitHub nodes are experimental and not feature complete. They require the git and gh CLI tools to be installed.
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

PathSafe to DeleteNotes
registry.jsonYesRegenerates on next pflow registry scan
debug/YesDebug traces only, can grow large
cache/YesExecution cache, regenerates
settings.jsonCautionContains API keys, reverts to defaults
mcp-servers.jsonCautionRemoves MCP server configurations
workflows/NoUser-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:
  1. System environment variables
  2. pflow settings (pflow settings set-env)