> Documentation index: https://docs.kiste.run/llms.txt, a list of every page in this documentation.

# Configuration and environment

> Where the CLI keeps its sign-in, SSH key and settings, every environment variable, and kiste config.

## Files

The CLI keeps its state in one directory, readable only by you:

| System | Directory |
| --- | --- |
| macOS, Linux | `~/.config/kiste` (or `$XDG_CONFIG_HOME/kiste`) |
| Windows | `%APPDATA%\Kiste` |

| File | Contents |
| --- | --- |
| `session.json` | Settings such as the current Kiste; the sign-in token only when no credential store is used |
| `ssh/id_ed25519` | This computer's SSH key, its [device key](https://docs.kiste.run/ssh/devices.md) |
| `ssh/known_hosts` | The pinned host keys of your Kisten |
| `ssh_config` | The SSH entry for `NAME.kiste`, see [SSH configuration](https://docs.kiste.run/ssh/ssh-config.md) |
| `logs/cli.jsonl` | The [local command log](https://docs.kiste.run/cli/output.md#the-local-command-log) |
| `command-logs/` | Local transcripts of commands this computer started |

The sign-in token is stored in the system's credential store when there is one
(macOS Keychain, Windows Credential Manager, the Secret Service on a Linux
desktop), otherwise in `session.json` with mode `0600`.

Signing in also adds one managed `Include` line at the top of `~/.ssh/config`,
so `ssh NAME.kiste` works; signing out removes it. Nothing else in your SSH
configuration is changed.

## kiste config

```bash
kiste config show            # resolved settings and file locations
kiste config get current
kiste config set current review-42
kiste config unset current
kiste config path
```

Settings are non-secret; the token is never shown.

## Environment variables

| Variable | Purpose |
| --- | --- |
| `KISTE_TOKEN` | API key or token to use instead of the saved sign-in |
| `KISTE_CURRENT` | The Kiste to use when no name is given, for one shell or agent session |
| `KISTE_OUTPUT` | `human`, `json` or `ndjson` |
| `KISTE_NO_INPUT` | Never prompt, open a browser or attach SSH |
| `KISTE_VERBOSE` | Print each step with how long it took |
| `KISTE_TIMEOUT` | Longest request time, and the deadline of `exec` |
| `KISTE_REQUEST_ID` | Request ID to send with every request |
| `KISTE_CONFIG_DIR` | Use another configuration directory (another "computer", with its own key and sign-in) |
| `KISTE_TOKEN_STORE` | `file` keeps the token in `session.json` instead of the credential store (headless machines, CI) |
| `NO_COLOR` | Disable colours |

## Signing in without a browser

On a server or in CI there is no browser to approve the sign-in. Create an
[API key](https://docs.kiste.run/account/api-keys.md) and either export it as `KISTE_TOKEN` or save it:

```bash
kiste login --with-token < token.txt
```

`kiste login --no-open` prints the approval URL instead of opening it, so you
can open it on another device.

## Related topics

- [Overview](https://docs.kiste.run/cli.md)
- [Output modes and exit codes](https://docs.kiste.run/cli/output.md)
- [kiste login](https://docs.kiste.run/cli/login.md)
- [kiste logout](https://docs.kiste.run/cli/logout.md)
- [kiste whoami](https://docs.kiste.run/cli/whoami.md)
- [kiste account](https://docs.kiste.run/cli/account.md)
- [kiste new](https://docs.kiste.run/cli/new.md)
- [kiste credentials](https://docs.kiste.run/cli/credentials.md)
- [kiste ssh](https://docs.kiste.run/cli/ssh.md)
- [kiste ssh-config](https://docs.kiste.run/cli/ssh-config.md)
- [kiste exec](https://docs.kiste.run/cli/exec.md)
- [kiste prompt](https://docs.kiste.run/cli/prompt.md)
- [kiste cancel](https://docs.kiste.run/cli/cancel.md)
- [kiste interrupt](https://docs.kiste.run/cli/interrupt.md)
- [kiste command](https://docs.kiste.run/cli/command.md)
- [kiste commands](https://docs.kiste.run/cli/commands.md)
- [kiste desktop](https://docs.kiste.run/cli/desktop.md)
- [kiste list](https://docs.kiste.run/cli/list.md)
- [kiste status](https://docs.kiste.run/cli/status.md)
- [kiste current](https://docs.kiste.run/cli/current.md)
- [kiste watch](https://docs.kiste.run/cli/watch.md)
- [kiste events](https://docs.kiste.run/cli/events.md)
- [kiste stop](https://docs.kiste.run/cli/stop.md)
- [kiste restart](https://docs.kiste.run/cli/restart.md)
- [kiste rename](https://docs.kiste.run/cli/rename.md)
- [kiste update](https://docs.kiste.run/cli/update.md)
- [kiste resume](https://docs.kiste.run/cli/resume.md)
- [kiste extend](https://docs.kiste.run/cli/extend.md)
- [kiste fork](https://docs.kiste.run/cli/fork.md)
- [kiste scp](https://docs.kiste.run/cli/scp.md)
- [kiste forward](https://docs.kiste.run/cli/forward.md)
- [kiste delete](https://docs.kiste.run/cli/delete.md)
- [kiste logs](https://docs.kiste.run/cli/logs.md)
- [kiste image](https://docs.kiste.run/cli/image.md)
- [kiste snapshot](https://docs.kiste.run/cli/snapshot.md)
- [kiste environment](https://docs.kiste.run/cli/environment.md)
- [kiste stream](https://docs.kiste.run/cli/stream.md)
- [kiste auth](https://docs.kiste.run/cli/auth.md)
- [kiste devices](https://docs.kiste.run/cli/devices.md)
- [kiste config](https://docs.kiste.run/cli/config.md)
- [kiste completions](https://docs.kiste.run/cli/completions.md)
- [kiste self-update](https://docs.kiste.run/cli/self-update.md)
- [kiste limits](https://docs.kiste.run/cli/limits.md)
- [kiste doctor](https://docs.kiste.run/cli/doctor.md)
- Previous: [Output modes and exit codes](https://docs.kiste.run/cli/output.md)
- Next: [kiste login](https://docs.kiste.run/cli/login.md)
