CLI Commands Reference
Complete reference for the teamctx CLI (v0.5.1). Every command, flag, and option documented.
Overview
The teamctx CLI is the primary interface for TeamContext. It handles setup, team queries, handoffs, plans, and runs the MCP server for AI tool integration.
Most commands support --json for machine-readable output.
teamctx init
Configure your API key and connect to your TeamContext team. Run this once before using any other command.
Interactive prompts:
- API URL — Default:
https://api.teamcontext.ai - API Key — Your key from Settings → API Keys (masked input)
Validates the key via /auth/me, then saves config to ~/.teamctx/config.json.
teamctx setup
Install hooks for your AI coding tools. Auto-detects installed tools and prompts for selection.
Options:
--claude-code— Install Claude Code hooks only--codex-cli— Install Codex CLI hooks only--gemini-cli— Install Gemini CLI hooks only--all— Install all detected tools--git-hook— Install git post-commit hook only
Example:
teamctx doctor
Diagnose setup issues. Checks Node version, config, API connectivity, git hooks, AI tools, and MCP server configuration.
Outputs a table showing each AI tool's detection and hook status, with remedial suggestions for any failures.
teamctx status
Show your team members' current status — who's online, what branch they're on, and what they're working on.
Output columns: Name • Branch • Working On • Last Active • Online Status
teamctx log
Show recent team activity across all coding sessions.
Options:
--author <name>— Filter by team member name--since <duration>— Time filter (e.g.2h,1d,30m)--path <glob>— Filter by file path pattern--limit <n>— Number of results (default: 20)--source <source>— Filter by source (git-hook,claude-code-cli,codex-cli,gemini-cli)--json— Output as JSON
Example:
teamctx who
Show who's currently working, with optional file details.
Options:
--files— Show files each member touched today, grouped by directory--json— Output as JSON
Output columns: Name • Branch • Working On • Project • Turns Today • Last Activity
teamctx catchup
Show the latest AI-generated daily or weekly summary of your team's activity.
Great for morning check-ins — see what your team accomplished while you were away.
teamctx conflicts
Check if anyone on your team is working on overlapping files or systems.
Shows active conflicts with the members involved and overlapping files.
teamctx context
Show a comprehensive snapshot of your team's current state. Combines multiple views into one output.
Includes:
- Who's currently working (members, branches, activity)
- Recent technical decisions (5 most recent)
- Active conflicts (overlapping files)
- Open handoffs (pending work)
- Latest team summary
teamctx search
Full-text search across all captured turns and decisions.
Options:
--type <type>— Filter by type:all,turns,decisions(default:all)--limit <n>— Number of results (default: 20)--json— Output as JSON
Example:
teamctx mcp-serve
Start the Model Context Protocol server in stdio mode. This is what AI coding tools connect to for accessing TeamContext tools.
You typically don't run this manually — it's started automatically by your AI tool via the .mcp.json configuration. Exposes 35+ tools for team queries, plans, handoffs, conflicts, and more.
teamctx uninstall
Remove all TeamContext hooks, configuration files, and instruction files from your projects.
Removes:
- Git hooks from all detected repos
- AI tool hooks (Claude Code, Codex CLI, Gemini CLI)
.mcp.jsonconfiguration- Instruction files (
CLAUDE.md,AGENTS.md,GEMINI.md)
Prompts to optionally delete the ~/.teamctx/ directory.
Handoff Commands
Create and manage work handoffs for seamless context transfer between team members.
teamctx handoff list
List handoffs. Filter by status: active, picked_up, completed.
teamctx handoff create
Interactive command. Prompts for:
- Title — What's being handed off
- What's done — Completed work description
- What's left — Remaining work
- Gotchas — Warnings or tips (optional)
- How to continue — Instructions for the next person (optional)
teamctx handoff view
View full details of a specific handoff.
teamctx handoff pickup
Pick up a handoff to indicate you're starting work on it.
teamctx handoff complete
Mark a handoff as completed. Sets progress to 100%.
Plan Commands
Create, manage, and track AI-generated implementation plans with tasks, risks, and verification steps.
teamctx plan list
List plans. Status: draft, reviewing, approved, in_progress, completed, abandoned. Shows progress bar, author, and description.
teamctx plan create
Interactive command. Prompts for title, description (opens editor), and optional requirements. Creates an AI-generated plan with tasks, gap analysis, risks, and verification steps.
teamctx plan view
View the full plan with tasks, risks, verification steps, gap analysis, and overall progress.
teamctx plan approve
Approve a plan for execution. Changes status from reviewing to approved.
teamctx plan start
Start executing a plan. Changes status to in_progress.
teamctx plan task
Update the status of a task within a plan. Automatically recalculates overall plan progress.
Status values: pending, in_progress, completed, skipped
Example:
teamctx plan export
Export a plan as a local markdown file for offline viewing or editing.
teamctx plan sync
Sync local markdown changes back to the TeamContext API. Useful after editing an exported plan file.