Documentation
Dragon CLI & MCP
Command-line interface for working with DevDocs tasks that can also be used as an MCP server
GitHub Packages: @devdocsorg/dragon-cli
Dragon lets you work with DevDocs tasks directly from the command line. Create tasks, review changes, and pull task sessions to continue locally.
Requirements
- macOS, Linux, or WSL (Windows Subsystem for Linux)
- Node.js 18+ or newer
- npm, pnpm, or yarn (bun is not currently supported)
Installation
Dragon is published through the DevDocs GitHub Packages registry. Configure the DevDocs scope once with your GitHub Packages token while leaving the default npm registry available for Dragon's public dependencies:
npm config set @devdocsorg:registry https://npm.pkg.github.com
npm login --scope=@devdocsorg --registry=https://npm.pkg.github.com# Using npm
npm install -g @devdocsorg/dragon-cli
# Using pnpm
pnpm add -g @devdocsorg/dragon-cli
# Using yarn
yarn global add @devdocsorg/dragon-cliAuthentication
dragon authNever pass an API key as a command argument. Command arguments can be retained
in shell history or exposed through process inspection. Use dragon auth and
complete the browser flow or its masked manual prompt. Dragon source also
stores the settings directory and credential file with owner-only permissions;
these protections are pending the next package release, while Dragon 0.1.8
remains the current GitHub Packages release.
Run authentication from an interactive terminal. A non-interactive invocation exits before opening the browser or rendering a prompt.
This will:
~/.dragon/config.jsonYou can override the default settings directory by setting the
DRAGON_SETTINGS_DIR environment variable before running the CLI:
export DRAGON_SETTINGS_DIR=~/.config/dragon
dragon authCommands
dragon create
Create a new task in DevDocs with a message.
The CLI has a daily limit of 50 tasks per user. This limit resets every 24 hours.
# Create a task in the current repository and branch
dragon create "Fix the login bug"
# Specify a different repository
dragon create "Add new feature" --repo owner/repo
# Use a specific base branch
dragon create "Update documentation" --branch develop
# Use existing branch without creating a new one
dragon create "Quick fix" --no-new-branch
# Use a specific AI model
dragon create "Refactor code" --model opus
# Create a task in plan mode (for complex tasks requiring planning)
dragon create "Build new authentication system" --mode plan --model sonnetOptions
-r, --repo <repo>: GitHub repository (default: current repository)-b, --branch <branch>: Base branch name (default: current branch, falls back to main)--no-new-branch: Don't create a new branch (default: creates new branch)-M, --mode <mode>: Whether to create tasks inplanmode (require approval before making changes) orexecutemode. Only available with the Claude Code agent (default: execute)-m, --model <model>: AI model to use (default: the DevDocs account default, currently Codex Spark)
Available models:
An unsupported model value exits before Dragon creates a task.
Plan mode requires --model sonnet, --model haiku, or --model opus.
Omitting --model uses the DevDocs account default, currently Codex Spark,
which is incompatible with plan mode and is rejected.
sonnethaikuopusGPT-5.5:gpt-5.5,gpt-5.5-mediumGPT-5.4:gpt-5.4,gpt-5.4-medium,gpt-5.4-miniCodex Spark:gpt-5.3-codex-sparkgpt-5.2family:gpt-5.2,gpt-5.2-medium,gpt-5.2-low,gpt-5.2-high,gpt-5.2-xhighGPT-5.2 Codexvia thegpt-5.2-codexfamily:gpt-5.2-codex,gpt-5.2-codex-low,gpt-5.2-codex-medium,gpt-5.2-codex-high,gpt-5.2-codex-xhighgpt-5.1family:gpt-5.1,gpt-5.1-medium,gpt-5.1-low,gpt-5.1-highCodex Maxvia thegpt-5.1-codex-maxfamily:gpt-5.1-codex-max,gpt-5.1-codex-max-medium,gpt-5.1-codex-max-low,gpt-5.1-codex-max-high,gpt-5.1-codex-max-xhighGPT-5.1 Codexvia thegpt-5.1-codexfamily:gpt-5.1-codex,gpt-5.1-codex-medium,gpt-5.1-codex-low,gpt-5.1-codex-highgpt-5family:gpt-5,gpt-5-medium,gpt-5-low,gpt-5-highGPT-5 Codexvia thegpt-5-codexfamily:gpt-5-codex,gpt-5-codex-medium,gpt-5-codex-low,gpt-5-codex-highgemini-3-progemini-2.5-proopencode/grok-code(orgrok-code)opencode/qwen3-coder(orqwen3-coder)opencode/kimi-k2(orkimi-k2)opencode/glm-4.6(orglm-4.6)opencode/gemini-2.5-proopencode/gemini-3-proopencode-oai/gpt-5(oropencode/gpt-5)opencode-oai/gpt-5-codex(oropencode/gpt-5-codex)opencode-ant/sonnet(oropencode/sonnet)amp
dragon pull
Pull tasks from DevDocs to your local machine:
# Interactive mode - select from recent tasks
dragon pull
# Pull a specific task by ID
dragon pull <taskId>
# Pull a Claude Code task and launch a local continuation
dragon pull <taskId> --resumeWhen Dragon runs without an interactive terminal, pass the task ID explicitly:
dragon pull <taskId>.
Run a pull from a checkout of the task's GitHub repository. For a task with a
branch, Dragon source compares the task repository with the current checkout's
origin before it fetches, checks out, pulls, or writes session data. If the
repositories do not match or either identity cannot be verified, Dragon exits
with correct-checkout guidance. This guard is pending the next package release;
Dragon 0.1.8 remains the current GitHub Packages release.
Getting the task ID:
You can find the task ID at the end of the URL when viewing a task in
DevDocs. For example, in https://terragon.devdocs.ai/task/abc123-def456, the
task ID is abc123-def456.
Options
-r, --resume: Launch Claude Code after pulling a Claude Code task
--resume supports Claude Code tasks only. It syncs the task branch and
session, then launches a local Claude Code continuation. For Gemini, Amp,
OpenAI Codex, or OpenCode tasks, run dragon pull <taskId> without --resume
to sync the task without launching an agent.
Release status: Dragon 0.1.8 is the current GitHub Packages release. Use
--resume only with Claude Code tasks.
Task Display
Once selected, each task shows:
Task titleBranch nameRepositoryPR #(if available)
dragon list
List all tasks in a non-interactive format:
# List all tasks (automatically filters by current repo when inside a Git repository)
dragon listTask Display
Each task shows:
Task IDNameBranchRepositoryPR #(if available)
A count of your active tasks is returned after all of your tasks are listed.
Example Output
Task ID abc123def456
Name Fix login bug
Branch terragon/fix-login
Repository myorg/myrepo
PR Number #123
Task ID def789ghi012
Name Add dark mode
Branch terragon/dark-mode
Repository myorg/myrepo
PR Number N/A
Total: 2 tasksdragon boards
Show the Agent OS board for a GitHub repository. Dragon lists non-empty lanes, tasks, pending gates, and the test, QA, evidence, dependency, and worker status for each step.
# Detect the repository from the current checkout
dragon boards
# Read a specific repository board
dragon boards owner/repoThis command is read-only and requires Dragon authentication. If Dragon cannot
detect a repository, pass its owner/repo name explicitly.
dragon mcp
Run an MCP (Model Context Protocol) server for the git repository:
# Run MCP server for current directory
dragon mcpClaude Code Integration
You can add the Dragon MCP server to Claude Code to manage DevDocs tasks from within your coding session:
claude mcp add dragon -- dragon mcpThis integration provides Claude Code with the following capabilities:
dragon_list: List your DevDocs tasksdragon_create: Create a DevDocs taskdragon_boards: Read the task board for a repositorydragon_pull: Pull task session data to continue work
The MCP server connects Claude Code to your DevDocs tasks through natural language commands.