mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 10:46:50 -06:00
M1: Excel-style egui UI, desktop app, chart renderer, MCP server, CLI, release packaging
- ui-egui: title bar with QAT, full ribbon (Home/Insert/Draw/Page Layout/Formulas/Data/ Review/View/Automate + Table/Chart Design), formula bar with Name Box, virtualised grid (frozen panes, overflow, borders, CF data bars/scales/icons, tables, sparklines, filter buttons, charts/pictures/shapes), in-cell editor with point mode, reference colouring, autocomplete and argument hints, sheet tabs, status bar, dialogs, control channel - apps/sheetcraft: desktop app (control server, file dialogs, prefs, drag & drop) - chart: toolkit-free chart layout/rendering for 25 chart kinds + sparklines + rasteriser - mcp + sheetcraft-cli: MCP server (headless or bridged) and CLI (info/convert/eval/cat/run/mcp) - xtask (ci/layers/assets/wasm/version/parity), release workflows, packaging, placeholder icon - automatic row heights Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1ba9daa263
commit
beb353943e
+46
@@ -0,0 +1,46 @@
|
||||
# sheetcraft-cli
|
||||
|
||||
Headless SheetCraft: inspect, convert, evaluate, script and serve MCP without a window. Errors go to stderr with a
|
||||
non-zero exit code.
|
||||
|
||||
```sh
|
||||
cargo install --path apps/sheetcraft-cli # or: cargo run -p sheetcraft-cli -- <subcommand>
|
||||
```
|
||||
|
||||
| Subcommand | Example |
|
||||
|---|---|
|
||||
| `info <file> [--json]` | `sheetcraft-cli info book.xlsx` — sheets, used ranges, cell counts, tables, charts, names. |
|
||||
| `convert <in> <out> [--sheet NAME]` | `sheetcraft-cli convert book.xlsx data.csv --sheet Sales` — output format from the extension: `.xlsx`, `.csv`, `.tsv`, `.json`, `.html`. |
|
||||
| `eval <formula> [--in FILE] [--sheet S] [--cell A1] [--json]` | `sheetcraft-cli eval '=PMT(5%/12,360,-300000)'`; `sheetcraft-cli eval '=SUM(B2:B9)' --in book.xlsx` |
|
||||
| `cat <file> [--range R] [--sheet S] [--formulas] [--csv]` | `sheetcraft-cli cat book.xlsx --range A1:F20` — aligned table of displayed values. |
|
||||
| `run …` | see below |
|
||||
| `commands [--json] [--search X]` | `sheetcraft-cli commands --search border` — every command with its parameter docs. |
|
||||
| `functions [--json] [--search X] [--category C]` | `sheetcraft-cli functions --search lookup` |
|
||||
| `mcp [--connect PORT] [--in FILE \| --sample NAME]` | MCP server on stdio ([mcp.md](mcp.md)). |
|
||||
| `send <port> <method> [json]` | `sheetcraft-cli send 7979 engine.execute '{"command":"home.bold","params":{"range":"A1:C1"}}'` — one control-channel request to a running app (`sheetcraft --control 7979`). |
|
||||
| `version` | Prints `sheetcraft-cli <version>`. |
|
||||
|
||||
## `run`
|
||||
|
||||
```sh
|
||||
sheetcraft-cli run [--in FILE | --sample budget|sales|grades] \
|
||||
[--cmd 'id={json}']... [--script steps.jsonl] \
|
||||
[--out FILE] [--print RANGE|used] [--sheet S] [--csv] [--formulas] [--quiet]
|
||||
```
|
||||
|
||||
Opens a file (or a sample, or a blank workbook), runs `--cmd` and `--script` steps in the order given, then saves
|
||||
`--out` and prints each `--print` range. Each non-null command result is printed as a JSON line unless `--quiet`.
|
||||
The first failing step stops the run with a non-zero exit.
|
||||
|
||||
A `--cmd` is `id`, `id={json}` or `id {json}`. A script has one command per line in the same forms, or as JSON objects
|
||||
`{"command": "cell.set", "params": {...}}`; blank lines and `#` comments are skipped.
|
||||
|
||||
```sh
|
||||
sheetcraft-cli run --in book.xlsx \
|
||||
--cmd 'home.bold={"range":"A1:C1"}' \
|
||||
--cmd 'cell.set={"cell":"D2","input":"=B2*C2"}' \
|
||||
--cmd 'edit.fillDown={"range":"D2:D20"}' \
|
||||
--out book.xlsx --print A1:D5
|
||||
```
|
||||
|
||||
Command ids and parameters: `sheetcraft-cli commands`.
|
||||
Reference in New Issue
Block a user