spec-editor code (Pro)
Pro command. Available with the spec-editor Pro plugin; the open core does not include it.
Code-repository commands: snapshot, refs, diff, gc.
Usage
spec-editor code [OPTIONS] COMMAND [ARGS]...
Subcommands
| Subcommand | Description |
|---|---|
diff |
Show a structured code diff between two revisions. |
gc |
Delete ghost-snapshot refs older than –older-than. |
refs |
List spec-editor ghost-snapshot refs (refs/spec-editor/runs/). |
snapshot |
Create a ghost snapshot ref for the current code state. |
spec-editor code diff
Show a structured code diff between two revisions.
spec-editor code diff HEAD~1 HEAD -p .
spec-editor code diff refs/spec-editor/runs/run_1/start \
refs/spec-editor/runs/run_1/end --json
Usage
spec-editor code diff [OPTIONS] REF_A REF_B
Arguments
| Argument | Required |
|---|---|
REF_A |
yes |
REF_B |
yes |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--path, -p |
path | . |
Path to project (or SPEC_EDITOR_PROJECT) |
--repo |
text | Which configured code repo (default: the first one) | |
--max-files |
integer | 200 |
|
--max-lines |
integer | 4000 |
|
--context |
integer | 3 |
|
--json |
flag | Output as JSON |
spec-editor code gc
Delete ghost-snapshot refs older than --older-than.
Usage
spec-editor code gc [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--path, -p |
path | . |
Path to project (or SPEC_EDITOR_PROJECT) |
--repo |
text | Which configured code repo (default: the first one) | |
--older-than |
text | 30d |
Age threshold, e.g. 30d |
--json |
flag | Output as JSON |
spec-editor code refs
List spec-editor ghost-snapshot refs (refs/spec-editor/runs/*).
Usage
spec-editor code refs [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--path, -p |
path | . |
Path to project (or SPEC_EDITOR_PROJECT) |
--run-id |
text | Narrow to one run’s refs | |
--repo |
text | Which configured code repo (default: the first one) | |
--json |
flag | Output as JSON |
spec-editor code snapshot
Create a ghost snapshot ref for the current code state.
spec-editor code snapshot -p . --label start --run-id run_abc123
Usage
spec-editor code snapshot [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--path, -p |
path | . |
Path to project (or SPEC_EDITOR_PROJECT) |
--label |
text | snapshot |
Ref label, e.g. start/end |
--run-id |
text | Run id (default: a generated manual-<uuid>) | |
--repo |
text | Which configured code repo (default: the first one) | |
--json |
flag | Output as JSON |