This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Do not run build or package manager commands (e.g.,
make build,go build,go mod tidy). Ask the user to run them and confirm when done. - This repository uses Graphite (
gt) instead of git for branch and PR management. Usegtcommands instead ofgit:gt create -m "message"instead ofgit commitgt modifyinstead ofgit commit --amendgt submitinstead ofgit push/gh pr creategt syncinstead ofgit pull
Prioritty is a TUI and CLI application for managing tasks and notes. Written in Go 1.23, it uses SQLite for persistence and Bubble Tea for the terminal UI.
# Build the binary (outputs to bin/pt)
make build
# Run directly
go run cmd/*.go
# Run with demo data (temporary database)
./bin/pt --demoCLI Layer (internal/cli/)
↓
Service Layer (pkg/items/service/)
↓
Repository Layer (pkg/items/repository/)
↓
SQLite Database
cmd/- Entry point (main.go)internal/cli/- Cobra command handlers (one file per command)internal/config/- Viper-based YAML configurationinternal/tui/- Bubble Tea TUI (model, view, update, keys, styles)internal/migrations/- Embedded SQL schema and seed datapkg/items/- Domain models (Task, Note, Item interface)pkg/items/service/- Business logic layerpkg/items/repository/- SQLite data access
- Item: Base interface implemented by Task and Note
- Task: Has Status (Todo, InProgress, Done, Cancelled)
- Note: Simple content container without status
- Tag: Can be assigned to items for grouping
Config file at ~/.config/prioritty/prioritty.yaml:
database_path- SQLite database locationdefault_command- Command run when no subcommand given (default: "tui")log_file_path- Log file locationeditor- External editor for editing items (default: "nano")
Environment variables use PRIORITTY_ prefix.
- Repository Pattern:
SQLiteRepositoryimplementsTaskRepositoryandNoteRepositoryinterfaces - Service Composition:
Servicestruct composesTaskServiceandNoteService - Embedded SQL: Migration files use
//go:embeddirective - Editor Integration:
internal/editor/creates temp files for external editor editing - Item Sorting: Items with tags appear first, then sorted by creation date (newest first)
- Navigation:
↑/k,↓/j,←/h,→/l - Status:
p(in progress),d(done),t(todo),c(cancelled) - Actions:
e(edit),s(show),a(add),r(remove) - UI:
?(help),q(quit)
Main commands: task, note, list, show, edit, remove, tui
Status commands: done, todo, start, cancel
Tag commands: tag, tags