@@ -15,7 +15,11 @@ AgentMeter is a local-first dashboard for understanding coding-agent session usa
1515tokens, estimated cost, timing, session history, and tool-call behavior.
1616
1717It reads local agent JSONL session files, indexes them into SQLite, and shows the data
18- in a private local browser UI. No proxy, no cloud service, no telemetry.
18+ in private local Web and terminal interfaces. No proxy, no cloud service, no telemetry.
19+
20+ The Web UI is the default MVP interface. The TUI is available as a terminal MVP
21+ over the same local database, indexing pipeline, pricing rules, and query
22+ semantics.
1923
2024## Why AgentMeter
2125
@@ -41,6 +45,8 @@ can actually use:
4145- Incremental indexing based on path, size, modified time, and content hash.
4246- Built-in pricing registry with unknown models clearly marked as ` unpriced ` .
4347- Local Go HTTP server with a Vue 3 + Vite frontend.
48+ - TUI mode for terminal workflows, kept in sync with the Web UI through shared
49+ backend/query behavior.
4450
4551## Privacy Model
4652
@@ -110,6 +116,43 @@ Open:
110116http://127.0.0.1:34115
111117```
112118
119+ ### UI Modes
120+
121+ Web mode remains the default:
122+
123+ ``` powershell
124+ go run . -http 127.0.0.1:34115
125+ ```
126+
127+ You can select a mode explicitly:
128+
129+ ``` powershell
130+ go run . -ui web -http 127.0.0.1:34115
131+ go run . -ui web -static frontend/dist
132+ go run . -ui tui
133+ ```
134+
135+ Behavior:
136+
137+ - ` -ui web ` starts the local HTTP API and browser dashboard.
138+ - ` -ui tui ` starts the terminal UI without opening a browser or HTTP listener.
139+ - Web remains the default for compatibility with the MVP.
140+ - ` -http ` and ` -static ` apply to Web mode.
141+ - Both modes must use the same SQLite data, pricing rules, filters, and usage
142+ calculations.
143+
144+ TUI keys:
145+
146+ ``` text
147+ 1-4 / tab switch screens
148+ up/down select or scroll
149+ enter open selected session detail
150+ b / esc back from detail
151+ r refresh current screen
152+ i / I index now / rebuild index
153+ q quit
154+ ```
155+
113156For frontend development with Vite hot module reload, run the backend and
114157frontend dev server in separate terminals:
115158
@@ -152,21 +195,39 @@ already includes:
152195- Normalized sessions, events, token usage, model calls, and tool calls.
153196- Vue 3 + TypeScript frontend using Ant Design Vue and ECharts.
154197- MVP screens for Overview, Sessions, Session Detail, Tools, and Settings.
198+ - TUI mode with Overview, Sessions, Session Detail, Tools, Settings, refresh,
199+ and index actions over the same application services.
155200
156201## Development Checks
157202
203+ Run the shared backend checks:
204+
205+ ``` powershell
206+ go test ./...
207+ ```
208+
209+ Run the Web build check:
210+
158211``` powershell
159212cd frontend
160213npm ci
161214npm run build
162215cd ..
163-
164- go test ./...
165216```
166217
218+ For TUI changes, run the backend tests and a terminal smoke check covering
219+ startup, keyboard navigation, resize behavior, indexing, and parity for Overview
220+ totals, Session Detail values, and Tools aggregates against Web mode for the
221+ same database.
222+
223+ When shared query behavior changes, update both UI expectations in the same
224+ change: Web views, TUI screens, README command examples, and
225+ ` docs/ui-modes.md ` .
226+
167227## Roadmap
168228
169- Planned directions include packaged builds, more coding-agent adapters, export formats, project grouping, custom pricing, and
229+ Planned directions include richer TUI filters, packaged builds, more
230+ coding-agent adapters, export formats, project grouping, custom pricing, and
170231richer timeline views.
171232
172233See [ Roadmap] ( docs/roadmap.md ) for details.
@@ -175,6 +236,7 @@ See [Roadmap](docs/roadmap.md) for details.
175236
176237- [ Project Brief] ( docs/project-brief.md )
177238- [ Architecture] ( docs/architecture.md )
239+ - [ UI Modes] ( docs/ui-modes.md )
178240- [ Data Model] ( docs/data-model.md )
179241- [ Codex Session Format] ( docs/codex-session-format.md )
180242- [ Roadmap] ( docs/roadmap.md )
0 commit comments