CLI Reference
deccy provides 13 verbs plus built-in help and --version. Every verb operates on the .deccy/ store in the current working directory (except init, which accepts an optional target directory, and hash, which needs no store at all).
Global Conventions
Syntax & Flags
deccy [--json | -j] <verb> [options] [-- <positionals>...]
deccy --help | -h | help [<verb>] [--json | -j]
deccy --version | -V
- Long flags accept either
--flag valueor--flag=value. - Short flags accept either
-f valueor-f=value. - No combined short flags: Write
-h -j, never-hj. - Repeatable flags: When a non-repeatable valued flag is passed more than once, the last value wins. Repeatable flags (
--claim,--tail,--head,--release,--clear) collect all values in order and deduplicate them. --separator: Everything after--is treated as a positional argument, never as a flag.--json/-j: Accepted either immediately before the verb (deccy -j list) or after the verb (deccy list -j). Both produce identical canonical JSON output.
Verb Aliases
Aliases are recognized only in the first argument position (the verb word). Output, help text, and JSON envelopes always report the canonical verb name.
| Canonical Verb | Accepted Aliases |
|---|---|
init | i |
new | n |
show | (none) |
list | ls |
describe | desc, d |
rationale | prose, r |
claim | c |
link | (none) |
remove | rm |
status | st |
validate | check, v |
explain | owner, e |
hash | (none) |
landsare intentionally omitted sodeccynever guesses betweenlist/linkorshow/status. Prefix guessing (such asstatorval) is never performed.
Verbs
1. init
Create the .deccy/ directory structure (nodes/, rationale/, and format) and report which VCS is readable at that root.
- Aliases:
i - Usage:
deccy init [path] [--json] - Short flags:
-h(--help),-j(--json)
Examples:
# Initialize in the current directory
$ deccy init
vcs jj
# Initialize in a subdirectory
$ deccy init subproject
vcs none
JSON Output:
{"ok":true,"vcs":"jj","verb":"init"}
Refuses when: .deccy/ already exists, more than one path is given, or the directory cannot be created.
2. new
Generate a new 32-character node ID, snapshot any claimed files, pin any target ends at their current digests, and write the node’s record (and optional rationale).
- Aliases:
n - Usage:
deccy new --kind K --type T --title T [--claim P]... [--create] [--tail ID]... [--head ID]... [--rationale FILE|-] - Flags:
Flag Short Description --kind <decision|connector>-kRequired node kind (or use preset -d/-c).(preset for --kind decision)-dSet kind to decision(also accepted as-k -d).(preset for --kind connector)-cSet kind to connector(also accepted as-k -c).--type <T>-tRequired free-form single-line type (e.g. text,ears,review-criteria).--title <T>-TRequired single-line summary title. --claim <path>-pRepeatable relative file path for this node to own and snapshot. --create-CCreate absent --claimfiles as empty regular files (parent dirs must exist).--tail <id-or-prefix>(none) Repeatable tail pin ID/prefix (connectors only). --head <id-or-prefix>(none) Repeatable head pin ID/prefix (connectors only). --rationale <file|->-rCopy initial rationale bytes from <file>or stdin (-) intorationale/<id>.md.--help/--json-h/-jShow usage or emit JSON envelope.
Examples:
# Create a decision with a claim and empty file creation
$ deccy new -d -t text -T "Store records as pretty JSON" -p src/record.rs -C
ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
# Create a connector linking two decisions
$ deccy new -c -t review-criteria -T "Record schema matches parser" \
--tail ktvsvszp --head pouvsykp
qonutznvlyssluxyzysswxltlztxlwro
JSON Output:
{"id":"ktvsvszpzoxlzrsoqpvsuztsstmyvqvp","ok":true,"verb":"new"}
Refuses when: --kind, --type, or --title is missing/empty/multi-line; --tail or --head is passed for a decision; a claimed file is missing (without --create), is a directory/symlink, is inside .deccy/, or is already claimed by another node; or a pinned ID prefix is unknown, ambiguous, broken, or missing its rationale.
3. show
Print a node’s JSON record exactly as stored on disk, or print its rationale file verbatim.
- Usage:
deccy show <id> [--rationale] [--json] - Flags:
Flag Short Description --rationale-rPrint the node’s rationale bytes instead of its JSON record. --help/--json-h/-jShow usage or emit JSON envelope.
Examples:
# Show the record on disk
$ deccy show ktvsvszp
{
"claims": {
"src/record.rs": "b6aa9f3c176c3240c3f6eba3f3880e00d157e0d0c4388b7685e06faaccbfa630"
},
"id": "ktvsvszpzoxlzrsoqpvsuztsstmyvqvp",
"kind": "decision",
"rationale": null,
"title": "Store records as pretty JSON",
"type": "text"
}
# Show the rationale prose
$ deccy show ktvsvszp -r
JSON Output:
Without --rationale:
{"ok":true,"record":{"claims":{},"id":"ktvsvszpzoxlzrsoqpvsuztsstmyvqvp","kind":"decision","rationale":"rationale/ktvsvszpzoxlzrsoqpvsuztsstmyvqvp.md","title":"Store records as pretty JSON","type":"text"},"verb":"show"}
With --rationale (includes both record and rationale):
{"ok":true,"rationale":"Prose text here\n","record":{...},"verb":"show"}
Refuses when: <id> is missing, unknown, or ambiguous; --rationale is requested when "rationale": null or the rationale file is missing; or --rationale --json is used on non-UTF-8 rationale bytes (use human mode without --json to stream raw bytes).
4. list
List all readable nodes in ID order with five two-space-separated columns: id kind type digest8 title.
- Aliases:
ls - Usage:
deccy list [--json] - Short flags:
-h(--help),-j(--json)
Example:
$ deccy ls
ktvsvszpzoxlzrsoqpvsuztsstmyvqvp decision text 04ef2ce7 Keep the store in plain files
qonutznvlyssluxyzysswxltlztxlwro connector review-criteria fb618936 Every decision has a rationale
JSON Output:
{"nodes":[{"digest8":"04ef2ce7","id":"ktvsvszpzoxlzrsoqpvsuztsstmyvqvp","kind":"decision","title":"Keep the store in plain files","type":"text"}],"ok":true,"verb":"list"}
5. describe
Rewrite a node’s one-line title, type, or both without touching its claims, pins, or rationale.
- Aliases:
desc,d - Usage:
deccy describe <id> [--title T] [--type T] [--json] - Flags:
Flag Short Description --title <T>-TNew single-line title. --type <T>-tNew single-line type. --help/--json-h/-jShow usage or emit JSON envelope.
Example:
$ deccy describe ktvsvszp -T "Keep all store records in plain files" -t adr
id ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
title Keep all store records in plain files
type adr
JSON Output:
{"id":"ktvsvszpzoxlzrsoqpvsuztsstmyvqvp","ok":true,"title":"Keep all store records in plain files","type":"adr","verb":"describe"}
Refuses when: Neither --title nor --type is given, or a value is empty or contains newlines/control characters.
6. rationale
Write a node’s rationale from a file, standard input, or $EDITOR, or re-point the record to an existing file under .deccy/rationale/.
- Aliases:
prose,r - Usage:
deccy rationale <id> [--file P|-] [--path P] [--json] - Flags:
Flag Short Description --file <path|->-fRead rationale bytes from <path>or stdin (-).--path <pointer>-pTarget path relative to .deccy/insiderationale/(e.g.rationale/notes.md).--help/--json-h/-jShow usage or emit JSON envelope.
Three Operating Modes:
--file <path|->(with optional--path): Writes the given bytes to the node’s rationale path (defaulting torationale/<id>.mdif the node has no pointer and--pathwas omitted) and updates the record. If the pointer moved, the old rationale file is cleaned up.--path <pointer>alone: Re-points the record to an existing file at.deccy/<pointer>and removes the old rationale file if it was replaced.- Neither
--filenor--path(or--pathwith no--filewhen editing): Wait—passing neither flag invokes$EDITORon the target file, then updates the record once the editor exits0.
Examples:
# Pipe rationale from stdin
$ printf 'Detailed design rationale.\n' | deccy rationale ktvsvszp -f -
id ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
rationale rationale/ktvsvszpzoxlzrsoqpvsuztsstmyvqvp.md
# Re-point to an existing file under .deccy/rationale/
$ deccy rationale ktvsvszp -p rationale/custom.md
id ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
rationale rationale/custom.md
JSON Output:
{"id":"ktvsvszpzoxlzrsoqpvsuztsstmyvqvp","ok":true,"rationale":"rationale/ktvsvszpzoxlzrsoqpvsuztsstmyvqvp.md","verb":"rationale"}
7. claim
Add or re-snapshot file claims on a node, refresh all existing claims on a node, or release file ownership.
- Aliases:
c - Usage:
deccy claim <id> [<path>]... [--create] [--refresh] [--release <path>]... [--json] - Flags:
Flag Short Description --create-cCreate absent positional <path>files as empty regular files first.--refresh-fRe-snapshot every file currently claimed by <id>(clears drift).--release <path>-rRepeatable. Drop <id>’s claim on<path>without deleting the file on disk.--help/--json-h/-jShow usage or emit JSON envelope.
Examples:
# Claim a new file and refresh existing claims
$ deccy claim ktvsvszp src/store.rs --refresh
id ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
claim src/store.rs 5bc578e2c1a0...
# Release ownership of a file (keeps src/store.rs on disk)
$ deccy claim ktvsvszp --release src/store.rs
id ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
JSON Output:
{"claims":{"src/store.rs":"5bc578e2c1a0..."},"id":"ktvsvszpzoxlzrsoqpvsuztsstmyvqvp","ok":true,"verb":"claim"}
Refuses when: No paths, --refresh, or --release are provided; a path is owned by another node; a path is named in both positionals and --release; a --release path is not claimed by <id>; or a claimed path is missing (without --create), a directory, a symlink, or inside .deccy/.
8. link
Replace a connector’s tail or head pins, empty an end with --clear, or re-pin existing ends to their targets’ current digests.
- Usage:
deccy link <connector> [--tail ID]... [--head ID]... [--clear END]... [--repin] [--json] - Flags:
Flag Short Description --tail <id-or-prefix>-TRepeatable. Replace the connector’s tailend with these nodes.--head <id-or-prefix>-HRepeatable. Replace the connector’s headend with these nodes.--clear <tail|head>(none) Repeatable. Empty the named end ( tailorhead) to[].--repin-rRecompute digests for existing pins not replaced in this command. --help/--json-h/-jShow usage or emit JSON envelope.
Examples:
# Re-pin a stale connector to current target digests
$ deccy link qonutznv --repin
id qonutznvlyssluxyzysswxltlztxlwro
# Replace tail pins and clear head pins
$ deccy link qonutznv -T ktvsvszp --clear head
id qonutznvlyssluxyzysswxltlztxlwro
JSON Output:
{"id":"qonutznvlyssluxyzysswxltlztxlwro","ok":true,"verb":"link"}
Refuses when: <connector> is a decision; a target pins the connector to itself; new ends would close a cycle; a target node is missing, broken, or missing its rationale; --clear names anything other than tail or head; --clear is combined with --repin; or --clear <end> is combined with --<end>.
9. remove
Delete a node’s claimed files, its rationale file, and its record file.
- Aliases:
rm - Usage:
deccy remove <id> [--json] - Short flags:
-h(--help),-j(--json)
Example:
$ deccy rm ktvsvszp
id ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
title Keep the store in plain files
prose rationale/ktvsvszpzoxlzrsoqpvsuztsstmyvqvp.md
deleted src/store.rs
(If the node had no rationale, the third line is prose none.)
JSON Output:
{"deleted":["src/store.rs"],"id":"ktvsvszpzoxlzrsoqpvsuztsstmyvqvp","ok":true,"rationale":"rationale/ktvsvszpzoxlzrsoqpvsuztsstmyvqvp.md","title":"Keep the store in plain files","verb":"remove"}
Refuses when: Any sibling record in .deccy/nodes/ is broken/unreadable (since it might hide a reference); any connector still pins <id> in tail or head; another readable node points to the same rationale file; another readable node claims one of the same paths; or a claimed path is a symlink, directory, or outside the working directory.
10. status
Report counts, work items (stale, drift, orphans, no-rationale), structural problems, and working-tree differences against the active VCS revision. Always exits 0 when the store is readable.
- Aliases:
st - Usage:
deccy status [--json] - Short flags:
-h(--help),-j(--json)
Human Output Order:
- Counts:
nodes,decisions,connectors,stale,drift,collisions,orphans,no-rationale,missing-claims,missing-rationales,unpinned,dangling,cycles,broken(plusconflictedwhen conflicted node files exist). - Details:
- Stale connectors:
connector <id>followed by<tail|head> <target-id> expects <8-hex> has <8-hex> - Drift:
drift <path> expected <8-hex> has <8-hex> - Conflicted nodes:
node <path> is conflicted; resolve it first - Structural problems (same format as
validate) - Orphans:
orphan <id> - Missing rationales (unset pointer):
no-rationale <id>
- Stale connectors:
- VCS section:
vcs <jj|git|none>- When
jjorgitis active:revision <8-char-rev>, followed byadded <path>,changed <path>, anddropped <path>for node files differing from@/HEAD(orvcs unreadable <reason>).
JSON Output:
{
"added": [],
"broken": 0,
"changed": [],
"collisions": 0,
"connectors": 1,
"cycles": 0,
"dangling": 0,
"decisions": 2,
"drift": 0,
"dropped": [],
"missing_claims": 0,
"missing_rationales": 0,
"no_rationale": 2,
"nodes": 3,
"ok": true,
"orphans": 0,
"revision": "fcfaa14722ac1156fd3a166920b95155bff22b8e",
"stale": 0,
"unpinned": 0,
"vcs": "jj",
"verb": "status"
}
11. validate
Report every structural problem in the graph (and optionally verify merge or revision history), then exit 1 if any problems were found.
- Aliases:
check,v - Usage:
deccy validate [--merge | --since REV] [--json] - Flags:
Flag Short Description --merge-mCompare the current revision against its parent(s) and merge base. --since <REV>-sCompare the current revision against a single revision <REV>.--help/--json-h/-jShow usage or emit JSON envelope.
Examples:
# Structural check of the working tree
$ deccy validate
valid 0 problems
# Merge check (silent when clean)
$ deccy validate --merge
JSON Output (clean):
{"ok":true,"problems":0,"report":[],"summary":"valid 0 problems","verb":"validate"}
JSON Output (with problems, exits 1):
{"ok":false,"problems":1,"report":["dangling: connector qonutznv... has a tail pin to unknown node kkkkkkkk...\n connector: qonutznv...\n end: tail\n missing id: kkkkkkkk..."],"summary":"invalid 1 problems","verb":"validate"}
12. explain
Find the single node that claims <path> and—when jj or git is present—report the most recent change that touched that file.
- Aliases:
owner,e - Usage:
deccy explain <path> [--json] - Short flags:
-h(--help),-j(--json)
Example (with jj):
$ deccy explain src/store.rs
path src/store.rs
node ktvsvszpzoxlzrsoqpvsuztsstmyvqvp
vcs jj
change fcfaa14722ac1156fd3a166920b95155bff22b8e Implement atomic node writer
change-id tlqxvtmuwotlqlxvvkukmyopmuqpstkm
JSON Output:
{
"change": "fcfaa14722ac1156fd3a166920b95155bff22b8e",
"change_id": "tlqxvtmuwotlqlxvvkukmyopmuqpstkm",
"description": "Implement atomic node writer",
"node": "ktvsvszpzoxlzrsoqpvsuztsstmyvqvp",
"ok": true,
"path": "src/store.rs",
"vcs": "jj",
"verb": "explain"
}
Refuses when: No node claims <path>, or multiple nodes claim <path> (collision).
13. hash
Compute the deccy-blob BLAKE3 digest (BLAKE3("deccy-blob\n" ‖ bytes)) of one or more files or standard input. Does not require a .deccy/ store.
- Usage:
deccy hash [<path>]... [--json] - Short flags:
-h(--help),-j(--json)
Examples:
# Hash stdin alone (prints bare 64-char hex digest)
$ printf 'hello\n' | deccy hash
d62f5a60...
# Hash multiple files (prints "<hex> <path>" per line)
$ deccy hash src/lib.rs src/main.rs
7a91c082... src/lib.rs
1e04b39f... src/main.rs
JSON Output:
{"hashes":[{"hash":"7a91c082...","path":"src/lib.rs"}],"ok":true,"verb":"hash"}
Refuses when: A named path does not exist or is a directory, or - (stdin) is passed more than once.