Skip to main content

CLI commands

Install the CLI:

pip install 10xscale-agentflow-cli

Verify:

agentflow version

agentflow init

Scaffold a new project with agentflow.json and a starter graph module.

agentflow init [OPTIONS]
OptionDefaultDescription
--path, -p.Directory to initialize files in
--force, -ffalseOverwrite existing files
--prodfalseAdd pyproject.toml and .pre-commit-config.yaml
--verbose, -vfalseEnable verbose logging
--quiet, -qfalseSuppress output except errors

Creates:

agentflow.json
graph/
__init__.py
react.py
skills/
agent-skills/
SKILL.md
references/
skill-concepts.md
agentflow.md
claude.md
codex.md
github.md

With --prod:

agentflow.json
graph/
__init__.py
react.py
skills/
agent-skills/
SKILL.md
references/
skill-concepts.md
agentflow.md
claude.md
codex.md
github.md
pyproject.toml
.pre-commit-config.yaml

Example:

# Initialize in the current directory
agentflow init

# Initialize in a specific folder
agentflow init --path ./my-agent

# Overwrite an existing project
agentflow init --force

agentflow api

Start the FastAPI server that serves your compiled graph.

agentflow api [OPTIONS]
OptionDefaultDescription
--config, -cagentflow.jsonPath to config file
--host, -H0.0.0.0Bind host (use 127.0.0.1 for localhost only)
--port, -p8000Bind port
--reload/--no-reload--reloadEnable auto-reload on file changes
--verbose, -vfalseEnable verbose logging
--quiet, -qfalseSuppress output except errors

Example:

# Start with defaults (binds to all interfaces)
agentflow api

# Start on localhost only
agentflow api --host 127.0.0.1 --port 8000

# Disable auto-reload for production
agentflow api --no-reload

# Use a different config file
agentflow api --config ./config/prod.json

agentflow play

Start the API server and open the hosted playground in a browser.

agentflow play [OPTIONS]

Accepts the same options as agentflow api. The --host and --port values are also used to build the backendUrl that is passed to the hosted playground.

Example:

agentflow play --host 127.0.0.1 --port 8000

The CLI prints the playground URL. If the browser does not open automatically, open the URL manually. The backendUrl query parameter tells the playground which local API to call.


agentflow build

Generate a Dockerfile (and optionally docker-compose.yml) for deployment.

agentflow build [OPTIONS]
OptionDefaultDescription
--output, -oDockerfileOutput Dockerfile path
--force, -ffalseOverwrite existing Dockerfile
--python-version3.13Python base image version
--port, -p8000Port to expose in the container
--docker-compose/--no-docker-compose--no-docker-composeAlso generate docker-compose.yml
--service-nameagentflow-cliService name in docker-compose.yml
--verbose, -vfalseEnable verbose logging
--quiet, -qfalseSuppress output except errors

Example:

# Minimal Dockerfile
agentflow build

# Dockerfile + docker-compose.yml
agentflow build --docker-compose --service-name my-agent

# Custom Python version
agentflow build --python-version 3.12

agentflow skills

Install bundled AgentFlow skills into project-local assistant skill directories.

agentflow skills [OPTIONS]

When --agent is omitted in an interactive terminal, the command prompts:

Which agent?
- 1. Codex
- 2. Claude
- 3. GitHub
OptionDefaultDescription
--agent, -apromptTarget agent: codex, claude, github, or menu number 1, 2, 3
--path, -p.Project directory where the skills should be installed
--force, -ffalseOverwrite the existing installed AgentFlow skill directory
--allfalseInstall skills for every supported agent
--list, -lfalseList supported agents and exit
--verbose, -vfalseEnable verbose logging
--quiet, -qfalseSuppress output except errors

Install locations:

AgentInstalled files
Codex.agents/skills/agentflow/
Claude.claude/skills/agentflow/
GitHub.github/instructions/agentflow.instructions.md and .github/skills/agentflow/

Example:

# Prompt for target agent
agentflow skills

# Install for Codex
agentflow skills --agent codex

# Install for Claude in another project directory
agentflow skills --agent claude --path ./my-agent

# Install for every supported assistant
agentflow skills --all

# List supported assistants
agentflow skills --list

# Overwrite an existing install
agentflow skills --agent github --force

agentflow version

Print the CLI and library versions.

agentflow version [--verbose]

Global options

All commands accept --help (-h) for usage information:

agentflow --help
agentflow api --help
agentflow init --help