Use Profile Aliases and Shell Completion in Hermes

Profile aliases reduce repetitive --profile typing while shell completion makes profile names and subcommands discoverable. Use both to improve speed without obscuring the active profile boundary.

Create a profile wrapper

hermes profile alias <profile> creates or regenerates a wrapper under ~/.local/bin/. Add --name to choose a custom wrapper name, or --remove to delete it. Pick names that make the selected profile obvious; avoid aliases that look like unrelated system commands.

hermes completion <bash|zsh|fish> writes a completion script to standard output. Install it using the method appropriate for that shell. Completion covers commands, subcommands, profile names, hermes profile use, and the global -p selector.

Setup checklist

  • Confirm ~/.local/bin is on PATH.
  • Choose an alias that clearly identifies the profile.
  • Generate completion for the shell actually in use.
  • Install the script once in the correct startup location.
  • Open a new shell and test profile-name completion.
  • Verify the wrapper reports the intended active profile.

Common pitfalls

  • Creating an ambiguous alias. A short name can hide a consequential production profile.
  • Appending completion setup repeatedly. Duplicate source lines slow startup and complicate maintenance.
  • Installing for the wrong shell. Bash, zsh, and fish use different paths and syntax.
  • Assuming aliases change global profile state. A wrapper selects a profile for its invocation.

Verification

Run the alias with a read-only profile command, confirm the reported profile, then type a partial profile name and use shell completion. Remove and regenerate the wrapper once in a test case to verify maintenance works without leaving stale commands.

Official reference: Hermes profile commands.