Skip to content

Commit 7f14b67

Browse files
committed
docs(readme): trim the keymap to essentials
The Keys table read like the in-app help — paragraph-long rows walking every sub-key of every panel. It's now ten one-line rows covering the keys that define the tool, with ? as the pointer to the full reference; the web section and the browse orientation paragraph lose their key choreography the same way.
1 parent 37e489b commit 7f14b67

1 file changed

Lines changed: 25 additions & 51 deletions

File tree

README.md

Lines changed: 25 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</p>
1111

1212
<p align="center">
13-
<img src="https://github.com/user-attachments/assets/a84029a3-7887-42c7-ba5a-d8c905f3fa19" alt="OpenTab web browser — the same data as a self-contained page" width="900">
13+
<img src="https://github.com/user-attachments/assets/b497c617-8a6c-4132-b6e2-aaf5078b8a4e" alt="OpenTab web browser — the same data as a self-contained page" width="900">
1414
<br><sub><b>Also a web browser</b> — <code>opentab --web</code> renders the same data as one self-contained, shareable page</sub>
1515
</p>
1616

@@ -239,22 +239,11 @@ are never mistaken for real ones.
239239

240240
`opentab --html` writes the whole browser as **one self-contained HTML file**
241241
no server, no dependencies, works from disk or any static host. It's the TUI in
242-
the browser: the same lazygit-style Years / Months / Days (or Projects) sidebar,
243-
the same detail tabs (Overview / Models / Projects / Sessions / Subagents), the
244-
calendar spend heatmap, and the `$` what-if toggle — driven by the same keys
245-
(`j`/`k`, `Tab`, `h`/`l`, `Esc`, `$`, `p`/`t`) or the mouse. Drill in by year /
246-
month / day / project / session (the browser's back button steps out, and every
247-
view is a shareable deep link), and every table sorts on a header click. Press
248-
`T` (or the **trends** button) for the full Trends overlay — Daily / Weekly /
249-
Monthly cost charts, the calendar heatmap, and Model / Provider / Source
250-
rankings, with `h`/`l` for tabs and `j`/`k` to page (click a ranking row for
251-
its sessions, and a session to open it); `P` opens the models.dev
252-
price table (`eff $/M` at your token mix, heat-shaded, three layouts); and `R`
253-
(or the range chip) rescopes everything to a window (last 7/30/90 days, N months,
254-
this year, or a custom span). The **theme** button switches the palette live
255-
(opentab, Catppuccin Mocha/Latte, Tokyo Night/Day, Gruvbox, Nord, Dracula, Rosé
256-
Pine — light and dark) and remembers your pick; `--theme <name>` bakes the
257-
default. Combine with `--demo` for a page you can publish.
242+
the browser: the same sidebar, detail tabs, Trends and price-table overlays,
243+
live range scoping and colour themes — driven by the same keys or the mouse.
244+
Every view is a shareable deep link (the browser's back button steps out) and
245+
every table sorts on a header click. Combine with `--demo` for a page you can
246+
publish.
258247

259248
`opentab --serve` serves the same browser on `http://localhost:8321` (`--port`)
260249
and adds what a static file can't have: the per-session **Turns** timeline and
@@ -265,47 +254,32 @@ shell association on Windows). It binds to localhost only — the browser shows
265254
titles, project paths, and spend, so if you want it on another machine put it behind
266255
something like Tailscale (`--bind`), never a public interface.
267256

268-
OpenTab opens on a stacked **Months / Days** sidebar (lazygit-style). `Tab` flips
269-
focus between the two panels. `Enter` **zooms** the focused month's or day's
270-
detail full-screen (Overview / Models / Projects / Sessions, switch with `h`/`l`). On the
271-
**Sessions** tab, `j`/`k` pick a session and `Enter` opens *that session's* own
272-
detail — cost split, model mix, and subagent tree. `Esc` steps back out.
273-
274257
### Keys
275258

