Command-line reference
This page documents the public commands exposed by bin/sandbox-loom. Run
bin/sandbox-loom --help for the concise command index. Paths are interpreted
relative to the current directory unless stated otherwise. Commands that
accept --help print their own syntax.
Effects and safety
| Effect | Meaning |
|---|---|
| Read-only | Validates, inspects, or plans without changing project files. |
| Writes local state | Creates or updates generated files, local state, or evidence. |
| Executes | Runs workflow tasks, a coding agent, tests, or an OCI runtime. |
| Publishes | Sends a built documentation site to a hosting target. |
Generated workflows and harnesses do not grant authority by themselves.
Review generated files and policy before execution. docs publish plans by
default and publishes only when --execute is supplied.
Local server showcase
These commands operate the local server showcase/prototype; they do not provide a hosted multi-tenant control plane.
bin/sandbox-loom server start [--host HOST] [--port PORT] [--state FILE]
bin/sandbox-loom demo [--reset] [--root DIR]
bin/sandbox-loom doctor [--state FILE]
bin/sandbox-loom tui [--state FILE] [--once]
server start defaults to 127.0.0.1:8788 and
.sandbox-loom/server/state.db in the current directory. demo runs the
showcase and --reset resets its data. doctor checks local readiness and
returns failure when checks fail. tui renders current local state; --once
performs a single render. Server and TUI processes remain active until stopped.
Workflow inspection
bin/sandbox-loom workflow check WORKFLOW.yml
bin/sandbox-loom workflow expand WORKFLOW.yml
bin/sandbox-loom workflow plan WORKFLOW.yml
bin/sandbox-loom examples check
These commands do not mutate the project: check validates workflow and policy
compatibility, expand resolves composed modules, and plan prints task order.
examples check runs the offline example matrix (including temporary-workspace
examples); live examples require their documented opt-in environment flags.
Project harness and runs
bin/sandbox-loom project check PATH
bin/sandbox-loom project init PATH --name NAME --repository PATH --profile PROFILE --agent EXECUTABLE [--force]
bin/sandbox-loom run PROJECT [options]
bin/sandbox-loom run-status PROJECT RUN_ID [--json]
bin/sandbox-loom evidence PROJECT RUN_ID [--json]
bin/sandbox-loom runtime-check [--json]
project check validates a manifest. project init writes a scaffold and
refuses replacement unless --force is supplied.
run executes the project harness. Options:
| Option | Purpose |
|---|---|
--registry PATH, --project-path PATH |
Resolve a registered project or explicit project path. |
--policy-root DIR |
Add an operator-configured v3 policy source root. Repeat for each trusted root. Required when the manifest pins a v3 policy. |
--profile NAME |
Select a configured execution profile. |
--runtime local\|oci |
Select local or OCI execution; default comes from the manifest or is local. |
--backend runc\|youki |
Select an OCI backend; otherwise an available backend is selected. |
--rootfs DIR, --bundle DIR |
Set OCI root filesystem or bundle locations. |
--evidence DIR |
Override the manifest evidence directory. |
--run-id ID |
Supply a run identifier. |
--check, --plan, --dry-run |
Validate or inspect without executing the implementation workflow. |
--approve |
Explicitly authorize workflow tasks that require approval. |
--until-complete, --all-slices |
Explicitly request bounded multi-slice execution; project policy must also allow it. |
--max-slices N |
Bound the number of slices in that run. |
--json-summary |
Emit a machine-readable summary. |
--quiet |
Suppress human-readable progress. |
A normal run executes one slice. Multi-slice execution requires both an explicit CLI request and project permission. See Operations and the intake-to-execution guide for resume and evidence practices.
run-status reports the latest checkpoint and resumability. evidence prints
checkpoint records. runtime-check probes local OCI runtime support. These
inspection commands do not change a run; --json selects JSON output.
When an agent/provider reports usage, checkpoints.jsonl includes a correlated
agent_usage record with task, attempt, provider/model when known, and reported
input/output/cache/reasoning token counts. Context-used and context-remaining
percentages are included only when both used-token and window-size values are
available. Missing usage is omitted; prompts, completions, and raw provider
payloads are not copied into usage records. Token counts are numeric telemetry,
not credentials.
Prepare an OCI root filesystem with:
bin/sandbox-loom rootfs prepare --output DIR [--mode busybox|host] [--busybox PATH] [--agent PATH] [--tool PATH ...] [--force]
This writes the rootfs. busybox mode is for smoke tests; host mode copies
explicitly selected executables and libraries. --force does not authorize
replacement of a populated output directory.
Policy composition
The policy commands resolve v3 policy files locally. They do not execute a project workflow.
bin/sandbox-loom policy validate FILE --policy-root DIR [--policy-root DIR ...] [--registry FILE] [--json]
bin/sandbox-loom policy explain FILE --policy-root DIR [--policy-root DIR ...] [--registry FILE] [--json]
bin/sandbox-loom policy resolve FILE --policy-root DIR [--policy-root DIR ...] [--registry FILE] [--output FILE]
validate checks the pinned source graph, composes the effective policy, and
checks its capabilities against the selected registry. explain prints the
leaf profile, source identities, effective restrictions, scope requirements,
and digests. resolve emits canonical JSON containing the effective policy
and graph provenance. It writes to standard output unless --output is
provided.
Pass every trusted source root explicitly. Each root uses the layout
<root>/<policy-name>/<version>.yml. The commands default to Sandbox Loom's
bundled v0.2 capability registry; pass --registry FILE for another registry
version. The selected registry version must match every policy in the graph.
For a project whose .sandbox-loom/project.yml contains a v3 policy pin,
pass its operator-managed source roots to both planning and execution:
bin/sandbox-loom run ./ --plan --policy-root /path/to/policy-sources
bin/sandbox-loom run ./ --approve --policy-root /path/to/policy-sources
Runtime policy sources must be outside the project's writable repository. The
project manifest pins only the leaf name, version, and digest; it cannot add a
trusted root. The leaf's active profile must match the project manifest.
The versioned policy specification in the source tree defines document roles,
digest calculation, and migration boundaries.
Intake and harness generation
bin/sandbox-loom intake init [--guided] [--output FILE] [--template NAME] [--force]
bin/sandbox-loom intake validate SOURCE... [--json]
bin/sandbox-loom intake import SOURCE... --output DIR [--max-bytes BYTES]
bin/sandbox-loom intake normalize DIR --output FILE [--project NAME] [--objective TEXT]
bin/sandbox-loom intake templates [NAME]
bin/sandbox-loom intake skills
bin/sandbox-loom intake skill roles [ROLE]
bin/sandbox-loom intake skill questions PROJECT [--role ROLE] [--output FILE]
bin/sandbox-loom intake skill show NAME
bin/sandbox-loom intake skill generate PROJECT --skill NAME --output FILE [--target TARGET] [--force]
bin/sandbox-loom intake answer SOURCE --question ID --answer TEXT [--output FILE] [--answered-by NAME]
bin/sandbox-loom intake review SOURCE [--json]
init, import, normalize, answer, and skill generation write files.
Import records hashes and provenance; it does not overwrite a duplicate source
in the same intake directory. Use a new output directory for an updated
source. validate, templates, skills, skill roles/questions/show, and
review are read-only.
bin/sandbox-loom harness generate PROJECT --scope FILE [--template NAME] [--force]
bin/sandbox-loom harness docs PROJECT --scope FILE [--template NAME] [--force]
bin/sandbox-loom harness review PROJECT
bin/sandbox-loom harness approve PROJECT --reviewer NAME --rationale TEXT
bin/sandbox-loom harness approve-decision PROJECT --id ID --reviewer NAME [--rationale TEXT]
Generation writes proposed harness or documentation artifacts. review is
read-only. Approval commands write reviewer decisions and hashes; they do not
execute the project. Existing differing generated files are preserved unless
--force is supplied; inspect changes before forcing replacement.
Implementation plan
bin/sandbox-loom plan add-phase PROJECT --from FILE
bin/sandbox-loom plan add-slices PROJECT --phase PHASE_ID --from FILE
bin/sandbox-loom plan template phase|slices [--phase PHASE_ID] [--output FILE]
bin/sandbox-loom plan validate PROJECT [--from FILE] [--phase PHASE_ID]
template prints a scaffold or writes it to a new file. validate is
read-only. add-phase and add-slices update the plan, status ledger, and
generated implementation docs when present, then require harness review and
approval again.
Documentation and repository workflows
bin/sandbox-loom docs preview PROJECT [--scope FILE] [--audience consumer|technical|stakeholder] [--output DIR] [--host HOST] [--port PORT] [--open] [--check]
bin/sandbox-loom docs validate-diagrams PROJECT
bin/sandbox-loom docs serve PROJECT [--dev-addr HOST:PORT] [--open]
bin/sandbox-loom docs publish PROJECT --target github-pages|s3-cloudfront --output DIR [--commit SHA] [--version VERSION] [--bucket NAME] [--prefix PATH] [--workflow FILE] [--execute]
bin/sandbox-loom docs scaffold PROJECT [--force]
bin/sandbox-loom docs reference check CACHE_DIR
bin/sandbox-loom repo workflows generate PROJECT [--provider auto|github] [--remote NAME] [--scope FILE] [--force]
docs preview generates an audience projection and builds it with Zensical;
without --check, it serves the result locally. docs publish plans by
default; --execute performs publication. docs scaffold writes documentation
workflow scaffolding. docs reference check inspects a local documentation
reference cache. docs validate-diagrams checks the selected project's
project-docs/diagrams/diagram-design/ HTML and SVG files and prints their
size and SHA-256 digests as JSON. Repository workflow generation writes proposed GitHub Actions
CI and documentation workflows from normalized scope and quality gates; it
does not configure hosting settings or secrets. See the
repository workflow guide and
publishing guide.
docs serve PROJECT requires an executable PROJECT/bin/zensical. It runs
bin/zensical build --clean --strict from the project root and starts
bin/zensical serve only after the build succeeds. The wrapper can activate a
project-local Zensical environment, keeping preview independent of the global
PATH. Pass --dev-addr HOST:PORT to select the bind address and port, or
--open to open the served site in a browser.
Errors and machine-readable output
Invalid arguments or inputs, unavailable tools, policy denials, and failed
quality gates produce a non-success exit status and a diagnostic. Only
commands that explicitly document --json or --json-summary provide
machine-readable output.