|
| 1 | +# hbtui |
| 2 | + |
| 3 | +A terminal dashboard for [Honeybadger.io](https://www.honeybadger.io), built with Rust. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Installation |
| 8 | + |
| 9 | +### From source |
| 10 | + |
| 11 | +```bash |
| 12 | +cargo install --path . |
| 13 | +``` |
| 14 | + |
| 15 | +### Pre-built binaries |
| 16 | + |
| 17 | +Coming soon. |
| 18 | + |
| 19 | +## Usage |
| 20 | + |
| 21 | +```bash |
| 22 | +# With command-line flags |
| 23 | +hbtui -p <PROJECT_ID> --auth-token <TOKEN> |
| 24 | + |
| 25 | +# With environment variables |
| 26 | +export HONEYBADGER_PROJECT_ID=12345 |
| 27 | +export HONEYBADGER_PERSONAL_AUTH_TOKEN=your_token |
| 28 | +hbtui |
| 29 | + |
| 30 | +# Custom dashboard file or directory |
| 31 | +hbtui -p 12345 -d ./my-dashboard.yml |
| 32 | +hbtui -p 12345 -d ./dashboards/ |
| 33 | +``` |
| 34 | + |
| 35 | +### Options |
| 36 | + |
| 37 | +| Flag | Env Variable | Description | |
| 38 | +| ------------------ | --------------------------------- | ----------------------------------------------------- | |
| 39 | +| `-p, --project-id` | `HONEYBADGER_PROJECT_ID` | Honeybadger project ID (required) | |
| 40 | +| `--auth-token` | `HONEYBADGER_PERSONAL_AUTH_TOKEN` | API auth token (required) | |
| 41 | +| `-d, --dashboards` | `HONEYBADGER_DASHBOARDS` | Dashboard file or directory (default: `./dashboards`) | |
| 42 | +| `-h, --help` | | Print help | |
| 43 | +| `-V, --version` | | Print version | |
| 44 | + |
| 45 | +## Key Bindings |
| 46 | + |
| 47 | +| Key | Action | |
| 48 | +| ---------- | --------------------------------- | |
| 49 | +| `q` | Quit | |
| 50 | +| `r` | Refresh current dashboard | |
| 51 | +| `[` / `]` | Previous / next dashboard | |
| 52 | +| `1-9` | Jump to dashboard by number | |
| 53 | +| Arrow keys | Navigate widgets | |
| 54 | +| `Enter` | Maximize selected widget | |
| 55 | +| `Esc` | Exit maximized view | |
| 56 | +| `Up/Down` | Filter by series (when maximized) | |
| 57 | + |
| 58 | +## Dashboards |
| 59 | + |
| 60 | +Dashboards are YAML files that define widgets powered by [Honeybadger Insights](https://docs.honeybadger.io/guides/insights/). See the [Dashboards guide](https://docs.honeybadger.io/guides/dashboards/#editing-dashboard-source) to learn how to export your dashboard YAML. |
| 61 | + |
| 62 | +### Example |
| 63 | + |
| 64 | +```yaml |
| 65 | +title: My Dashboard |
| 66 | +widgets: |
| 67 | + - id: requests |
| 68 | + type: insights |
| 69 | + grid: { x: 0, y: 0, w: 6, h: 2 } |
| 70 | + presentation: |
| 71 | + title: Requests per Hour |
| 72 | + config: |
| 73 | + query: | |
| 74 | + SELECT count(*) as count, bin(ts, 1h) as time |
| 75 | + FROM requests |
| 76 | + GROUP BY time |
| 77 | + ORDER BY time |
| 78 | + vis: |
| 79 | + view: line |
| 80 | + chart_config: |
| 81 | + xField: time |
| 82 | + yField: count |
| 83 | + |
| 84 | + - id: errors |
| 85 | + type: insights |
| 86 | + grid: { x: 6, y: 0, w: 6, h: 2 } |
| 87 | + presentation: |
| 88 | + title: Errors by Class |
| 89 | + config: |
| 90 | + query: | |
| 91 | + SELECT count(*) as count, class |
| 92 | + FROM errors |
| 93 | + GROUP BY class |
| 94 | + ORDER BY count DESC |
| 95 | + LIMIT 10 |
| 96 | + vis: |
| 97 | + view: table |
| 98 | +``` |
| 99 | +
|
| 100 | +### Grid System |
| 101 | +
|
| 102 | +Widgets are positioned on a 12-column grid: |
| 103 | +
|
| 104 | +- `x`: Column position (0-11) |
| 105 | +- `y`: Row position (0+) |
| 106 | +- `w`: Width in columns (1-12) |
| 107 | +- `h`: Height in rows |
| 108 | + |
| 109 | +### Visualization Types |
| 110 | + |
| 111 | +| Type | Description | |
| 112 | +| ----------- | ----------------------------------- | |
| 113 | +| `line` | Time-series line chart | |
| 114 | +| `histogram` | Bar chart (supports stacked series) | |
| 115 | +| `table` | Data table | |
| 116 | +| `billboard` | Large single-value display | |
| 117 | + |
| 118 | +### Chart Config |
| 119 | + |
| 120 | +```yaml |
| 121 | +chart_config: |
| 122 | + xField: time # X-axis field |
| 123 | + yField: count # Y-axis field |
| 124 | + zField: status # Series grouping (optional) |
| 125 | + yFieldUnit: milliseconds # Unit for Y-axis (optional) |
| 126 | +``` |
| 127 | + |
| 128 | +## Development |
| 129 | + |
| 130 | +```bash |
| 131 | +cargo build # Build |
| 132 | +cargo run -- --help # Run with args |
| 133 | +cargo test # Run tests |
| 134 | +cargo clippy # Lint |
| 135 | +cargo fmt # Format |
| 136 | +``` |
| 137 | + |
| 138 | +## License |
| 139 | + |
| 140 | +MIT |
0 commit comments