Scripts & Drafts
These three command groups cover the authoring and release lifecycle: a
script is the named container, a draft is the mutable working copy, and a
version is an immutable published snapshot.
script β metadata and lifecycle
script create <name>
Create the script container before authoring a draft.
| Flag | Meaning |
|---|---|
--description | Human-readable summary |
--tags | Comma-separated tags |
dodil scriptum script create invoice-parser \
--description "Parse invoices into structured JSON" \
--tags "invoice,etl,finance"script get <name>
Inspect the active version, latest version, and current draft status.
dodil scriptum script get invoice-parser -o yamlscript list
Browse scripts and filter by tags.
| Flag | Meaning |
|---|---|
--tags | Filter by comma-separated tags |
--page-size | Max number of results |
dodil scriptum script list --tags "finance,etl" --page-size 50script delete <name>
Remove a script and all of its versions.
dodil scriptum script delete old-parserdraft β author, validate, publish
A draft is per-script mutable source. The typical inner loop is save β compile β test, then publish when it passes.
draft save <name> -f <path>
Upload .scriptum (DSL) or .yaml (compiled IR) content as the scriptβs draft.
| Flag | Meaning |
|---|---|
-f, --file | Path to the draft file (required) |
.scriptum files are sent as DSL content; any other extension is sent as YAML
IR.
dodil scriptum draft save invoice-parser -f ./invoice_parser.scriptumdraft compile <name>
Type-check the draft against each toolβs schema. On failure it prints diagnostics with file, line, column, severity, and a hint.
| Flag | Meaning |
|---|---|
--show-ast | Print raw AST JSON and exit |
--show-ir | Print compiled IR YAML and exit |
dodil scriptum draft compile invoice-parser
dodil scriptum draft compile invoice-parser --show-irOn success, compile also reports the tools the script requires.
draft test <name>
Execute the current draft as a thread without publishing.
| Flag | Meaning |
|---|---|
--input | Inline JSON or @file |
--env | Load the effective merged environment into the run |
dodil scriptum draft test invoice-parser --input @./input.json --env
dodil scriptum draft test invoice-parser --input '{"invoice_id":"INV-42"}'draft publish <name>
Promote the compiled draft to a new immutable, numbered version and make it active.
dodil scriptum draft publish invoice-parserdraft validate <file.scriptum> [files...]
Validate .scriptum files locally with the bundled validator β no server
connection required. Useful in pre-commit hooks and editors.
| Flag | Meaning |
|---|---|
--json | Emit results as JSON |
dodil scriptum draft validate ./invoice_parser.scriptum --jsondraft fmt <file.scriptum> [files...]
Reformat .scriptum files in place using the same bundled validator. Also
local and offline.
dodil scriptum draft fmt ./invoice_parser.scriptumversion β history and rollback
version list <name>
List every version with its status and required tools.
dodil scriptum version list invoice-parserversion get <name> <version>
Read metadata for one immutable version.
dodil scriptum version get invoice-parser 3 -o jsonversion rollback <name> [--to N]
Make a previously published version active again.
| Flag | Meaning |
|---|---|
--to | Target version (0 = previous active) |
dodil scriptum version rollback invoice-parser --to 2
dodil scriptum version rollback invoice-parser --to 0A complete authoring loop
# 1) Create the container
dodil scriptum script create invoice-parser --tags "invoice,etl"
# 2) Inner loop: save, compile, test
dodil scriptum draft save invoice-parser -f ./invoice_parser.scriptum
dodil scriptum draft compile invoice-parser
dodil scriptum draft test invoice-parser --input @./sample.json --env
# 3) Publish and confirm
dodil scriptum draft publish invoice-parser
dodil scriptum version list invoice-parserCaveats
validateandfmtare local-only and use the bundled validator binary; the rest of thedraftgroup calls the server.- There is no dedicated CLI command to fetch published script source. Use the API workaround in API Gaps & Workarounds.
See also
- Threads & Results β run a published script.
- Authoring to publish β the full recipe.
- Scriptum Language β the
.scriptumsyntax. - API Reference β Scripts β the underlying RPCs.