Skip to content

[DOCS] Document shell completions and restyled help/version output (fang) #161

Closed

Description

@edenreich

Summary

inference-gateway/cli PR #592 (merged) adopted fang to wrap rootCmd execution. This adds user-facing surface that is not yet documented:

  • New infer completion subcommand that generates shell completions for bash, zsh, fish, and powershell.
  • Restyled help output (infer --help and per-subcommand --help).
  • Restyled error rendering for unknown commands/flags (non-zero exit with a styled message).
  • Styled infer --version output. The manual --version bool flag was replaced by fang's version handling; the version subcommand is kept for backwards compatibility.

Source PR: inference-gateway/cli#592
Part of the Charm v2 UX modernization track (1/7).

Affected pages

  • cli.md - add a "Shell Completions" subsection under Installation (or Quick Start) with per-shell install steps; refresh the "Get help" snippet and any help/version output samples to match the new styled rendering.
  • getting-started.md - optional pointer to enabling completions right after install.
  • troubleshooting.md - optional note for when completions are not picked up (shell rc not sourcing the completion file).

Suggested content (completion install examples)

# Zsh (current session)
source <(infer completion zsh)

# Zsh (persistent) - write to a directory on $fpath
infer completion zsh > "${fpath[1]}/_infer"

# Bash
infer completion bash > /etc/bash_completion.d/infer

# Fish
infer completion fish > ~/.config/fish/completions/infer.fish

# PowerShell
infer completion powershell | Out-String | Invoke-Expression

Acceptance Criteria

  • cli.md documents the infer completion subcommand with install steps for bash, zsh, fish, and powershell.
  • Help and version sample output (or screenshots) in cli.md reflect the new fang-styled rendering.
  • Behavior of the version subcommand vs the --version flag is described (both supported; --version now styled by fang).
  • Page(s) cross-link back to the originating PR ([DOCS] Document the TextToSpeech agent tool (text-to-speech and voice cloning) #592).

Activity

  1. added
    documentation
    on Jun 5, 2026
  2. added theissue type on Jun 5, 2026
  3. moved this to In progress in 2026on Jun 5, 2026
  4. edenreich commented on Jun 5, 2026

    @edenreich
    ContributorAuthor

    @claude Can you document it? use /maintainer

  5. claude commented on Jun 5, 2026

    @claude
    Contributor

    Claude finished @edenreich's task in 7m 13s —— View job • docs/issue-161-20260605-0106


    Documenting fang shell completions and restyled help/version output

    Done. Opened PR #162 documenting the fang surface from inference-gateway/cli#592. All changes are in cli.md.

    • Gather context (cli.md, getting-started.md, troubleshooting.md, maintainer refs)
    • Verify source PR [DOCS] Document the TextToSpeech agent tool (text-to-speech and voice cloning) #592 + cmd/root.go (charm.land/fang/v2, fang.WithVersion; -v is --verbose)
    • Add ### Shell Completions under Installation (bash, zsh, fish, powershell)
    • Add ## Help and Version Output (styled help, styled errors, styled version)
    • Describe version subcommand vs --version flag (both supported)
    • Update Quick Start + Command Reference table (infer completion <shell>, infer version)
    • Add ### Shell Completions Not Working troubleshooting entry
    • Cross-link source PR [DOCS] Document the TextToSpeech agent tool (text-to-speech and voice cloning) #592 (two places)
    • Lint + build check (format:check, lint:md, build all pass; content is SSR'd into dist/cli/index.html)
    • Commit (6e3d68a) and open PR

    Acceptance criteria

    • cli.md documents infer completion with install steps for bash, zsh, fish, powershell
    • Help and version sample output reflects the new fang-styled rendering (shown as plain text with a note that the terminal output is colorized)
    • version subcommand vs --version flag behavior described (both supported; --version styled by fang)
    • Page cross-links back to originating PR [DOCS] Document the TextToSpeech agent tool (text-to-speech and voice cloning) #592

    Scope decision

    Root-level getting-started.md and troubleshooting.md document the gateway server (Docker/K8s, auth, MCP), not the infer CLI. The optional completion pointers were kept inside cli.md - which owns CLI content and has its own Troubleshooting section - rather than forcing CLI content into the gateway pages. Let me know if you'd prefer a pointer added to those pages anyway.


    Create a PR  |   |  Branch: docs/issue-161-20260605-0106

  6. moved this from In progress to Done in 2026on Jun 5, 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

    documentation

    Type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions