Skip to content

CLI reference ​

Root usage: planq <command> [options]

All short-lived commands emit one JSON object to stdout. Exit code 0 is success, 1 is an invalid plan or operation, 2 is an argument or file access failure, and 3 is an unexpected internal error.

Commands ​

CommandPurpose
planq versionPrint product and protocol versions.
planq validateValidate one Plan entry and return structured diagnostics.
planq normalizeValidate and emit deterministic normalized IR.
planq formatWrite or check canonical Plan source formatting.
planq migrateExplicitly migrate legacy references to @id syntax.
planq initCreate a minimal valid Plan without overwriting existing paths.
planq applyValidate and atomically apply an edit-set.
planq taskQuery or safely mutate tasks.
planq milestoneQuery or safely mutate milestones.
planq connectConnect one local project to an online Workspace.
planq resourcesInitialize, format, inspect, and synchronize project resources.
planq skillInspect or install the project-scoped Agent Skill.
planq projectValidate a manifest and all declared entries.
planq devStart a persistent live read-only preview.
planq showStart an explicit one-session preview.
planq openReopen the most recent running preview session.
planq lspStart the stdio language server.

Apply ​

Usage: planq apply <file> --input <path|-> [--check]

Positionals ​

NameRequired
fileYes

Options ​

OptionRequiredValue
--inputYesedit-set JSON path or - for stdin
--checkNoPreview canonicalProposal without writing.

Exit codes ​

CodeMeaning
0Success
1Invalid plan, operation, or source baseline
2Argument or file access error

Notes ​

  • The default mode validates and atomically commits the complete edit-set.
  • Use --check when a canonical proposal must be reviewed before writing.

Examples ​

bash
planq apply project.plan --input changes.json --check
planq apply project.plan --input -

Connect ​

Usage: planq connect [--project <dir>] [--workspace <id>] [--token-stdin]

Exit codes ​

CodeMeaning
0Success
1Invalid plan, operation, or source baseline
2Argument or file access error

Notes ​

  • The default hosted origin is https://planq.dev; PLAN_ORIGIN can select another trusted deployment.
  • Connection data is written only beneath .plan/ and must not be committed.

Examples ​

bash
planq connect
planq connect --workspace workspace-id
planq connect --token-stdin < token.txt

Format ​

Usage: planq format [--check] <file> | planq format --stdin [--source-path <absolute-plan-path>]

Positionals ​

NameRequired
fileNo

Options ​

OptionRequiredValue
--checkNoCheck canonical formatting without writing.
--stdinNoRead from standard input without writing.
--source-pathNoabsolute .plan path

Exit codes ​

CodeMeaning
0Success
1Invalid plan, operation, or source baseline
2Argument or file access error

Notes ​

  • Formatting is deterministic and does not infer or repair business meaning.
  • --stdin never writes the source path.

Examples ​

bash
planq format project.plan
planq format --stdin --source-path /repo/project.plan

Init ​

Usage: planq init <file> [--id <id>] [--name <name>]

Positionals ​

NameRequired
fileYes

Options ​

OptionRequiredValue
--idNobare identifier
--nameNonon-empty string

Exit codes ​

CodeMeaning
0Success
2Argument or file access error

Notes ​

  • The file basename can provide the Plan ID only when it is already a valid bare identifier.

Examples ​

bash
planq init demo.plan
planq init project.plan --id crm --name "CRM system"

Milestone ​

Usage: planq milestone <list|get|add|update|delete> ...

SubcommandUsage
listplanq milestone list <file> [--order file] [--name <text>] [--parent <id>]
getplanq milestone get <file> <milestone-id>
addplanq milestone add <file> --id <id> --name <name> [milestone fields] [placement]
updateplanq milestone update <file> <milestone-id> [milestone fields] [placement]
deleteplanq milestone delete <file> <milestone-id>

Exit codes ​

CodeMeaning
0Success
1Invalid plan, operation, or source baseline
2Argument or file access error

Notes ​

  • Placement controls sibling order; --after remains a dependency.

Examples ​

bash
planq milestone list project.plan --order file
planq milestone get project.plan release-ready

Project ​

Usage: planq project validate [--project <dir>]

SubcommandUsage
validateplanq project validate [--project <dir>]

Exit codes ​

CodeMeaning
0Success
1Invalid plan, operation, or source baseline
2Argument or file access error

Notes ​

  • Only manifest-declared entries are validated; unrelated .plan files are not scanned.

Examples ​

bash
planq project validate
planq project validate --project products/release

Resources ​

Usage: planq resources <init|format|status|sync> [options]

SubcommandUsage
initplanq resources init [--project <dir>]
formatplanq resources format [--project <dir>|--stdin]
statusplanq resources status [--project <dir>] [--offline]
syncplanq resources sync [--project <dir>] [--accept]

Exit codes ​

CodeMeaning
0Success
1Invalid plan, operation, or source baseline
2Argument or file access error

Notes ​

  • sync shows a diff by default. Only --accept atomically updates resources.lock.json.

Examples ​

bash
planq resources init
planq resources format
planq resources status --offline
planq resources sync
planq resources sync --accept

Skill ​

Usage: planq skill <status|install> [--project <dir>]

SubcommandUsage
statusplanq skill status [--project <dir>]
installplanq skill install [--project <dir>]

Exit codes ​

CodeMeaning
0Success
2Argument or file access error

Notes ​

  • The canonical payload is .agents/skills/plan-gantt/ under the Git root.
  • The fixed result.integrations order is Codex, Claude Code, then TRAE; each entry reports its project path, status, discovery mode, and relative conflicts.
  • Installation atomically fills missing canonical and project discovery entries, and refuses different versions, local modifications, and unknown files.
  • There is no --global, --agent, or --force mode, and PlanQ never creates .codex/skills or a user-Home Skill.

Examples ​

bash
planq skill status
planq skill install --project products/release

Task ​

Usage: planq task <list|get|add|update|delete> ...

SubcommandUsage
listplanq task list <file> [--order file] [--name <text>] [--parent <id>]
getplanq task get <file> <task-id>
addplanq task add <file> --id <id> --name <name> [task fields] [placement]
updateplanq task update <file> <task-id> [task fields] [placement]
deleteplanq task delete <file> <task-id>

Exit codes ​

CodeMeaning
0Success
1Invalid plan, operation, or source baseline
2Argument or file access error

Notes ​

  • --after accepts a work-item name or @id; --to accepts only a project @person-key.
  • Placement controls sibling order and is separate from dependency order.

Examples ​

bash
planq task list project.plan --order file
planq task add project.plan --id brd --name BRD --before prd
planq task update project.plan brd --first

For commands without a dedicated section, run planq <command> --help and consume the returned versioned JSON help envelope.

PlanQ documentation