Skip to main content

Initialize a Project

init sets up the Claude Code integration by default: it copies TaskGraph’s agent guide to .taskgraph/CLAUDE.md and imports it from your CLAUDE.md. Interactive runs ask, with Yes as the default; --yes sets it up without asking, and --no-claude skips it. Slash commands and session hooks come from the plugin. init writes no .mcp.json unless you pass --mcp, because the CLI and the plugin need no MCP server. --mcp needs the Claude Code integration, so it can’t be combined with --no-claude. --rules claude still works; claude is the only rule profile. Inside a Git repository, init also sets up the tasks.json merge driver, so two branches that both add or archive tasks merge without an ID clash.

Tag Management

Tags are separate, isolated task lists. All task operations work within the active tag, and most commands accept --tag=<name> to target a specific one.

Configure AI Models

TaskGraph runs on Claude Code, so no provider API keys are needed. Configuration is stored in .taskgraph/config.json; runtime state such as the current tag is in .taskgraph/state.json. Don’t edit either by hand. See Configuration.

Tab Completion

--install writes the script (~/.taskgraph-completion.zsh, ~/.taskgraph-completion.bash, or ~/.config/fish/completions/taskgraph.fish) and adds one line to ~/.zshrc or ~/.bashrc to load it. Running it again replaces the script and doesn’t add the line twice. Run it again after upgrading so new commands complete. Tab then completes commands, flags, statuses, priorities and file paths, plus task and subtask IDs and tag names read from the project’s .taskgraph/tasks/tasks.json. In zsh and fish each ID shows its title and status. Comma-separated lists work too: taskgraph show 1,<Tab> skips the IDs already listed. To manage your dotfiles yourself, print the script instead: taskgraph completion zsh > ~/.taskgraph-completion.zsh. It needs node on your PATH, which TaskGraph already requires.

Loop (Autonomous Batch Execution)

Built-in presets:
  • default - Complete tasks from TaskGraph backlog one at a time
  • test-coverage - Write meaningful tests for untested user-facing behavior
  • linting - Fix lint and type errors incrementally
  • duplication - Refactor duplicated code into shared utilities
  • entropy - Clean up code smells (long functions, deep nesting, etc.)
  • tdd - Complete tasks test-first: RED, GREEN, COMMIT for each subtask
Each iteration spawns a fresh Claude Code session, avoiding context fatigue. See Loop Command for full documentation.