diff options
author | T <t@tjp.lol> | 2025-09-02 11:55:31 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-09-02 11:55:58 -0600 |
commit | d6dfc913fcca4f25e8d5454a03aa559811fba9ab (patch) | |
tree | 76ae7c8f3a617e72f33ceca7632b6eb8002e46e1 /CLAUDE.md | |
parent | ae905393d4341f576591f3ab15115e5c2ad6fcc6 (diff) |
brief notes about the TUI for claude
Diffstat (limited to 'CLAUDE.md')
-rw-r--r-- | CLAUDE.md | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -15,6 +15,7 @@ Punchcard is a CLI time tracking tool for freelancers and consultants, built in ### Commands Structure - `punch in` - Starts timer (inserts row with start_time, NULL end_time) - `punch out` - Stops active timer (updates end_time), exits non-zero if no active timer +- `punch tui` - Interactive terminal UI with real-time timer updates and history browsing - `punch invoice` - Generates invoice PDF via Typst - `punch timesheet` - Generates timesheet PDF via Typst @@ -39,6 +40,7 @@ CREATE TABLE time_entries ( - **CLI Framework**: github.com/spf13/cobra - **Database**: SQLite3 - **Query Builder**: github.com/sqlc-dev/sqlc +- **TUI Framework**: github.com/charmbracelet/bubbletea with lipgloss styling - **PDF Generation**: Typst (external dependency) ## File Structure @@ -52,7 +54,8 @@ punchcard/ │ ├── database/ # Database connection and migrations │ ├── models/ # Data models │ ├── queries/ # sqlc generated queries -│ └── reports/ # Typst template handling +│ ├── reports/ # Typst template handling +│ └── tui/ # Terminal UI implementation ├── templates/ # Typst templates for PDF generation ├── go.mod ├── go.sum @@ -72,6 +75,12 @@ punchcard/ - Provide helpful error messages - Exit codes: 0 = success, 1 = general error, 2 = no active timer +### TUI Design +- Three-panel layout: timer (top-left), clients/projects (bottom-left), history (right) +- Real-time updates with bubbletea tick messages +- Filterable history with client/project drill-down +- Modal dialogs for editing entries and generating reports + ### PDF Generation - Use Typst templates in `templates/` directory - Invoke `typst compile` subprocess for PDF generation |