Skip to content

CLI lacks shell completions, inline help, and operational dashboards #19

Closed

Description

@Sinity

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 | source enables tab-completion of subcommands, provider names, and conversation slugs
  • Piping polylogue output to a file automatically uses plain mode without any flags
  • polylogue doctor --json reports dependency, config, credential, and index health
  • polylogue runs --providers drive --since 2024-01-01 --json returns filtered run history
  • polylogue env --json prints all resolved paths
  • Config with html_theme: "purple" fails fast at startup with an actionable message

Activity

  1. added
    type:feat
    faux-pull-request
    on Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliarea:qaarea:storagefaux-pull-requesttype:feat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions