1---2title: "Configuration"3sidebar_position: 44---56# Configuration78012 reads one settings file, in the style of Ghostty's:910| OS | File |11|---|---|12| Linux, BSD | `$XDG_CONFIG_HOME/012/config`, usually `~/.config/012/config` |13| macOS | `~/Library/Application Support/012/config`, or `$XDG_CONFIG_HOME/012/config` when that's set |14| Windows | `%AppData%\012\config`, or `%XDG_CONFIG_HOME%\012\config` when that's set |1516```17# ~/.config/012/config18theme = light:Builtin Solarized Light,dark:Dracula19chart-images = true20jev-api-key-command = op read op://Private/TypeSafe/credential21config-file = ?local.conf22```2324- One `key = value` per line. `#` starts a comment line; blank lines are25 ignored. Quote a value (`" like this "`) to keep spaces at its ends.26- An empty value (`theme =`) puts an option back to its default.27- `config-file = path` reads another file after this one, relative to this28 file's directory; its settings win over the ones around it. A leading29 `?` (`config-file = ?local.conf`) makes it optional. Includes can nest;30 a file that includes itself is skipped with a warning.31- Unknown keys, bad values and missing includes never stop 012: it starts32 with the defaults for those options and says what's wrong on the context33 line (and in `012 config`).3435Settings are process-wide. Settings that belong to a workbook, such as36decimal arithmetic and its locale, are saved in the workbook's `.012` file37instead; `locale` here is the default for workbooks without one.3839**Precedence:** command-line flags win over environment variables, which40win over the config file, which wins over the defaults. `012 config` shows41where each value came from.4243**Secrets never go in this file.** The JEV API key lives in the OS44credential store or comes from a command; see [JEV setup](../formulas/jev.md#setup).4546## Commands4748| Command | Does |49|---|---|50| `012 config` | print the settings in effect, each with where it came from (file and line, variable, flag or default), secrets redacted, then any warnings |51| `012 config path` | print the config file's path |52| `012 config edit` | open the file in `$VISUAL` or `$EDITOR`, creating it with every option commented out if it doesn't exist |53| `012 config default` | print a config file with every option at its default, commented out and described |54| `012 config themes` | list the themes: built in and in the themes directory |55| `012 config set-key` | store the JEV API key in the credential store, read from the terminal without echo or from stdin |56| `012 config delete-key` | remove the JEV API key from the credential store |5758In the app, File > Settings has **Theme** (a picker with live preview),59**Open config file** (in your editor, reloading when it closes),60**Reload config** and **JEV API key** (stored, then checked with one test61call: see [JEV functions](../formulas/jev.md#setup)). Reloading applies the options marked62"File > Settings > Reload config" below; the rest take effect on the next63start.6465## Options6667<!-- Generated from internal/config/registry.go by `go test ./internal/config -update-docs`. Don't edit below. -->6869| Option | Default | Environment, flag |70|---|---|---|71| [`theme`](#theme) | `terminal` | `O12_THEME`, `--theme` |72| [`chart-images`](#chart-images) | `true` | `O12_CHART_IMAGES` |73| [`notifications`](#notifications) | `true` | `O12_NOTIFICATIONS` |74| [`keymap`](#keymap) | `default` | `O12_KEYMAP` |75| [`locale`](#locale) | `en-US` | `O12_LOCALE` |76| [`max-cells`](#max-cells) | `10000000` | `O12_MAX_CELLS` |77| [`shell`](#shell) | `ask` | `O12_SHELL` |78| [`nu-timeout`](#nu-timeout) | `30s` | `O12_NU_TIMEOUT` |79| [`nu-config`](#nu-config) | `false` | `O12_NU_CONFIG` |80| [`nu-save-cell-kb`](#nu-save-cell-kb) | `1024` | `O12_NU_SAVE_CELL_KB` |81| [`nu-save-notebook-kb`](#nu-save-notebook-kb) | `8192` | `O12_NU_SAVE_NOTEBOOK_KB` |82| [`jev-api-key-command`](#jev-api-key-command) | | |83| [`jev-credential-store`](#jev-credential-store) | `true` | `O12_JEV_CREDENTIAL_STORE` |84| [`jev-base-url`](#jev-base-url) | | `TYPESAFE_BASE_URL` |85| [`jev-model`](#jev-model) | | `TYPESAFE_DEFAULT_MODEL` |86| [`log-file`](#log-file) | | `O12_LOG`, `--log` |87| [`log-level`](#log-level) | `info` | `O12_LOG_LEVEL` |88| [`otlp-endpoint`](#otlp-endpoint) | | `OTEL_EXPORTER_OTLP_ENDPOINT`, `--otlp` |89| [`serve-listen`](#serve-listen) | `127.0.0.1:2312` | |90| [`serve-authorized-keys`](#serve-authorized-keys) | `~/.ssh/authorized_keys` | |91| [`serve-host-key`](#serve-host-key) | | |92| [`serve-idle-timeout`](#serve-idle-timeout) | `30m` | |93| [`serve-max-sessions`](#serve-max-sessions) | `8` | |94| [`serve-share`](#serve-share) | `edit` | |95| [`serve-shell`](#serve-shell) | `false` | |96| [`config-file`](#config-file) | | |9798### Appearance99100#### `theme`101102Colors. `terminal` uses the terminal's own 16-color palette. `high-contrast` draws white on black or black on white by the terminal's background, with WCAG AAA contrast. Any other name is a terminal color scheme, built in (`012 config themes` lists them) or a file in the themes directory, drawn in its own colors with solid menu and status bars. `light:NAME,dark:NAME` picks one by the terminal's background and follows it when it changes.103104| | |105|---|---|106| Type | text |107| Default | `terminal` |108| Environment | `O12_THEME` |109| Flag | `--theme` |110| Applies | File > Settings > Reload config |111112#### `chart-images`113114Draw charts as images on terminals with kitty graphics (kitty, Ghostty, WezTerm) or, outside tmux, sixel graphics (foot, xterm, mlterm, Windows Terminal). When false, charts are always text.115116| | |117|---|---|118| Type | true or false |119| Default | `true` |120| Environment | `O12_CHART_IMAGES` |121| Applies | File > Settings > Reload config |122123#### `notifications`124125Send a desktop notification (OSC 9) when JEV answers or an import finishes while the terminal window is in the background.126127| | |128|---|---|129| Type | true or false |130| Default | `true` |131| Environment | `O12_NOTIFICATIONS` |132| Applies | File > Settings > Reload config |133134#### `keymap`135136Keys in the grid. `default` works like Google Sheets; `vim` adds hjkl, counts, operators, visual selection and a : command line (File > Settings > Vim keys).137138| | |139|---|---|140| Type | one of `default`, `vim` |141| Default | `default` |142| Environment | `O12_KEYMAP` |143| Applies | File > Settings > Reload config |144145### Data146147#### `locale`148149How new sheets and files without a locale of their own are typed and shown: decimal and thousands separators, date order, the currency symbol and the formula argument separator (`;` where the decimal separator is a comma), as in Sheets' File > Settings > Locale, which sets a file's own. Files store the same thing in every locale. When unset, the POSIX locale (`LC_ALL`, `LC_NUMERIC`, then `LANG`, e.g. `de_DE.UTF-8`) picks it if it's one of these.150151| | |152|---|---|153| Type | one of `en-US`, `en-GB`, `en-CA`, `en-AU`, `de-DE`, `de-CH`, `fr-FR`, `fr-CA`, `es-ES`, `es-MX`, `it-IT`, `pt-BR`, `pt-PT`, `nl-NL`, `sv-SE`, `da-DK`, `nb-NO`, `fi-FI`, `pl-PL`, `cs-CZ`, `ru-RU`, `tr-TR`, `ja-JP`, `zh-CN` |154| Default | `en-US` |155| Environment | `O12_LOCALE` |156| When unset | `LC_ALL`, `LC_NUMERIC`, `LANG` |157| Applies | File > Settings > Reload config |158159#### `max-cells`160161The most cells an import keeps, and a paste or fill writes at once. Numbers and text take 20 to 60 bytes a cell and formulas about 750, so the default of ten million cells of data is 200 to 600 MB. Imports keep whole rows up to the budget and say how many they left out; larger pastes and fills are refused. A function that holds what it reads (SORT, TEXTJOIN) is given no more of a linked source. The grid itself is 1,048,576 rows by 16,384 columns (A to XFD) whatever this is.162163| | |164|---|---|165| Type | number |166| Default | `10000000` |167| Environment | `O12_MAX_CELLS` |168| Applies | File > Settings > Reload config |169170### Nushell notebooks171172#### `shell`173174Whether notebooks run their code cells (docs/nushell/notebooks.md). `ask` runs what you write and asks once before running the cells of a file made on another computer; `on` never asks; `off` runs none. Opening a file never runs its cells.175176| | |177|---|---|178| Type | one of `off`, `ask`, `on` |179| Default | `ask` |180| Environment | `O12_SHELL` |181| Applies | File > Settings > Reload config |182183#### `nu-timeout`184185Stop a notebook cell that runs longer than this; 0 lets it run until Stop (i i) stops it.186187| | |188|---|---|189| Type | duration |190| Default | `30s` |191| Environment | `O12_NU_TIMEOUT` |192| Applies | File > Settings > Reload config |193194#### `nu-config`195196Run notebook cells with your nushell config files (config.nu, env.nu) rather than `nu --no-config-file`, for your own commands and aliases.197198| | |199|---|---|200| Type | true or false |201| Default | `false` |202| Environment | `O12_NU_CONFIG` |203| Applies | File > Settings > Reload config |204205#### `nu-save-cell-kb`206207The largest output of one cell a saved file keeps, in kilobytes of NUON; a larger one is left out and shows `not saved; run to see` when the file is opened.208209| | |210|---|---|211| Type | number |212| Default | `1024` |213| Environment | `O12_NU_SAVE_CELL_KB` |214| Applies | File > Settings > Reload config |215216#### `nu-save-notebook-kb`217218How much of all its cells' outputs a saved file keeps, in kilobytes of NUON: the outputs that fit, in the notebook's order.219220| | |221|---|---|222| Type | number |223| Default | `8192` |224| Environment | `O12_NU_SAVE_NOTEBOOK_KB` |225| Applies | File > Settings > Reload config |226227### JEV functions228229#### `jev-api-key-command`230231A command that prints the TypeSafe API key, used when TYPESAFE_API_KEY isn't set and the credential store has no key, e.g. `op read op://Private/TypeSafe/credential` or `pass show typesafe`. It runs the first time a sheet asks JEV something, without a shell, for up to 10 seconds, and its first line of output is the key; for pipes, write `sh -c '...'` yourself. The key itself never goes in this file.232233| | |234|---|---|235| Type | command |236| Default | (empty) |237| Applies | restart 012 |238239#### `jev-credential-store`240241Look for the API key in the OS credential store (macOS Keychain, Windows Credential Manager, the Secret Service on Linux), where `012 config set-key` and Settings put it.242243| | |244|---|---|245| Type | true or false |246| Default | `true` |247| Environment | `O12_JEV_CREDENTIAL_STORE` |248| Applies | restart 012 |249250#### `jev-base-url`251252The TypeSafe service to ask; the SDK's default when empty. Must be https, except on localhost.253254| | |255|---|---|256| Type | URL |257| Default | (empty) |258| Environment | `TYPESAFE_BASE_URL` |259| Applies | restart 012 |260261#### `jev-model`262263The JEV model to ask; the service's default when empty.264265| | |266|---|---|267| Type | text |268| Default | (empty) |269| Environment | `TYPESAFE_DEFAULT_MODEL` |270| Applies | restart 012 |271272### Telemetry273274#### `log-file`275276Append telemetry events to this JSON log file. See docs/contributing/observability.md.277278| | |279|---|---|280| Type | path |281| Default | (empty) |282| Environment | `O12_LOG` |283| Flag | `--log` |284| Applies | restart 012 |285286#### `log-level`287288The least severe telemetry event recorded; debug adds every frame and command.289290| | |291|---|---|292| Type | one of `debug`, `info`, `warn`, `error` |293| Default | `info` |294| Environment | `O12_LOG_LEVEL` |295| Applies | restart 012 |296297#### `otlp-endpoint`298299Send telemetry to this OTLP/HTTP collector, e.g. http://localhost:4318. The other OTEL_* variables still apply.300301| | |302|---|---|303| Type | URL |304| Default | (empty) |305| Environment | `OTEL_EXPORTER_OTLP_ENDPOINT` |306| Flag | `--otlp` |307| Applies | restart 012 |308309### 012 serve310311#### `serve-listen`312313The address 012 serve listens on. Anything but the loopback address lets other machines reach it (with an authorized key). See docs/terminal/ssh.md.314315| | |316|---|---|317| Type | host:port |318| Default | `127.0.0.1:2312` |319| Applies | restart 012 |320321#### `serve-authorized-keys`322323The public keys allowed to log in to 012 serve, in OpenSSH's authorized_keys format.324325| | |326|---|---|327| Type | path |328| Default | `~/.ssh/authorized_keys` |329| Applies | restart 012 |330331#### `serve-host-key`332333012 serve's private host key, generated when missing; ssh_host_ed25519_key in the config directory when empty.334335| | |336|---|---|337| Type | path |338| Default | (empty) |339| Applies | restart 012 |340341#### `serve-idle-timeout`342343End a 012 serve session that has had no input for this long; 0 never does.344345| | |346|---|---|347| Type | duration |348| Default | `30m` |349| Applies | restart 012 |350351#### `serve-max-sessions`352353How many 012 serve sessions may run at once; more are turned away.354355| | |356|---|---|357| Type | number |358| Default | `8` |359| Applies | restart 012 |360361#### `serve-share`362363Whether 012 serve sessions opening the same file share its workbook: edit, everyone edits; view, one writes and the others follow until writing is handed over; off, each session has its own copy.364365| | |366|---|---|367| Type | one of `edit`, `view`, `off` |368| Default | `edit` |369| Applies | restart 012 |370371#### `serve-shell`372373Let 012 serve sessions run notebooks' code cells, as the user 012 serve runs as, following the shell option. Off, served notebooks show their cells and saved outputs but run nothing.374375| | |376|---|---|377| Type | true or false |378| Default | `false` |379| Applies | restart 012 |380381### Config files382383#### `config-file`384385Read another config file after this one, relative to this file's directory. A leading `?` makes it optional: no warning when it doesn't exist.386387| | |388|---|---|389| Type | path |390| Default | (empty) |391| Repeatable | yes |392| Applies | restart 012 |