Skip to Content
We are live but in Staging πŸŽ‰
CLI GuideScripts & Drafts

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.

FlagMeaning
--descriptionHuman-readable summary
--tagsComma-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 yaml

script list

Browse scripts and filter by tags.

FlagMeaning
--tagsFilter by comma-separated tags
--page-sizeMax number of results
dodil scriptum script list --tags "finance,etl" --page-size 50

script delete <name>

Remove a script and all of its versions.

dodil scriptum script delete old-parser

draft β€” 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.

FlagMeaning
-f, --filePath 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.scriptum

draft compile <name>

Type-check the draft against each tool’s schema. On failure it prints diagnostics with file, line, column, severity, and a hint.

FlagMeaning
--show-astPrint raw AST JSON and exit
--show-irPrint compiled IR YAML and exit
dodil scriptum draft compile invoice-parser dodil scriptum draft compile invoice-parser --show-ir

On success, compile also reports the tools the script requires.

draft test <name>

Execute the current draft as a thread without publishing.

FlagMeaning
--inputInline JSON or @file
--envLoad 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-parser

draft validate <file.scriptum> [files...]

Validate .scriptum files locally with the bundled validator β€” no server connection required. Useful in pre-commit hooks and editors.

FlagMeaning
--jsonEmit results as JSON
dodil scriptum draft validate ./invoice_parser.scriptum --json

draft fmt <file.scriptum> [files...]

Reformat .scriptum files in place using the same bundled validator. Also local and offline.

dodil scriptum draft fmt ./invoice_parser.scriptum

version β€” history and rollback

version list <name>

List every version with its status and required tools.

dodil scriptum version list invoice-parser

version get <name> <version>

Read metadata for one immutable version.

dodil scriptum version get invoice-parser 3 -o json

version rollback <name> [--to N]

Make a previously published version active again.

FlagMeaning
--toTarget version (0 = previous active)
dodil scriptum version rollback invoice-parser --to 2 dodil scriptum version rollback invoice-parser --to 0

A 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-parser

Caveats

  • validate and fmt are local-only and use the bundled validator binary; the rest of the draft group calls the server.
  • There is no dedicated CLI command to fetch published script source. Use the API workaround in API Gaps & Workarounds.

See also