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,
    "output_mode": "smart"
  },
  "runtime": {
    "template_resolution_mode": "strict"
  },
  "llm": {
    "default_model": null,
    "discovery_model": null,
    "filtering_model": null
  },
  "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
registry.output_mode"smart"Output display mode for registry run: "smart", "structure", or "full"
runtime.template_resolution_mode"strict""strict" or "permissive"
llm.default_modelnullDefault model for all pflow LLM usage
llm.discovery_modelnullModel for discovery commands (overrides default)
llm.filtering_modelnullModel 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):
  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)