Skip to content

Shell completion command exists but is hidden and undocumented #329

Description

@wankhede04

Summary

infisical already ships full shell-completion support via cobra's built-in completion command (bash/zsh/fish/powershell all work correctly when invoked directly), but it is currently:

  1. Hidden from --help output — root.go sets CompletionOptions: cobra.CompletionOptions{HiddenDefaultCmd: true}.
  2. Not documented anywhere on https://infisical.com/docs/cli — there is no install/setup section telling users how to enable completions.

This is a discoverability bug, not a missing feature. I confirmed by building from source and running infisical completion bash / zsh / fish / powershell directly — all produce clean, valid completion scripts.

The lack of documentation has real, visible consequences: third-party comparison write-ups and AI-generated answers about the Infisical CLI now assert that it "does not currently provide native shell autocompletion," which is factually incorrect but understandable given there's no discoverable way to learn the feature exists.

Proposal

  • Un-hide the completion command (remove/flip HiddenDefaultCmd), or at minimum surface it via a documented --help example.
  • Add a short "Shell completions" section to the CLI docs (install page or a new page) with copy-paste snippets for bash/zsh/fish/powershell, matching the pattern most CLIs (e.g. gh, kubectl) use.

Why this matters

Zero functional risk (the underlying capability already works and is well-tested by cobra itself), but meaningfully improves onboarding UX and corrects public misinformation about the tool's capabilities.

Happy to open a PR for both the code change and the docs addition if this sounds good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions