Skip to content

Command line

The controller package has a command line for the things done outside a running controller: the OpenAPI document, accounts, importing and exporting definitions, and generating the generated docs pages. Run it from the repository root:

uv run --no-sync python -m kapelle_controller.console <command> [options]
Command What it does
openapi Prints the OpenAPI document of the routes the app serves; --output FILE writes it, --check FILE fails unless the file equals it (just console-openapi writes console/api/openapi.yaml).
admin create, admin reset-password Creates a Console admin or resets a password on the control-plane database; the password is asked for twice or read with --password-stdin, never an argument (just console-admin).
import Imports roles, team templates and credential-gateway policies from roles/, teams/templates/ and credgw/policy/roles/; a dry run unless --apply, --force turns conflicts into new versions, and --only KIND:NAME (repeatable, kinds as the report prints them: team-template, environment, agent, destination, mcp-server, skill) writes only the named items and reports the rest as skipped.
integrations-import Imports the KAPELLE_* integration variables of the environment into the store; a dry run unless --apply (just console-integrations-import).
export Writes the store's agents and templates as repository files (just console-export); --check lists differences.
tools Regenerates the worker tool catalogue (tools.json); --check fails when it is out of date (just console-tools).
onboarding Prints the onboarding prompt for a role (--role), or the snippet with --snippet, without a token.
agents-page, routes-page, limits-page, playbooks Write the generated docs pages (agents, routes, limits, playbooks); --write FILE writes, --check FILE compares with the generator where offered. The docs build runs them.

DATABASE_URL is the control-plane database for every command that needs it (--database-url overrides it). python -m kapelle_controller.console <command> --help lists the options of one command. The just recipes wrap the common ones; just --list shows all of them.

Other command-line tools in the repository: vmdctl (the host daemon's control and checks), just doctor (host prerequisites), just spend (spend report by model, agent key and team) and just e2e (the end-to-end suite). The dev environment documents them.