Skip to content

Migrate to cli framework for proper completion support #576

Description

@shyim

Problem Statement

I would like to have shell completion support

Proposed Solution

Use any Go cli framework with completion support

Alternatives Considered

No response

Affected Area

CLI / Commands

Additional Context

No response

Activity

  1. added
    enhancement
    on Jul 29, 2026
  2. added theissue type on Jul 29, 2026
  3. changed the title [-]Migrate to cobra for proper completion support[/-] [+]Migrate to cli framework for proper completion support[/+] on Jul 29, 2026
  4. shyim commented on Jul 29, 2026

    @shyim
    ContributorAuthor

    Updated the issue. I don't care tbh which framework. Just shell completion would be nice 😂 and maybe some kind of standardization here

  5. stay-foolish-forever commented on Jul 29, 2026

    @stay-foolish-forever
    Contributor

    Hi @shyim, thank you very much for raising this suggestion, and thanks @philippgille for sharing those framework references — shell completion would indeed be a great usability improvement, and we agree it's worth pursuing.

    To give some context, the current CLI layer relies on a custom command-parsing implementation built in-house. Migrating to a framework — whether Cobra, urfave/cli, or kingpin — would touch nearly every command and argument definition, making the scope of the change fairly large. We want to plan this carefully to avoid regressions and to avoid breaking existing usage patterns and user scripts.

    As for next steps, our core maintainer team is currently working on the architecture design for this area, evaluating how well each framework fits and what impact it would have on the existing structure. We plan to finalize the architecture in the near future, and we'd love to have the community join us in completing the final implementation at that point.

    Thanks again for your patience and the valuable suggestion — we'll keep this issue updated with progress 🙏

  6. lizhengfeng101 commented on Jul 31, 2026

    @lizhengfeng101
    Contributor

    Updated the issue. I don't care tbh which framework. Just shell completion would be nice 😂 and maybe some kind of standardization here

    @shyim I will try it as soon as possible.

  7. volkkov commented on Jul 31, 2026

    @volkkov

    Worth checking if this reproduces with a fresh install — some package managers cache broken versions.

  8. lizhengfeng101 commented on Jul 31, 2026

    @lizhengfeng101
    Contributor

    Hi @shyim, @philippgille, @stay-foolish-forever, @volkkov —

    This has been shipped in v1.8.3! We migrated the CLI to the Cobra framework, so shell completion (Bash, Zsh, Fish, PowerShell) is now available via:

    ocr completion <shell>
    

    Thanks for the suggestion and the framework references — they were very helpful in guiding the decision. Give it a try and let us know if anything feels off.

    Closing this as completed.

  9. added a commit that references this issue on Jul 31, 2026
    80a5794
  10. added a commit that references this issue on Sep 17, 2026
    cc1b853
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions