Skip to content

CLI Reference

Use this section when you know what you want to do and need the current command shape. If you are new to mdkg, start with Install and Quickstart first.

Uppercase placeholders such as WORK_ID, GOAL_ID, and TASK_ID are examples. Replace them with concrete ids from your repo before running the command.

JobStart withThen use
Initialize a repomdkg init --agentmdkg index, mdkg validate
Find workmdkg goal nextmdkg show WORK_ID, mdkg pack WORK_ID
Record progressmdkg task start TASK_IDmdkg task done TASK_ID --checkpoint "Done"
Share contextmdkg pack WORK_ID --pack-profile concisemdkg handoff create WORK_ID
Diagnose healthmdkg statusmdkg doctor --strict --json, mdkg fix plan --json
Coordinate reposmdkg subgraph audit --jsonmdkg bundle, mdkg subgraph sync

First-run setup:

Terminal window
mdkg init --agent
mdkg index
mdkg status
mdkg validate

Discovery and routing:

Terminal window
mdkg search "query"
mdkg show WORK_ID
mdkg goal current
mdkg goal next GOAL_ID

Lifecycle and evidence:

Terminal window
mdkg goal claim GOAL_ID WORK_ID
mdkg task start TASK_ID
mdkg task done TASK_ID --checkpoint "Meaningful milestone"
mdkg checkpoint new "Review proof" --kind test-proof

Context transfer:

Terminal window
mdkg pack WORK_ID --pack-profile concise
mdkg handoff create WORK_ID

Validation and repair planning:

Terminal window
mdkg doctor --strict --json
mdkg fix plan --json
mdkg format --headings --dry-run --summary --json --limit 20

Advanced alpha surfaces:

Terminal window
mdkg db queue contract --json
mdkg mcp serve --stdio
mdkg subgraph audit --json

Use the complete CLI reference when the common groups above do not cover the command you need:

Integrations, docs tooling, and compatibility checks can use the machine-readable metadata behind the reference:

Most readers should use the common groups or complete command list. The command contract is not the first-stop user guide.