> Every Taji docs page as Markdown: https://docs.taji.is/llms.txt

# Configuration

Source of truth: `engine/`, `window/`, `agent/src/`, `substrate/`, `plugins/` (`engine/crates/taji/src/wire/settings.rs` for settings); `env_vars_documented` in `engine/crates/taji/tests/docs.rs` checks this page against the code both ways: a name here is read somewhere, and a name shipped code reads is here or on the test's short list of test, bench and packaging names.

Each variable and setting is one heading: what it does, its default and one snippet. The other `TAJI_` names in the tree belong to tests, benches, the packaging scripts and what one Taji process hands the next.

## Environment variables

Each snippet sets the variable for one launch; `taji` is the kernel binary (`target/debug/taji` in a source build), and `TAJI_HEADLESS=1` keeps the example off the window.

### `TAJI_STATE_DIR`

The state dir, where the kernel keeps every file of yours ([below](#state-dir-and-taji-home)). Its files are owner-only on Unix; on Windows they take the directory's ACL, so keep it under your profile.

Default: macOS `~/Library/Application Support/Taji`; Linux `~/.local/share/taji`, or `$XDG_DATA_HOME/taji` when that is absolute; Windows `%LOCALAPPDATA%\Taji`. Empty counts as unset.

```sh
TAJI_STATE_DIR="$(mktemp -d)" TAJI_HEADLESS=1 taji
```

### `TAJI_STORE_DIR`

The market data store.

Default: macOS and Linux `~/.local/share/taji/store`, on Linux `$XDG_DATA_HOME/taji/store` when that is absolute; Windows `%LOCALAPPDATA%\Taji\store`. Empty counts as unset.

```sh
TAJI_STORE_DIR="$(mktemp -d)" TAJI_HEADLESS=1 taji
```

### `TAJI_HOME`

Taji's home, which holds `skills` and `digest` ([below](#state-dir-and-taji-home)).

Default: `~/.taji`; Windows `%USERPROFILE%\.taji`. With no home directory and no `TAJI_HOME`, Taji says `no home directory is known: set TAJI_HOME to an absolute path`.

```sh
TAJI_HOME="$(mktemp -d)" TAJI_HEADLESS=1 taji
```

### `TAJI_STATELESS`

`1` keeps no desks, active desk or zone: every launch starts fresh.

Default: unset, so the kernel keeps them. Any value but `1` is unset.

```sh
TAJI_STATELESS=1 TAJI_HEADLESS=1 taji
```

### `TAJI_WIRE`

The wire's port. `0` takes a free port and writes it to `<state dir>/wire-port`, which every client reads.

Default: unset: a headless kernel opens no listener, and `taji ui`, `taji quit` and the bridge use 7780. A value that is no port, or a port already taken, ends the boot.

```sh
TAJI_WIRE=0 TAJI_HEADLESS=1 taji
```

### `TAJI_HEADLESS`

Set to any value, the kernel runs with no window.

Default: unset: bare `taji` is `taji ui`.

```sh
TAJI_HEADLESS=1 taji
```

### `TAJI_BIN`

The kernel binary the window and the bridge start; `taji ui` sets it to itself when it is unset.

Default: the packaged window's `resources/bin/taji`, and for the bridge the `taji` (`taji.exe` on Windows) beside its own binary. A source window with none quits and asks for it.

```sh
TAJI_BIN=/path/to/taji taji-mcp
```

### `TAJI_WINDOW`

The `window/` directory of a source tree, which `taji ui` runs as an unkeyed window instead of asking the kernel.

Default: unset: the package's window binary. A debug kernel finds `<repo>/window` itself.

```sh
TAJI_WINDOW="$PWD/window" taji ui
```

### `TAJI_UI_DIR`

Serves the page from this directory instead of the embedded bundle; a file it lacks is 404.

Default: unset: the bundle embedded in the kernel.

```sh
TAJI_UI_DIR="$PWD/ui/dist" TAJI_WIRE=0 TAJI_HEADLESS=1 taji
```

### `TAJI_UI_PLUGINS`

At the page's build, extra pane files or globs, colon-separated, from the repo root (`ui/plugins.vite.ts`).

Default: unset: no extra pane.

```sh
TAJI_UI_PLUGINS=ui/walk/hello.tsx pnpm --filter @taji/ui build
```

### `TAJI_UI_OUT`

At the page's build, the output directory.

Default: `dist`.

```sh
TAJI_UI_OUT="$(mktemp -d)" pnpm --filter @taji/ui build
```

### `TAJI_SYMBOL`

The first chart's symbol, an item such as `equity:SPY`. One that is no instrument refuses the boot.

Default: `equity:SPY`.

```sh
TAJI_SYMBOL=equity:AAPL TAJI_HEADLESS=1 taji
```

### `TAJI_TIMEFRAME`

The first chart's interval, as an interval word: `5m`, `4h`, `D`, `W`, `M`, `Y`.

Default: `D`; a word that is no interval reads as `D`.

```sh
TAJI_TIMEFRAME=4h TAJI_HEADLESS=1 taji
```

### `TAJI_SNAPSHOT`

A directory holding a desk recording (`TAJI_SNAPSHOT_OUT`'s): the kernel boots from it alone, opening no store, subscribing to nothing and trading from nothing. A directory that does not load boots with no desk.

Default: unset.

```sh
TAJI_SNAPSHOT="$PWD/recording" TAJI_HEADLESS=1 taji
```

### `TAJI_SNAPSHOT_OUT`

A directory the kernel writes the active desk's tree to when it quits, after its last flush.

Default: unset: nothing is written.

```sh
TAJI_SNAPSHOT_OUT="$PWD/recording" TAJI_HEADLESS=1 taji
```

### `TAJI_LOGO_URL`

The logo service the kernel relays symbol logos from. Empty turns logos off.

Default: `https://logos.taji.is`.

```sh
TAJI_LOGO_URL= TAJI_HEADLESS=1 taji
```

### `TAJI_NO_UPDATE_CHECK`

`1` never asks for an update.

Default: unset: the kernel asks at boot and every 24 hours. Any value but `1` is unset.

```sh
TAJI_NO_UPDATE_CHECK=1 TAJI_HEADLESS=1 taji
```

### `TAJI_NO_REPORT`

`1` refuses `report/send`: no report leaves this machine.

Default: unset. Any value but `1` is unset.

```sh
TAJI_NO_REPORT=1 TAJI_HEADLESS=1 taji
```

### `TAJI_PLUGINS`

A directory of process plugins, each with a `taji-plugin.toml` holding a `[process]` table ([plugins](https://docs.taji.is/plugins.md)).

Default: unset: no plugin loads from a directory.

```sh
TAJI_PLUGINS="$PWD/plugins" TAJI_HEADLESS=1 taji
```

### `TAJI_PYTHON`

The Python runtime the Python sources and plugins run on.

Default: the package's `python/` beside the kernel's `bin/`; a debug build's `<repo>/.python`.

```sh
TAJI_PYTHON="$PWD/.python" TAJI_HEADLESS=1 taji
```

### `TAJI_UNSANDBOXED`

`1`, in a debug build only, runs process plugins and Python sources with no confinement.

Default: unset: confined. A release build ignores it.

```sh
TAJI_UNSANDBOXED=1 TAJI_HEADLESS=1 target/debug/taji
```

### `TAJI_TAILSCALE_SIDECAR`

The `taji-tailscale` sidecar to run, in place of the one beside the kernel.

Default: `taji-tailscale` beside the kernel (`make dev` builds it there).

```sh
TAJI_TAILSCALE_SIDECAR="$PWD/target/debug/taji-tailscale" taji
```

### `TAJI_WHATSAPP_SIDECAR`

The `taji-whatsapp` sidecar to run, in place of the one beside the kernel; a `.ts` runs under `bun`.

Default: `taji-whatsapp` beside the kernel (`make dev` builds it there).

```sh
TAJI_WHATSAPP_SIDECAR="$PWD/plugins/whatsapp/sidecar/main.ts" taji
```

### `TAJI_REGISTRY_KEY`

The registry's ed25519 public key, 64 hex digits (`taji registry keygen <file>` prints one). A build with it set compiles it in; a debug build reads the environment first.

Default: unset. A release build sets none, so a released kernel installs from no registry.

```sh
TAJI_REGISTRY_KEY="$(taji registry keygen registry.key)" TAJI_HEADLESS=1 target/debug/taji
```

### `TAJI_OUTCOME_WAIT_MS`

Milliseconds a bridge call answered 202 waits for the venue's own answer.

Default: `15000`.

```sh
TAJI_OUTCOME_WAIT_MS=30000 taji-mcp
```

### `TAJI_BRIDGE`

The `taji-mcp` program the kernel registers with agent platforms.

Default: `taji-mcp` beside the kernel binary.

```sh
TAJI_BRIDGE=/path/to/taji-mcp taji
```

### `TAJI_REGISTER`

The `taji-register` program the kernel runs to register the bridge and the skill with agent platforms.

Default: `taji-register` beside the kernel binary, when it is there.

```sh
TAJI_REGISTER=/path/to/taji-register taji
```

## Set for a process plugin

The kernel sets three variables for a process plugin and reads none of them. The plugin's environment is these, `HOME` and `TMPDIR` in its own directories, and the proxy variables, none of the kernel's ([`taji-plugin/1`](https://docs.taji.is/plugins/protocol.md#the-process) lists each). Each snippet is the plugin reading it, in Python.

### `TAJI_PLUGIN`

The plugin's id.

Default: always set.

```python
os.environ["TAJI_PLUGIN"]
```

### `TAJI_RELAY`

`1` when the manifest declares sign-in: the relay is at `HTTP_PROXY`'s address.

Default: unset.

```python
relay = os.environ.get("TAJI_RELAY") == "1"
```

### `TAJI_SITE`

The directory of the plugin's locked Python packages.

Default: unset: the plugin has no locked Python environment.

```python
os.environ["TAJI_SITE"]
```

## Settings

`<state dir>/settings.json` is one JSON object, read with `GET /read/ui/settings` and written with `POST /verb/ui/settings/set {"key", "value"}`; `null` removes a key. A key is 1 to 128 of `a-z 0-9 . _ -`; a value is at most 256 KiB, the file 4 MiB; an unparsable file moves to `settings.json.bad` and the kernel starts empty. Each snippet is the key as the file holds it. The window keeps its own memory (panel sizes, favourites, templates) under other `taji.` keys.

### `data.<id>`

`false` turns that source's data off; its accounts stay linked.

Default: unset, so the source is on; `true` and `null` turn it on.

```json
{"data.yahoo": false}
```

### `taji.trading`

The chart's Trading settings, an object. Its `one_click` is the one gate before an order is sent unconfirmed; an agent's set waits for your approval.

Default: unset: `one_click` is `false`.

```json
{"taji.trading": {"one_click": false}}
```

### `taji.plugins.registry`

The local registry plugins install from, an absolute `file://` directory; an agent's set waits for your approval.

Default: unset: none, and `GET /read/plugins/index` answers `503 no_registry`.

```json
{"taji.plugins.registry": "file:///path/to/registry"}
```

### `taji.keys`

The hotkeys you changed: an object of shortcut id to chord, `null` for no key; an agent's set waits for your approval.

Default: unset: each shortcut's own chord.

```json
{"taji.keys": {"alert": null}}
```

### `update_url`

A page naming the latest version, as `{"version": "x.y.z"}` or GitHub's `{"tag_name": "vx.y.z"}`; an agent's set waits for your approval.

Default: the URL the build carries: GitHub's latest-release API in an installer, none in a source build. `""` asks nothing.

```json
{"update_url": ""}
```

### `report_url`

The site a report goes to on your yes; an agent's set waits for your approval.

Default: unset: none, and `report/send` answers 409 `report_url`.

```json
{"report_url": "https://example.com/reports"}
```

### `ui.display_tz`

The zone every time is shown in, an IANA name; the kernel keeps it.

Default: `America/New_York`.

```json
{"ui.display_tz": "Europe/London"}
```

### `desks.active`

The active desk's id; the kernel keeps it.

Default: unset: the first desk.

```json
{"desks.active": "<desk id>"}
```

### `desks.order`

The desks' ids, comma-joined, in their order (`POST /verb/desks/order` sets it); the kernel keeps it.

Default: unset: the order the desks load in.

```json
{"desks.order": "<desk id>,<desk id>"}
```

### `chart.session.equity`

The session last chosen on an equity chart, which the next equity chart opens on: `regular`, `extended`, `24h`, `pre` or `post`.

Default: unset: the `default_session` of `GET /read/data/coverage/equity`.

```json
{"chart.session.equity": "24h"}
```

### `chart.session.future`

The session last chosen on a future's chart, which the next one opens on; the words are the equity key's.

Default: unset: the `default_session` of `GET /read/data/coverage/future`.

```json
{"chart.session.future": "regular"}
```

### `plugin.<id>.…`

A plugin pane's own keys, 256 KiB per plugin together; a pane writes only its own plugin's.

Default: unset.

```json
{"plugin.acme.mode": "compact"}
```

## State dir and Taji home

The state dir holds:

- `taji.lock`, `version`, `wire-port`, `wire-token` and `agent-token` (new each launch), `taji.log`, `ui.log`, `boot.err` (the stderr of a kernel `taji ui` started, new each start: why one that left before its log opened did), `settings.json`, `agent.json` (when the first MCP request came), `agent-panel.json` (each desk's Agent chats, titles and pins), `agent-text/` (each kept chat's text, for the left bar's search; deleted with its chat or desk), `vault.json` (the vault's lock timer)
- `plugins.json` (the installed plugins' records), `plugins/<id>/` (an installed plugin's package and a process plugin's home), `sources/` (each source's records), `python/` (locked Python environments)
- `secrets/vault.taji`, `accounts/`, `journal/<account>.jsonl`, `sim/` (the `taji_sim` book), `halt/`, `exits.json`, `reports/`
- `desks/<slug>/`: `desk.json`, `layout.json`, `notes.jsonl`, `DESK.md`, `documents/`, `indicators/`
- `electron/`, the window's profile
- `remote.json` (the paired phones' passkeys), `whatsapp/` and `tailscale/` (the linked-device and node sessions), `install-id`, `loopback-cert.pem` and `loopback-key.pem` (the sign-in callback's certificate), `taji.log.1` (the last run's log), `window.log`, `vault.create.lock`; a problem report's `sent.json` sits beside its `report.json` in `reports/<id>/`
- `adapters/` (the agent adapters Taji installed), `codex/`, `grok/` and `antigravity/` (the homes those agents run in, their session transcripts with them), `agent-login.command` or `agent-login.cmd` (the script that opens an agent's own sign-in)

Only `secrets/vault.taji` is encrypted: every other file is plain, and a backup or sync of the state dir copies it as it is.

The agent's working folders are outside the state dir: `taji-agent/<hash>/<desk>/`, one folder per desk (an agent's own settings for it land there), in the OS's local data dir (`~/Library/Application Support/taji-agent` on macOS, `~/.local/share/taji-agent` on Linux, `%LOCALAPPDATA%\taji-agent` on Windows). Claude Code files each chat's session in its own `~/.claude`.

The Taji home holds `skills` and `digest`, laid at boot from a packaged build's resources; a source build lays nothing, and its agents read `agent/skills/taji`.

## Ports and tokens

Every listener is on `127.0.0.1`. The wire is one port, `TAJI_WIRE`, which serves the page at `/app/`. A process plugin whose manifest names hosts or a relay gets a proxy on a free port only its sandbox reaches. A sign-in through your own app opens a loopback at your registered callback (default `https://127.0.0.1:8182`) while it waits.

Each launch mints four tokens. `wire-token` (scope `local`: the window, `taji quit`, `taji-link`, scripts) and `agent-token` (scope `agent`: the MCP bridge) are files in the state dir, readable by their owner only. The `page` and `sheet` tokens are never written: each is bought with a nonce the window's main process mints under the local token. A relaunch retires all four. What each scope may call: `docs/reference/wire.md`.
