Three cobra commands forming the CLI surface:
- root: fetch and filter weekly deals (--store/--zip with BOGO,
category, department, query, and limit filters)
- stores: list nearby Publix locations by ZIP code
- categories: show available deal categories with counts
Structured error system with typed error codes (INVALID_ARGS,
NOT_FOUND, UPSTREAM_ERROR, INTERNAL_ERROR) and semantic exit codes
(0-4). Errors render as human-readable text or JSON depending on
output mode. Robot-mode features: auto-JSON when stdout is not a TTY,
compact quick-start help when invoked with no args, and JSON error
payloads for programmatic consumers.
Initialize the publix-deals Go module (go 1.24.4) with core
dependencies: cobra for CLI structure, lipgloss for styled terminal
output, testify for assertions, and x/term for TTY detection.
The main entrypoint at cmd/pubcli/main.go delegates to cmd.Execute().
The .gitignore covers Go build artifacts, editor files, coverage
output, and jj VCS state.