Skip to main content

Synopsis

progflow new <name>

Arguments

ArgumentRequiredDescription
nameYesThe name of the new flow

What it does

progflow new creates ~/.config/flow/<name>.json. If a flow with that name already exists, the command exits with code 1 without modifying the existing file. Behavior differs depending on whether stdin is a terminal.

Interactive mode

When run in a terminal, Progflow prompts you for each config field:
Creating new flow 'myproject'
Working directory (optional, press Enter to skip):
Editor command (optional, e.g. 'vim .'):
URLs to open (comma-separated, optional):
Shell (default: /bin/sh):
Environment variables (KEY=VALUE, comma-separated, optional):
All prompts are optional — press Enter to skip any field and use its default.
PromptDefaultNotes
Working directorynoneAbsolute or relative path
Editor commandnoneExample: vim ., code ., nvim .
URLs to opennoneComma-separated, e.g. http://localhost:3000,https://docs.example.com
Shell/bin/shUsed for editor spawning
Environment variablesnoneComma-separated KEY=VALUE pairs, e.g. NODE_ENV=development,PORT=3000
After answering all prompts, the config is written and Progflow confirms:
✓ flow 'myproject' created

Non-interactive mode

When stdin is not a terminal (scripted usage), Progflow creates a minimal config without prompting:
echo | progflow new myproject
# or
progflow new myproject < /dev/null
✓ flow 'myproject' created (non-interactive mode)
  Use 'progflow edit myproject' to configure
The minimal config looks like:
{
  "name": "myproject",
  "directory": null,
  "editorCmd": null,
  "urlList": null,
  "shell": "/bin/sh",
  "env": {},
  "note": ""
}
After non-interactive creation, run progflow edit myproject to open the config file in your $EDITOR and fill in the details.

Config file location

Configs are stored as JSON files in ~/.config/flow/:
~/.config/flow/
└── myproject.json

Example: full interactive session

progflow new myproject
Creating new flow 'myproject'
Working directory (optional, press Enter to skip): /home/user/projects/myproject
Editor command (optional, e.g. 'vim .'): nvim .
URLs to open (comma-separated, optional): http://localhost:3000,https://github.com/user/myproject
Shell (default: /bin/sh):
Environment variables (KEY=VALUE, comma-separated, optional): NODE_ENV=development,PORT=3000
✓ flow 'myproject' created
The resulting config file:
{
  "name": "myproject",
  "directory": "/home/user/projects/myproject",
  "editorCmd": "nvim .",
  "urlList": [
    "http://localhost:3000",
    "https://github.com/user/myproject"
  ],
  "shell": "/bin/sh",
  "env": {
    "NODE_ENV": "development",
    "PORT": "3000"
  },
  "note": ""
}

Error cases

ConditionExit codeMessage
Flow <name> already exists1Flow '<name>' already exists
Config directory cannot be created2IO error

Exit codes

CodeMeaning
0Flow created successfully
1User error — flow already exists
2IO or JSON write error

See also

Build docs developers (and LLMs) love