4.8 KiB
CLI Reference
Scriptorium installs native CommandKit v0.8.0 and integration commands
alongside application-owned run and serve. Upstream owns standard command
grammar, reusable flags, reporting, completion, and outcomes. See
configuration, the HTTP contract, and the
CLI migration guide for application choices.
Commands
scriptorium run PROMPT_ID [flags]
scriptorium serve [flags]
scriptorium config scopes|validate|show|sources|explain|diff [flags]
scriptorium promptkit list|show|requirements|test [flags]
scriptorium help [COMMAND ...]
scriptorium version
scriptorium completion bash|zsh|fish
Use --help for installed commands and flags. Help, version, scope discovery,
bare config-explain help, and static completion do not acquire configuration.
Configuration-consuming commands accept --config PATH and --overlay NAME.
Native --show-tokens requests a diagnostic usage/cost summary; quiet mode
suppresses it. Explicit smoke tests may contact providers and incur cost.
Generation
run requires one positional prompt ID and uses the native profile, session,
input, execution, and namespace bindings. Preferred aliases omit llm-, such
as --profile, --input-text, --input-file, --var, --endpoint, and
--timeout-seconds. --input and --llm-input mean literal input text. The
native CLI contract owns the full binding and mapping semantics.
There is no duplicate prompt flag or direct backend flag.
Application-owned controls are --run-timeout DURATION, passed unchanged as
PromptKit's operation budget, and --report PATH with optional
--report-format text|yaml|json. Omission of the report format passes native
automatic selection. An explicitly empty report path is a usage error.
Results And Separate Reports
Automatic/text stdout is exactly the generated artifact bytes, without an added
newline. Native JSON/YAML output is the full upstream result. Save stdout with
shell redirection; there is no output-file flag. Omit --quiet to capture the
main result, since quiet suppresses it even when redirected.
An explicitly requested report is independently rendered from the same result,
without the artifact-only template, even in quiet mode. Its extension does not
choose a format; - is an ordinary filename. Files are created or truncated
normally, with mode 0644 for new files subject to umask; parent directories are
not created. A resultless failure leaves an existing report untouched. Main
delivery is attempted first, then the report even if main delivery fails. Writes
are nontransactional; the caller owns redirected destinations and retention.
Application Configuration Inspection
Native config defaults to app; promptkit focuses the same complete load at
its framework section. Both scopes accept native overrides and independent
comparison selections; paths remain application-root paths. Neither scope
constructs an engine. See configuration
and the native CLI contract for scope and path operations.
Framework Configuration Inspection
The focused view retains native whole-load evidence and allows explicit queries outside its focus. Native sensitivity is not a general-purpose secret filter; inspection, prompt, prepared, and result reports can contain sensitive content.
Discovery, Preview, And Explicit Smoke Testing
Native PromptKit commands expose inventories, named inspection, requirements, validation, prepared preview, and explicit smoke tests. Requirements discovery is distinct from preparation and generation; consult the PromptKit consumer contract and native CLI contract. Prepared and named reports can include prompt content.
Server And Statuses
serve accepts --addr, --artifact-root, --max-request-bytes,
--max-artifact-bytes, and --max-response-bytes in addition to configuration
selection. Interrupt/SIGTERM cancels the invocation and closes the listener and
active connections; no graceful-drain guarantee is added.
| Status | Application meaning |
|---|---|
| 0 | Success, subject to delivery. |
| 1 | Operational failure, cancellation, or delivery failure. |
| 2 | Usage error or natively classified invalid configuration. |
| 3 | Native config diff --check found differences. |
| 4 | Completed generation failed content validation; its result is delivered. |
Native finalization owns presentation failures. A report-file failure retains an existing nonzero domain status and adds delivery evidence. A resultless operation failure does not produce a synthetic result.