Configure OpenClaw Shell Completion: Setup in 60 Seconds
Typing out long commands is a chore. You probably find yourself hitting the Tab key out of habit, only to realize you haven’t set up completion for a new tool yet. It breaks your focus and slows you down.
Setting up shell completion for OpenClaw is the best way to fix this. It makes the CLI feel much more natural and saves you from memorizing every single flag.
openclaw completionopenclaw completion --shell zshopenclaw completion --installopenclaw completion --shell fish --installopenclaw completion --write-stateopenclaw completion --shell bash --write-stateOptions
Section titled “Options”Here are the flags you can use. I recommend the --install flag because it handles the setup for you automatically.
-s, --shell <shell>: shell target (zsh,bash,powershell,fish; default:zsh)-i, --install: install completion by adding a source line to your shell profile--write-state: write completion script(s) to$OPENCLAW_STATE_DIR/completionswithout printing to stdout-y, --yes: skip install confirmation prompts
A few things to keep in mind about how this works.
--installwrites a small “OpenClaw Completion” block into your shell profile and points it at the cached script.- Without
--installor--write-state, the command prints the script to stdout. - Completion generation eagerly loads command trees so nested subcommands are included.
Next Steps
Section titled “Next Steps”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.