-
Notifications
You must be signed in to change notification settings - Fork 0
[CLI] Feature — Verbose / Debug Mode #26
Description
Overview
When something goes wrong (search returns no results, data looks stale, API call fails silently), there's no way to see what lazydash is doing under the hood. Developers and contributors need to see raw API requests, response times, cache hits/misses, and error details.
Current State
No verbose or debug mode. No visibility into API calls, cache operations, or rate limit usage.
Proposed Solution
CLI verbose mode:
lazydash --verbose # show API calls and cache activity
lazydash --verbose search "auth bug" # see exactly what queries are being made
lazydash -v # short flag
lazydash --debug # even more detail (full request/response bodies)Output example:
[API] GET https://api.github.com/graphql (GitHub Projects query) -> 200 OK (342ms)
[CACHE] HIT myorg/my-api -- last refreshed 3m ago
[CACHE] MISS myorg/other-repo -- fetching from API
[RATE] GitHub API: 4,892 / 5,000 remaining (resets in 43m)
TUI verbose mode:
- Status bar: Compact bottom bar showing last API call, status, response time, rate limit, cache age
- Debug pane: Toggle with
Ctrl+Dfor a scrollable log panel
Environment variable override:
LAZYDASH_VERBOSE=1 lazydash
LAZYDASH_DEBUG=1 lazydashImplementation Notes
Use log/slog structured logger writing to stderr (CLI mode) or a ring buffer (TUI debug pane). Provider interface methods should accept a logger or context with logging configuration. Follow the GH_DEBUG=1 convention from the gh CLI but add cache-awareness and rate limit visibility.
Priority
Medium — build the logging infrastructure early, expose it in the UI later. Having --verbose from day one will save enormous debugging time during development.
Acceptance Criteria
-
--verbose/-vflag shows API calls, cache hits/misses, and response times -
--debugflag shows full request/response bodies -
LAZYDASH_VERBOSEandLAZYDASH_DEBUGenvironment variables work - TUI status bar shows last API call info
- Rate limit usage is visible in verbose output
- Logging infrastructure uses structured logging (slog)