CLI Reference

Global Options

# Show version
oduflow --version

Running the Server

# Single-user / stdio mode (default — for local MCP clients)
oduflow
uvx oduflow

# Server / HTTP mode (for remote and multi-user deployments)
oduflow --transport http
uvx oduflow --transport http

Shared infrastructure (Docker network, PostgreSQL, team directories) is initialized automatically on startup.

stdio mode — the server communicates over stdin/stdout. The MCP client starts the process directly; no network port is needed. Ideal for local clients like Claude Desktop, Windsurf, etc.

HTTP mode — starts a persistent HTTP server on http://0.0.0.0:8000 by default. Exposes the MCP endpoint at /mcp, a Web Dashboard at /, and a REST API at /api/. Supports Bearer token authentication for MCP and Basic auth for the dashboard.

Configuration is loaded from oduflow.toml (see Installation). See Quick Start for MCP client configuration examples for both modes.

System Commands

# Destroy all shared infrastructure (requires no active environments)
oduflow destroy

Template Commands

All template commands accept --team to specify the team ID (default: 1).

# Generate a clean template from a Docker image
oduflow init-template --odoo-image odoo:17.0 --template-name myproject [--modules base,web,sale] [--force] [--team 1]

# Save a branch environment as the new template
oduflow template-from-env <branch> --template-name myproject [--team 1]

# Reload template DB from a dump file
oduflow reload-template <template_name> [--dump-path /path/to/new.dump] [--team 1]

# List all template profiles
oduflow list-templates [--team 1]

# Delete a template profile
oduflow delete-template <template_name> [--team 1]

# Import a template from a running Odoo instance
oduflow import-template <odoo_url> <master_pwd> --template-name myproject [--db-name <db>] [--team 1]

Service Commands

# List all managed services
oduflow list-services [--team 1]

Maintenance Commands

# Show orphaned databases, workspaces, and port entries (dry-run by default)
oduflow cleanup [--team 1]

# Same as above — only show what would be removed
oduflow cleanup --dry-run [--team 1]

# Actually remove orphaned resources
oduflow cleanup --force [--team 1]

The cleanup command detects and removes resources that no longer have a corresponding running or stopped container:

  • Orphan databases — PostgreSQL databases with the oduflow_ prefix that have no matching environment container
  • Orphan workspaces — workspace directories on disk that have no matching environment container
  • Orphan port entries — entries in ports.json that have no matching environment container

By default, cleanup runs in dry-run mode and only reports what would be removed. Use --force to actually delete the orphaned resources.

Systemd Service

# Install and enable systemd service
oduflow systemd-install

# Remove the systemd service
oduflow systemd-uninstall

The systemd-install command generates a unit file at /etc/systemd/system/oduflow.service, runs daemon-reload, and enables the service.

See Auto-start with systemd for the full setup guide.

Tool Introspection

# List all registered MCP tools with parameters
oduflow list [--verbose]

Direct Tool Invocation

You can invoke any registered MCP tool directly from the terminal using oduflow call, without running the server or connecting an MCP client. This is useful for scripting, debugging, and manual operations.

# List all available tools with their parameters
oduflow call

# Call a tool with positional arguments (mapped to parameters in order)
oduflow call create_environment dev "" "" https://github.com/owner/repo.git odoo:17.0
oduflow call delete_environment dev
oduflow call list_environments
oduflow call get_environment_logs main 50
oduflow call run_odoo_command dev "ls /mnt/extra-addons"
oduflow call create_service redis redis:7 6379

# Call a tool with JSON-encoded arguments
oduflow call create_environment '{"branch":"dev","repo_url":"https://github.com/owner/repo.git","odoo_image":"odoo:17.0","template_name":"myproject"}'

# Type coercion is automatic: int, bool, and float parameters are cast from strings
oduflow call get_environment_logs dev 500