CLI Reference

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.

teamctx <command> [options] Commands: init Configure API key and team connection setup Install hooks for AI coding tools doctor Diagnose setup issues status Show team member status log Show recent team activity who Show who's currently working catchup Show AI-generated summary conflicts Check for overlapping work context Show full session context search <query> Search across turns and decisions mcp-serve Start the MCP server uninstall Remove all hooks and config handoff Manage work handoffs plan Manage implementation plans

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.

teamctx init

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.

teamctx setup [options]

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:

cd my-project teamctx setup --claude-code --git-hook

teamctx doctor

Diagnose setup issues. Checks Node version, config, API connectivity, git hooks, AI tools, and MCP server configuration.

teamctx doctor

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.

teamctx status [--json]

Output columns: Name • Branch • Working On • Last Active • Online Status

teamctx log

Show recent team activity across all coding sessions.

teamctx log [options]

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 log --author sarah --since 4h --limit 10

teamctx who

Show who's currently working, with optional file details.

teamctx who [--files] [--json]

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.

teamctx catchup [--json]

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.

teamctx conflicts [--json]

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.

teamctx context [--json]

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 mcp-serve

Start the Model Context Protocol server in stdio mode. This is what AI coding tools connect to for accessing TeamContext tools.

teamctx mcp-serve

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.

teamctx uninstall

Removes:

  • Git hooks from all detected repos
  • AI tool hooks (Claude Code, Codex CLI, Gemini CLI)
  • .mcp.json configuration
  • 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

teamctx handoff list [--status <status>] [--json]

List handoffs. Filter by status: active, picked_up, completed.

teamctx handoff create

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

teamctx handoff view <id> [--json]

View full details of a specific handoff.

teamctx handoff pickup

teamctx handoff pickup <id>

Pick up a handoff to indicate you're starting work on it.

teamctx handoff complete

teamctx handoff complete <id>

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

teamctx plan list [--status <status>] [--json]

List plans. Status: draft, reviewing, approved, in_progress, completed, abandoned. Shows progress bar, author, and description.

teamctx plan create

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

teamctx plan view <id> [--json]

View the full plan with tasks, risks, verification steps, gap analysis, and overall progress.

teamctx plan approve

teamctx plan approve <id>

Approve a plan for execution. Changes status from reviewing to approved.

teamctx plan start

teamctx plan start <id>

Start executing a plan. Changes status to in_progress.

teamctx plan task

teamctx plan task <planId> <taskId> --status <status>

Update the status of a task within a plan. Automatically recalculates overall plan progress.

Status values: pending, in_progress, completed, skipped

Example:

teamctx plan task abc-123 task-456 --status completed

teamctx plan export

teamctx plan export <id>

Export a plan as a local markdown file for offline viewing or editing.

teamctx plan sync

teamctx plan sync <id>

Sync local markdown changes back to the TeamContext API. Useful after editing an exported plan file.