cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

main
012 / docs / reference / command-line.md
command-line.md 5.4K rendered
1---2title: "Command line"3sidebar_position: 64---56# Command line78Every way to start 012, with the page that describes each. A file named9like a command (`get`, `diff`) opens as `./get`.1011## With the screen1213| Command | Does |14|---|---|15| `012 [flags] [file]` | Opens a `.012` workbook (created on saving when it doesn't exist), or imports another format: [Files](../files/README.md) |16| `012 [flags] -` | A table from standard input: [Pipelines](../nushell/pipelines.md) |17| `012 [flags] --listen [file]` | Lets agents work in the session with you, attached with `012 mcp --attach`: [Live mode](../agents/live.md) |18| `012 [flags] --pipe [--to nuon\|json\|csv\|tsv] [--send ask\|selection\|sheet] [file]` | On quitting, sends a table to standard output: [Pipelines](../nushell/pipelines.md) |19| `012 nu [flags] [file]` | A nushell notebook, at its prompt: [Notebooks](../nushell/notebooks.md) |20| `012 serve [flags] [dir]` | Serves the sheets in a directory over SSH: [Serving over SSH](../terminal/ssh.md) |2122The flags are the options' flags, listed in [Configuration](config.md#options).2324## Without the screen2526| Command | Does |27|---|---|28| `012 get file.012 [ref]` | Writes a cell's value, or a range or sheet as a table: [Scripts](../files/scripts.md#get) |29| `012 set file.012 ref input [ref input ...]` | Types entries into cells and saves, or with `--dry-run` prints the change: [Scripts](../files/scripts.md#set) |30| `012 recalc file.012` | Recalculates, saves and lists the cells showing errors: [Scripts](../files/scripts.md#recalc) |31| `012 export file.012 out [ref]` | Writes the workbook, a sheet or a range in another format: [Scripts](../files/scripts.md#export) |32| `012 describe file.012` | Lists the sheets and what's on them: [Agents](../agents/README.md#with-a-shell) |33| `012 mcp [file.012]` | Serves the workbooks in the folders open to it to MCP hosts over standard input and output: [MCP server](../agents/mcp.md) |34| `012 mcp --attach [name\|socket]` | Joins a running 012 listening for agents, as the agent's MCP server: [Live mode](../agents/live.md#starting) |35| `012 diff a.012 b.012` | Lists what changed, cell by cell: [Diff and merge in git](../files/git.md#012-diff) |36| `012 diff --textconv file.012` | Writes a workbook as lines, for git's textconv: [Diff and merge in git](../files/git.md#git) |37| `012 merge-driver base ours theirs [path]` | Merges theirs into ours, for git: [Diff and merge in git](../files/git.md#merging) |38| `012 nu --module`, `012 nu --install-module [--force] [path]` | Prints or installs the nushell module: [Nushell](../nushell/README.md#install-the-sheet-command) |39| `012 agent --skill`, `012 agent --install-skill [--force] [dir]` | Prints or installs the Claude Code skill: [Agents](../agents/README.md#the-claude-code-skill) |40| `012 agent --install-mcp claude-code\|claude-desktop\|codex [--root dir]... [--print]` | Adds `012 mcp` to a host's configuration, or prints the entry: [MCP server](../agents/mcp.md#adding-it-to-a-host) |41| `012 config [path\|edit\|default\|themes\|set-key\|delete-key]` | The settings: [Configuration](config.md#commands) |42| `012 version [--format text\|json\|nuon]` | Prints the version |4344`get`, `set`, `recalc`, `export`, `describe`, `mcp`, `diff`,45`merge-driver` and `agent` take their flags anywhere after the command's name, and `--help` prints their46usage. `--` ends the flags, so what follows is taken as it is47(`012 set book.012 -- A1 --`), and an argument such as `-5` is never a48flag.4950| Flag | Commands | Does |51|---|---|---|52| `--format text\|csv\|tsv\|json\|nuon` | `get` | The form of what's written; text by default |53| `--input` | `get` | What was typed (a formula) rather than its value |54| `--no-header` | `get` | JSON and NUON columns named by their letters, the first row a record |55| `--force` | `set` | Sets cells in protected ranges |56| `--dry-run` | `set` | Prints what would change, as `012 diff` would, and saves nothing |57| `--format text\|json\|nuon` | `set`, `recalc`, `describe`, `merge-driver`, `version` | The result as text, or as [JSON or NUON](json.md) |58| `--report json\|nuon` | `export` | Writes what was exported as [JSON or NUON](json.md#export) |59| `--format kind`, `--table name` | `export` | The format when the file's extension doesn't say; SQLite's table |60| `--chart n\|title` | `export` | One chart of the sheet as a web page, by its number or title |61| `--notebooks` | `get`, `recalc`, `export`, `describe` | Runs the notebooks' cells first, when the file is trusted here |62| `--trust` | with `--notebooks` | Runs the cells of a file saved on another computer |63| `--root dir`, `--read-only`, `--force`, `--notebooks`, `--jev` | `mcp` | The folders open to it, the tools offered and what they may do: [MCP server](../agents/mcp.md#flags) |64| `--jev` | `get`, `recalc`, `export`, `describe` | Asks JEV for the JEV functions' answers first |65| `--format text\|json\|nuon` | `diff` | The form of the changes; text by default |66| `--color auto\|always\|never` | `diff` | Colors the text; auto colors on a terminal or git's pager unless `NO_COLOR` is set |6768## Exit status6970| Status | Means |71|---|---|72| 0 | Done; for `diff`, the workbooks are the same |73| 1 | An error, said on standard error; for `recalc`, cells show errors (after saving); for `diff`, the workbooks differ; for `merge-driver`, conflicts; for `get`, `recalc` and `export` with `--notebooks`, a notebook cell failed (after writing) |74| 2 | The command was used wrongly (its usage is printed); for `diff` and `merge-driver`, trouble reading or merging the files |