Skip to content

Reference: `teamctl` CLI

Global flags

FlagEnvDefaultNotes
-C <path> / --root <path>TEAMCTL_ROOT(auto)Compose root (the directory holding team-compose.yaml). When unset, teamctl walks up from CWD looking for .team/team-compose.yaml.

Resolution order for the root: --root > TEAMCTL_ROOT > current context (teamctl context current) > walk up from CWD.

Set TEAMCTL_LOG=debug for verbose tracing.

Setup

CommandEffect
teamctl init [--template <name>] [--project <id>] [-y/--yes]Scaffold a fresh .team/ directory in the current repo. Interactive by default; --yes accepts defaults. See Init templates below.

Init templates

teamctl init writes a .team/ folder seeded from one of the bundled templates. Run interactively to pick from a menu, or pass --template <key>:

KeyLabelWhat you get
soloSolo teamOne project, one manager, one dev worker, Claude Code on both. Ships a sample roles README and .env.example. Default if you pass --yes without --template.
blankBlankMinimal team-compose.yaml + an empty projects/main.yaml. No agents seeded. For users who want to wire everything by hand.

--project <id> overrides the auto-derived project id (the repo directory name). Re-running init in a directory that already has a .team/ aborts to avoid clobbering work — delete or move it first.

Lifecycle

CommandEffect
teamctl validateParse the compose tree and check invariants. Exits non-zero on error.
teamctl upRender artifacts, register agents in the mailbox, start every tmux session. Auto-registers the current root as a context on first run.
teamctl downStop every tmux session. State is preserved.
teamctl reloadDiff against the last-applied snapshot; restart only changed agents.

Inspection

CommandEffect
teamctl ps (alias status)Wide table: agents, supervisor state, inbox depth.
teamctl logs <project>:<agent>Capture the tmux pane’s scrollback (last ~3000 lines).
teamctl tail <project>:<agent> [-f/--follow]Live message stream for an agent.
teamctl mail [<project>:<agent>] [--all]Inbox snapshot for an agent (or --all across the team).
teamctl inspect <project>:<agent>Full snapshot of an agent: env, mcp config, prompt, recent messages, today’s costs.

Mailbox

CommandEffect
teamctl send <project>:<agent> "<text>"Inject a message into an agent’s inbox as sender=cli.

Approvals (HITL)

CommandEffect
teamctl approvals (alias pending)Show pending HITL approval requests.
teamctl approve <id> [--note "…"]Approve a pending request.
teamctl deny <id> [--note "…"]Deny a pending request.

Bridges

CommandEffect
teamctl bridge open --from <p>:<m> --to <p>:<m> --topic "…" [--ttl <min>]Open a cross-project manager bridge. TTL defaults to 120 minutes.
teamctl bridge close <id>Close a bridge early.
teamctl bridge ls (alias list)List bridges with state (open / expired / closed).
teamctl bridge log <id>Print the transcript for a bridge.

Budget / GC

CommandEffect
teamctl budget [--project <id>]Today’s per-project activity + USD ledger.
teamctl gcDelete acked messages past TTL; mark expired approvals.

Attach / exec

CommandEffect
teamctl attach <project>:<agent> [--rw]Attach to an agent’s tmux session, read-only by default. --rw allows keyboard input and prompts before attaching.
teamctl exec <project>:<agent> -- <argv...>Run a command in the agent’s CWD with its env loaded. Use -- to pass through hyphenated arguments.
teamctl shell <project>:<agent>Open an interactive shell in the agent’s CWD with its env loaded.

Environment

CommandEffect
teamctl env [--doctor]List the environment variables referenced by compose. --doctor flags missing or empty values. Does not require a resolved root.

Contexts

A context is a named pointer to a .team/ root on this machine. Useful when you run more than one team and want to switch between them without cd-ing or passing --root every time.

CommandEffect
teamctl context lsList registered contexts.
teamctl context currentPrint the active context name.
teamctl context use <name>Set the active context.
teamctl context add <name> <path>Register a new context.
teamctl context rm <name>Remove a context.

teamctl up auto-registers the current root as a context on first run.

Rate-limit watcher

CommandEffect
teamctl rl-watch <project>:<agent> -- <runtime-command...>Wrap a runtime invocation, watching its output for rate-limit signatures. Used internally by agent-wrapper.sh; not normally invoked by hand.

See the Rate limits concept for the hook chain that fires when a rate-limit is detected.

Exit codes

CodeMeaning
0Success (or validate: no errors).
1Validation errors; unknown agent; runtime failure.
2Missing dependency (tmux, runtime binary).