CLI overview¶
What it is / when to use it¶
PenguiFlow ships a CLI to bootstrap agent projects, run the playground, and validate ToolNode presets:
penguiflow newscaffolds a project from templatespenguiflow devruns the playground (backend + UI) for a projectpenguiflow initgenerates VS Code helpers (.vscode/*)penguiflow generategenerates an agent workspace from a YAML specpenguiflow toolslists/connects ToolNode presets and can discover tool names
Use the CLI when you want a repeatable “scaffold → run → iterate” loop and you want to avoid bespoke glue code on day 1.
Non-goals / boundaries¶
- The CLI is not a deployment system; production concerns live in Deployment.
- The CLI is not a secrets manager; keep secrets in env/secret managers (never in committed YAML).
penguiflow tools connect --discoveris a connectivity check, not a production configuration workflow.
Contract surface¶
- Installed command:
penguiflow(seepenguiflow --help) - Required extras:
penguiflow new/penguiflow generaterequirejinja2(installpenguiflow[cli]orpenguiflow[dev])penguiflow toolsdiscovery requirespenguiflow[planner]
Operational defaults (recommended workflows)¶
Workflow A: scaffold a project, then run playground¶
uv run penguiflow new my-agent --template react
cd my-agent
uv sync
uv run penguiflow dev --project-root .
Workflow B: spec-first generation (declarative)¶
uv run penguiflow generate --init my-agent
cd my-agent
# edit my-agent.yaml
uv run penguiflow generate --spec my-agent.yaml
uv run penguiflow dev --project-root .
Workflow C: validate ToolNode connectivity¶
uv run penguiflow tools list
uv run penguiflow tools connect github --discover
Failure modes & recovery¶
penguiflow newfails with “Jinja2 is required”: installpenguiflow[cli](orjinja2).penguiflow devfails with missing UI assets (repo checkout): build UI assets underpenguiflow/cli/playground_ui.penguiflow toolsfails with “penguiflow[planner] is required”: installpenguiflow[planner].- Environment mismatch in playground: the playground runs in penguiflow’s Python environment, not the agent project’s venv (see
penguiflow dev).
Observability¶
penguiflow devruns a local server; use standard logs and/healthfor basic checks.- Runtime/Planner observability is described in:
- Logging
- Telemetry patterns
Security / multi-tenancy notes¶
- Don’t commit
.envfiles; treat them as secrets. - Keep tool auth in environment variables and secret managers, not in generated code.
Troubleshooting checklist¶
- Start by running:
penguiflow --helpand the subcommand--help. - If something works in CI but not locally, validate which venv is running
penguiflow(which penguiflow,python -c ...).