259+
OpenTab opens on a stacked **Months / Days** (or Projects) sidebar, lazygit-style:
260+
drill from a month or day into its detail tabs, from the Sessions tab into a
261+
single session — cost split, model mix, subagent tree — and step back out with
262+
`Esc`. Everything is discoverable in-app — **`?` shows the full keymap**, every
263+
panel and overlay documented. The short version:
264+
276265
| Key | Action |
277266
|-----|--------|
278-
| `Tab` | Flip focus between the Months and Days panels |
279-
| `Enter` / `+` | Drill in: month/day zoom → (on Sessions tab) open a session |
280-
| `Esc` | Step back out (session → zoom → browse) |
281-
| `Shift-Tab` | Flip Months/Days focus while browsing; otherwise step back out |
282-
| `j`/`k` or arrows | Move in the current list / scroll detail |
283-
| `h`/`l` | Switch detail tabs |
284-
| Mouse | Wheel scrolls; click a row or tab to select; double-click to drill in; click a column header (Cost / Tokens / Title / …) to sort by it, again to reverse |
285-
| `g` / `G` | Top / bottom |
286-
| `R` | Set range (`all`, `30d` or `30`, `2m`, `1y`, `2026`, `2026-05`, `YYYY-MM-DD..YYYY-MM-DD`); `2m`/`1y` are whole calendar months |
287-
| `a` | Show all time |
288-
| `s` / `S` | Cycle sort forward/backward for visible session, project, or subagent lists |
289-
| `i` | Ignore/unignore the selected project from project lists |
290-
| `I` | Show/hide ignored projects so they can be unignored |
291-
| `f` | Live fuzzy filter: the lists narrow and re-rank (best match first) as you type, fzf-style subsequence matching over title/project/id; ``/`` select while typing, `Enter` keeps the filter, `Esc` cancels, `Ctrl-U` clears the input, `x` clears it later |
292-
| `T` | Trends overlay — Daily / Weekly / Monthly cost charts + Model, Provider, and Source spend ranking (`h`/`l` tabs, `j`/`k` month/week, `$` toggles what-if). Every tab drills: on a chart `Enter` focuses it and `↑↓←→` walk a bar cursor, `Enter` opens that day/month (`Esc` returns to the chart); on a ranking `j`/`k` pick a row, `Enter` lists its sessions, `Enter` again opens one |
293-
| `$` | What-if pricing: re-price unpriced subscription/credit usage at models.dev API list prices |
294-
| `P` | Show the models.dev API price table OpenTab uses for `$` (press `r` inside to refresh it from models.dev) |
295-
| `e` | Export the current list (months/days/projects/sessions/subagents) to a CSV in the working dir |
296-
| `o` | Open the selected session's / project's directory |
297-
| `L` | Launch the selected session in its own tool (`opencode --session <id>` / `claude --resume <id>` / `codex resume <id>`). Inside tmux a one-key menu opens it in a new **w**indow, **s**plit, **v**split, or **p**opup (cd'd to the project), with **y** copying the `cd <project> && …` command to the clipboard; outside tmux the menu offers only the copy. See [Custom launchers](#custom-launchers) to route launches through your own tooling |
298-
| `c` | Switch data source — any present backend (OpenCode, Claude Code, Codex, Hermes, Copilot CLI, VS Code, pi, OpenClaw, CSV, JSONL), or all merged |
299-
| `C` | Colours — pick a theme (opentab, Catppuccin Mocha/Latte, Tokyo Night/Day, Gruvbox, Nord, Dracula, Rosé Pine — the same set as the web browser). `j`/`k` live-preview, `Enter` keeps, `Esc` reverts; light themes light up the whole screen. `--theme` sets it at launch |
300-
| `r` | Reload the database |
301-
| `?` | Help; `q` quits |
267+
| `j`/`k` · `h`/`l` · `Enter` · `Esc` | Move · switch tabs · drill in · step back out (`Tab` flips the sidebar panels) |
268+
| Mouse | Wheel scrolls, click selects, double-click drills, a column-header click sorts |
269+
| `T` | Trends — cost charts, the calendar heatmap, model/provider/source rankings; every tab drills down to a session |
270+
| `$` / `P` | What-if pricing at API list rates, and the price table behind it |
271+
| `R` / `a` | Scope to a date range (`30d`, `2026-05`, `start..end`, …) / back to all time |
272+
| `f` | Live fuzzy filter, fzf-style |
273+
| `c` / `C` / `D` | Switch data source · colour theme · demo mode — from anywhere, overlays included |
274+
| `L` | Relaunch the session in its own tool — tmux window/split/popup, or [your own launcher](#custom-launchers) |
275+
| `e` / `o` | Export the current view to CSV / open the project's directory |
276+
| `?` / `q` | Help / quit |
302277

303278
The active **source, range, sort, ignored projects, and `$` what-if view are
304279
remembered between runs** (stored in `~/.config/opentab/state.json`; pass `--no-state`
305-
to disable, and `--demo` does not persist). An explicit `--source` overrides the saved
306-
one. Sub-cent costs render as `<$0.01` so they aren't confused with a red
307-
`$0.00`, which means *unpriced* (tokens with no local price). The Months and Days
308-
lists show a small bar scaled to the largest spend in view.
280+
to disable, and `--demo` does not persist). Sub-cent costs render as `<$0.01` so
281+
they aren't confused with a red `$0.00`, which means *unpriced* (tokens with no
282+
local price).
309283

310284
### Custom launchers
311285

0 commit comments

Comments
 (0)