# rok-tui

Terminal UI dashboard for rok applications. Browse your database tables, view
migration status, manage feature flags, and monitor the job queue — all in the terminal.

## Installation

```bash
cargo install rok-tui
# or with Studio API testing tab:
cargo install rok-tui --features studio
```

## Usage

```bash
rok-tui                         # uses DATABASE_URL from environment
rok-tui --db postgres://...     # explicit connection string
```

Or via the rok CLI:

```bash
rok tui
```

## Tabs

| Tab | Shortcut | Description |
|---|---|---|
| DB Browser | F1 | Browse tables, view columns and rows |
| Migrations | F2 | Applied vs pending migrations |
| Feature Flags | F3 | View and toggle feature flags |
| Queue Monitor | F4 | Pending, running, failed jobs per queue |
| Studio | F5 | API testing client (requires `studio` feature) |

## Keyboard Shortcuts

| Key | Action |
|---|---|
| F1–F5 | Switch tab |
| ← → | Navigate within tab |
| r | Reload current tab data |
| q | Quit |

## Requirements

`DATABASE_URL` environment variable pointing to a PostgreSQL database.
