wb CLI for .xlsx files.
Read workbook ranges, edit cells, create files, trace dependencies, and recalculate formulas from the command line. Output defaults to readable text; switch to JSON, Markdown, or CSV when you need a machine or table-friendly format.
Install one binary and use it in scripts, CI, or other tools.
go install github.com/jpoz/werkbook/cmd/wb@latest $ wb read --range A1:D5 --format json report.xlsx { "ok": true, "command": "read", "data": { "sheet": "Summary", "range": "A1:D5", "rows": [ ... ] }, "meta": { "schema_version": "wb.v1" } } $ wb edit --format json --patch '[{"cell":"B2","value":150000}]' report.xlsx { "ok": true, "command": "edit", "data": { "applied": 1, "failed": 0, "saved": true } }
Commands for common workbook tasks.
The CLI reads workbook data, edits files, creates new workbooks, recalculates formulas, traces dependencies, and can return structured results when you need them.
Readable text by default, JSON when needed
Default mode stays readable for terminal use. Switch to --format json or --mode agent when scripts need a stable envelope.
Read, edit, create, recalculate, and trace
The command set covers the normal workbook lifecycle and formula graph inspection without handing work off to another spreadsheet app.
Errors include a code and hint
Error output includes a code, message, and hint so it is easier to recover in scripts.
Choose text, JSON, Markdown, or CSV
Use text for terminal work, JSON for tools, Markdown for readable tables, or CSV for simple downstream processing.
Common workbook tasks are direct commands
Inspect files, patch cells, trace formula graphs, and recalculate workbooks from one binary.
$ wb info budget.xlsx // discover sheets, ranges, dimensions
$ wb edit \ --patch '[{"cell":"B2","value":150000}]' budget.xlsx
$ wb dep --cell D15 --depth -1 budget.xlsx // trace precedents and dependents
Commands return structured results
Use --format json or --mode agent when scripts should read top-level fields directly instead of parsing human prose.
{ "ok": true, "command": "read", "data": { ... }, "meta": { ... } }
Choose the output format you need
Formula recalculation is built in
Reads and writes are not wrappers over another spreadsheet app. The binary includes the same formula engine as the Go library.
statistics
text
date
logic
lookup
Single binary, no external runtime
One binary, no office runtime, no Python dependency, and no sidecar services.
dependencies: 0 external
target: macOS / Linux / Windows
Use the CLI in three steps.
Install wb, inspect or edit a workbook, then recalculate and return the result.
Install the binary
Pull the CLI into your Go toolchain with a single command.
go install github.com/jpoz/werkbook/cmd/wb@latest Inspect or edit workbook ranges
Read cells for context, then patch only the fields you need to change.
Recalculate and return results
Run the built-in formula engine and emit readable text, JSON, Markdown, or CSV.
$ go install github.com/jpoz/werkbook/cmd/wb@latest $ wb read --range A1:D5 --format markdown budget.xlsx $ wb edit --patch '[{"cell":"B2","value":150000}]' budget.xlsx $ wb calc --range D15 --format json budget.xlsx
CLI docs, examples, and library API.
Start with the command reference, then move to examples or the Go API.
go install github.com/jpoz/werkbook/cmd/wb@latest