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.
Common command groups
Section titled “Common command groups”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.
Choose by job
Section titled “Choose by job”| Job | Start with | Then use |
|---|---|---|
| Initialize a repo | mdkg init --agent | mdkg index, mdkg validate |
| Find work | mdkg goal next | mdkg show WORK_ID, mdkg pack WORK_ID |
| Record progress | mdkg task start TASK_ID | mdkg task done TASK_ID --checkpoint "Done" |
| Share context | mdkg pack WORK_ID --pack-profile concise | mdkg handoff create WORK_ID |
| Diagnose health | mdkg status | mdkg doctor --strict --json, mdkg fix plan --json |
| Coordinate repos | mdkg subgraph audit --json | mdkg bundle, mdkg subgraph sync |
First-run setup:
mdkg init --agentmdkg indexmdkg statusmdkg validateDiscovery and routing:
mdkg search "query"mdkg show WORK_IDmdkg goal currentmdkg goal next GOAL_IDLifecycle and evidence:
mdkg goal claim GOAL_ID WORK_IDmdkg task start TASK_IDmdkg task done TASK_ID --checkpoint "Meaningful milestone"mdkg checkpoint new "Review proof" --kind test-proofContext transfer:
mdkg pack WORK_ID --pack-profile concisemdkg handoff create WORK_IDValidation and repair planning:
mdkg doctor --strict --jsonmdkg fix plan --jsonmdkg format --headings --dry-run --summary --json --limit 20Advanced alpha surfaces:
mdkg db queue contract --jsonmdkg mcp serve --stdiomdkg subgraph audit --jsonComplete command list
Section titled “Complete command list”Use the complete CLI reference when the common groups above do not cover the command you need:
Integration metadata
Section titled “Integration metadata”Integrations, docs tooling, and compatibility checks can use the machine-readable metadata behind the reference:
- Command Contract
dist/command-contract.jsonCLI_COMMAND_MATRIX.md
Most readers should use the common groups or complete command list. The command contract is not the first-stop user guide.