Reference

CLI reference.

The command line is an independently useful product interface. Output on stdout is parseable; progress and human text go to stderr. Every JSON response is schema-versioned and free of ANSI sequences.

Workspace

CommandDoesRisk
intralock init --workspace . --read-onlyRegisters a directory; no file writes.read
intralock workspaces listLists registered workspaces and IDs.read
intralock workspace inspect <id>Root, policy, exclusions, counts, health.read
intralock workspace archive <id>Marks unavailable; preserves identity and history.mutate

Index

CommandDoesRisk
intralock index run --workspace <id> [--dry-run]Builds or refreshes the catalog.derive
intralock index status --workspace <id>Queue depth, freshness, failures, coverage gaps.read
intralock reindex object <id>Re-extracts one object after a parser change.derive
CommandDoesRisk
intralock search "query" --workspace <id> --jsonPermission-filtered FTS5 search.read
intralock graph neighbors <obj> --depth 2Typed traversal with evidence.read
intralock context bundle --workspace <id> --mode engineering --max-tokens 6000Budgeted context assembly.derive
intralock object get <id> --jsonMetadata, versions, provenance, edges.read

Homepages and snapshots

CommandDoesRisk
intralock homepage preview --workspace <id>Renders a virtual homepage; no write.derive
intralock homepage publish --workspace <id> --approval <apr>Writes adopted, owned regions only.mutate
intralock snapshot create --workspace <id>Captures digest-bound state.derive
intralock snapshot verify --workspace <id>Reports verified, stale, modified, unverifiable, or invalid.read

Governance

CommandDoesRisk
intralock policies explain --actor <id> --action <op> --object <id>Shows why an operation is allowed or denied.read
intralock capabilities list --format jsonCapability registry with risk and scope.read
intralock tokens issue --actor … --capability … --expires 24hIssues a scoped token; value shown once.admin
intralock tokens revoke <id>Immediate denial; no cache window.admin
intralock tasks list --state runningDurable task ledger.read
intralock tasks cancel <id>Re-authorized cancellation.mutate

Operations

CommandDoesRisk
intralock backup create --target /safe/pathConsistent backup with integrity metadata.derive
intralock backup restore <id>Rehearsed restore into a verified target.mutate
intralock manifest validateExact failing line and rule, with migration hint.read
intralock doctor --fullSchema, disk reserve, queues, event coverage, integrity.read
intralock mcp serve --transport stdioLocal MCP server over the same policy engine.read
intralock server start --bind 127.0.0.1:8765Local HTTP server; loopback by default.admin

Global flags

FlagMeaning
--workspace <id>Scope the operation; no ambient default when omitted.
--format json|table|textOutput format. --json is shorthand.
--expected-version <rev>Refuse the write if the object changed.
--dry-runResolve and report; no effect.
--request-id <id>Correlate logs, receipts, and support.
--quiet / --verboseSuppress or expand stderr diagnostics.
--yesOnly where safe. Never bypasses an approval.

Exit codes

CodeMeaning
0Success
1Internal fault
2Invalid input or usage
3Policy denial
4Conflict: version or precondition
5Daemon unavailable
6Partial completion (see receipt)

JSON shape

json
{
  "schema": "intralock.cli/v1",
  "request_id": "req_01JEX7",
  "ok": true,
  "data": { "results": [ … ] },
  "freshness": { "indexed_at": "…", "lag_seconds": 12 }
}