CLI commands

Voltooiing

openclaw completion

Genereer shell-aanvullingsscripts, sla ze op in de cache onder de OpenClaw-status en installeer ze desgewenst in je shellprofiel.

Gebruik

bash
openclaw completion                          # print zsh script to stdoutopenclaw completion --shell fish             # print fish scriptopenclaw completion --write-state            # cache scripts for all shellsopenclaw completion --write-state --install  # cache, then install in one stepopenclaw completion --shell bash --write-state

Opties

  • -s, --shell <shell>: doelshell (zsh, bash, powershell, fish; standaard: zsh)
  • -i, --install: installeer aanvulling door een bronregel voor het gecachte script aan je shellprofiel toe te voegen
  • --write-state: schrijf aanvullingsscript(s) naar $OPENCLAW_STATE_DIR/completions (standaard ~/.openclaw/completions) zonder ze naar stdout te schrijven; met --shell wordt alleen voor die shell geschreven, anders voor alle vier
  • -y, --yes: sla bevestigingsvragen voor de installatie over (niet-interactief)

Installatieproces

--install laat je profiel naar het gecachte script verwijzen, dus de cache moet eerst bestaan: als deze ontbreekt, mislukt de opdracht en wordt aangegeven dat je openclaw completion --write-state moet uitvoeren. Combineer --write-state --install om beide in één stap uit te voeren. Zonder --shell detecteert --install de shell via $SHELL (met zsh als terugvaloptie).

De installatie schrijft een klein blok met # OpenClaw Completion naar je shellprofiel en vervangt eventuele oudere, trage regels met source <(openclaw completion ...) door de gecachte bronregel:

Shell Profiel
bash ~/.bashrc (valt terug op ~/.bash_profile wanneer ~/.bashrc ontbreekt)
fish ~/.config/fish/config.fish
powershell ~/.config/powershell/Microsoft.PowerShell_profile.ps1 (op Windows: Documents/PowerShell/Microsoft.PowerShell_profile.ps1, of Documents/WindowsPowerShell/... voor Windows PowerShell)
zsh ~/.zshrc

Opmerkingen

  • Zonder --install of --write-state schrijft de opdracht het script naar stdout.
  • Bij het genereren van aanvullingen wordt de volledige opdrachtstructuur direct geladen, inclusief CLI-opdrachten van Plugins, zodat geneste subopdrachten worden opgenomen.
  • openclaw update vernieuwt de aanvullingscache automatisch na een geslaagde update; openclaw doctor kan ontbrekende of verouderde aanvullingsconfiguraties herstellen.

Gerelateerd

Was this useful?
On this page

On this page