# Sybil TUI

Terminal UI client for Sybil with a sidebar + workspace flow similar to the web app.

## Setup

```bash
cd tui
npm install
npm run dev
```

Build/start:

```bash
npm run build
npm run start
```

## Environment Variables

Configuration is environment-only (no in-app settings).

- `SYBIL_TUI_API_BASE_URL`: API base URL. Default: `http://127.0.0.1:8787`
- `SYBIL_TUI_ADMIN_TOKEN`: optional bearer token for token-mode servers
- `SYBIL_TUI_DEFAULT_PROVIDER`: `openai` | `anthropic` | `xai` (default: `openai`)
- `SYBIL_TUI_DEFAULT_MODEL`: optional default model name
- `SYBIL_TUI_SEARCH_NUM_RESULTS`: results per search run (default: `10`)

Compatibility aliases:

- `SYBIL_API_BASE_URL` (fallback for API URL)
- `SYBIL_ADMIN_TOKEN` (fallback for token)

## Key Bindings

- `Tab` / `Shift+Tab`: move focus between sidebar, transcript, and composer
- `Esc` (in composer): exit input mode and focus sidebar
- `Up` / `Down` (in sidebar): move highlight
- `Page Up` / `Page Down` (in transcript): scroll the transcript by one page
- `Enter` in sidebar: load highlighted conversation/search
- `Enter` in composer: send message/search
- `n`: new chat draft
- `/`: new search draft
- `d`: delete selected chat/search
- `p`: cycle provider (chat mode)
- `m`: cycle model (chat mode)
- `r`: refresh collections + models
- `q` or `Ctrl+C`: quit
