Repository navigation
Description
Context
Polylogue's CLI currently requires --plain for every non-interactive invocation, provides no shell completions, and routes all first-time users through an interactive gum menu that duplicates the argument parsing underneath. Meanwhile, operational visibility is thin: polylogue status exists but there's no quick dashboard of provider health, no filtered run-history viewer, and polylogue doctor only checks session directories without validating indexes, credentials, or CLI dependencies.
Problems
No shell completions. Tab-completing provider names, slugs, conversation IDs, or even subcommand names requires memorization or reaching for --help. Other CLI tools in the ecosystem (git, gh, kubectl) set the baseline expectation here.
Plain mode requires a flag. Every CI script, cron entry, and pipe needs --plain. The tool should detect non-TTY stdout/stderr and switch automatically, with an env var override for edge cases.
Interactive menu is redundant. The menu was the original entry point but every action it offers is already a CLI subcommand. Maintaining ~400 lines of prompt/handler code that mirrors argparse definitions is pure duplication.
Doctor is shallow. It checks session directories but doesn't verify:
- Required CLI tools (gum, sk, bat, glow, delta) are in PATH
- Config file is present and syntactically valid
- Drive credentials and OAuth tokens exist
- SQLite FTS indexes are intact
- Qdrant collection is reachable (when configured)
No run-history viewer. polylogue status shows recent runs but can't filter by provider, command, or date range, and there's no standalone runs command for ad-hoc inspection.
No environment introspection. Debugging config/path issues in CI requires manually checking multiple env vars and file locations. A single polylogue env command printing resolved paths would save significant support time.
--branch-export adds complexity without value. The overlay and canonical modes are rarely used and complicate every importer, the render path, and sync flows.
Automation module is speculative. The systemd/cron snippet generator and NixOS module carry ~600 lines of code that haven't been battle-tested in production.
Scope
- Shell completion system (bash/zsh/fish) with dynamic zsh completions
- Auto plain-mode detection from TTY state
- New commands:
dashboards,runs,env,help,index check - Doctor expansion: dependency, config, credential, and index checks
- Config validation at startup (reject bad themes, types, unknown keys)
- Remove: interactive menu,
--branch-export, automation module, NixOS module, structured stderr run logging - Progress bars for sync loops; Drive retry notifications
Acceptance criteria
polylogue completions --shell zsh | sourceenables tab-completion of subcommands, provider names, and conversation slugs- Piping polylogue output to a file automatically uses plain mode without any flags
polylogue doctor --jsonreports dependency, config, credential, and index healthpolylogue runs --providers drive --since 2024-01-01 --jsonreturns filtered run historypolylogue env --jsonprints all resolved paths- Config with
html_theme: "purple"fails fast at startup with an actionable message
Activity
sinex: primary mode and the rebuild proof; the loop builds the index …