Documented release: v0.1.0-alpha.2 · 2026-11-24 (commit b1c6ebb158) No scripts · No telemetry · A–Z Index

CLI Subcommands & Flags Registry

Typed command and flag catalog shared between curvebook-cli --help and this manual page (10 subcommands, 4 exit codes).

See CLI Reference for direct command flag mapping rules and error envelopes.

Global Options

FlagsDefaultDescription
-V, --version—print version and exit
-h, --help—print this help message and exit

Subcommands

info

inspect tables, info sheets, analyses, graphs, layouts, or .xlsx workbook tabs

curvebook-cli info <file> [--list-sheets] [--json]
ArgumentRequiredDescription
<file>requiredInput .curvebook, .curvebook.d/, .cbtemplate, .prism, .pzfx, .xlsx, .csv, .tsv, or project .json path.
FlagDefaultDescription
--list-sheetsfalseEnumerate worksheet tab names and indices in an .xlsx workbook.
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).

commands

list registered engine commands with schemas, effects and shortcuts

curvebook-cli commands [--group <group>] [--json]
FlagDefaultDescription
--group <group>all groupsFilter by CommandGroup (project, edit, sheet, table, info, analysis, graph, layout, export).
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).

direct-command

execute a registered engine command directly with schema-typed flags

curvebook-cli <command-id> [--in <file>] [--out <file>] [--workdir <dir>] [--json] [--<param> <val> ...]
ArgumentRequiredDescription
<command-id>requiredRegistered engine command identifier (for example sheet.createData, stats.run, fit.run).
FlagDefaultDescription
--in <file>fresh empty sessionLoad an existing project or interchange file before executing the command.
--out <file>none (in-memory only)Write the resulting project or sheet export to <file> after execution.
--workdir <dir>unconstrained (current working directory)Confine all file reads, saves, exports, and external CSV/TSV links strictly within <dir>.
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).
--<param> <val>per-command schema defaultSchema-typed command parameter flag (--no-<param> negates boolean parameters).

run

execute a JSON-lines command stream headlessly

curvebook-cli run <script> [--workdir <dir>] [--json]
ArgumentRequiredDescription
<script>requiredPath to an NDJSON or JSON-array command script file, or - to read from stdin.
FlagDefaultDescription
--workdir <dir>unconstrained (current working directory)Confine all file reads, saves, exports, and external CSV/TSV links strictly within <dir>.
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).

batch

execute a curvebook.batch.v1 JSON manifest headlessly

curvebook-cli batch <manifest> [--workdir <dir>] [--json]
ArgumentRequiredDescription
<manifest>requiredPath to a curvebook.batch.v1 JSON manifest file, or - to read from stdin.
FlagDefaultDescription
--workdir <dir>unconstrained (current working directory)Confine all file reads, saves, exports, and external CSV/TSV links strictly within <dir>.
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).

convert

convert archives/unpacked .curvebook.d dirs or export tables and figures (curvebook, curvebook.d, svg, pdf, emf, png, tiff, csv, tsv, json)

curvebook-cli convert <in> <out> [--format <fmt>] [--sheet <id>] [--dpi <u16>] [--pdf-version <1.4|1.7>] [--ttf-font <path>] [--json]
ArgumentRequiredDescription
<in>requiredInput project archive, .curvebook.d/, template, or data file.
<out>optionalOutput path (may instead be passed via --out / -o).
FlagDefaultDescription
-o, --out <out>positional <out>Explicit output file or .curvebook.d directory path.
--format <fmt>inferred from <out> extensionExplicit target format (curvebook, curvebook.d, svg, pdf, emf, png, tiff, csv, tsv, json).
--sheet <id>first matching sheetTarget sheet ID or title to export.
--xlsx-sheets <names>all visible sheetsComma-separated .xlsx worksheet names to import from an input workbook.
--dpi <u16>300Rasterization resolution in dots per inch for png and tiff exports (18..=2400).
--pdf-version <1.4|1.7>1.7PDF specification level for pdf exports (1.4 or 1.7).
--ttf-font <path>noneOptional TrueType .ttf font file embedded as /FontFile2 in pdf exports.
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).

export

export a table, graph, layout, or project to svg, pdf, emf, png, tiff, csv, tsv, json, or .curvebook/.curvebook.d

curvebook-cli export <in> (<out> | --out <out>) [--format <fmt>] [--sheet <id>] [--dpi <u16>] [--pdf-version <1.4|1.7>] [--ttf-font <path>] [--json]
ArgumentRequiredDescription
<in>requiredInput project archive, .curvebook.d/, template, or data file.
<out>optionalOutput path (or supply --out <out> / -o <out>).
FlagDefaultDescription
-o, --out <out>positional <out>Explicit output file or .curvebook.d directory path.
--format <fmt>inferred from <out> extensionExplicit target format (curvebook, curvebook.d, svg, pdf, emf, png, tiff, csv, tsv, json).
--sheet <id>first matching sheetTarget sheet ID or title to export.
--xlsx-sheets <names>all visible sheetsComma-separated .xlsx worksheet names to import from an input workbook.
--dpi <u16>300Rasterization resolution in dots per inch for png and tiff exports (18..=2400).
--pdf-version <1.4|1.7>1.7PDF specification level for pdf exports (1.4 or 1.7).
--ttf-font <path>noneOptional TrueType .ttf font file embedded as /FontFile2 in pdf exports.
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).

bench

measure parse, recalculation, compilation and export timings

curvebook-cli bench <file> [--json]
ArgumentRequiredDescription
<file>requiredProject file to benchmark.
FlagDefaultDescription
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).

perf

run synthetic G12 performance checks

curvebook-cli perf [--json] [--require-release]
FlagDefaultDescription
--jsonfalseEmit structured JSON output (and structured JSON errors on failure).
--require-releasefalseFail immediately unless curvebook-cli was compiled in --release mode.

mcp

run the Model Context Protocol (MCP) server over stdio (--workdir and --control-port are mutually exclusive)

curvebook-cli mcp [--control-port <port>] [--gui-only] [--workdir <dir>] [--control-token <token>]
FlagDefaultDescription
--control-port <port>CURVEBOOK_CONTROL_PORT env or headlessAttach over loopback 127.0.0.1:<port> to a running curvebook --control <port> window (1..=65535; mutually exclusive with --workdir).
--gui-onlyfalseExpose strictly the human-equivalent gui MCP tools (GuiOnlyPolicy::Strict).
--workdir <dir>unconfinedConfine all MCP file/command paths strictly within directory <dir> (mutually exclusive with --control-port, which attaches to an external desktop host).
--control-token <token>CURVEBOOK_CONTROL_TOKEN env or control-<port>.tokenBearer token used to authenticate against a --control desktop listener.

Exit Codes

CodeConstantCondition
0EXIT_OKCommand completed cleanly.
1EXIT_RUNTIMERuntime, filesystem I/O, archive/format, solver, rendering, or engine execution error.
2EXIT_USAGE_OR_POLICYInvalid CLI syntax, unknown flag/command, malformed batch/script schema, or --workdir path containment violation.
130EXIT_INTERRUPTEDOperation cancelled or interrupted (SIGINT / ErrorCode::Cancelled).
Ready · Offline Desktop · CLI · Local MCP Pure Rust Zero Telemetry MIT / Apache-2.0