UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

Última actualización 7 de may. de 2026

uip completion

uip completion installs, prints, or removes shell tab completion for uip. It supports bash, zsh, fish, and pwsh (PowerShell). Interactive when invoked without an explicit shell argument in a TTY; dumps the completion script to stdout when given a shell argument or when stdout is not a TTY.

For the full walkthrough including per-shell rc-file examples and proxy notes, see Installing UiPath CLI — Enable shell completion.

Synopsis

uip completion [shell] [--print] [--uninstall]
uip completion [shell] [--print] [--uninstall]

All flags honor the global options (--output, --output-filter, --log-level, --log-file). Exit codes follow the standard contract; cancelling an interactive confirm prompt exits with 130 (user cancel).

Argumentos

  • [shell] (optional) — One of bash, zsh, fish, pwsh (alias: powershell). When omitted, the shell is auto-detected from $SHELL / $PSModulePath / the platform.

Opciones

  • --print — Print the target rc-file path and the block that would be written, without modifying the filesystem. Useful for previewing what uip completion would do.
  • --uninstall — Remove the managed completion block (or, for fish, the generated completion file) instead of installing. Idempotent — a no-op if the block is already absent.

Comportamiento

The command follows a simple three-branch rule:

  1. Interactive install (no shell arg, stdout is a TTY) — auto-detects the shell, prints the target rc file, and prompts for confirmation before writing. Cancel with Ctrl-C to exit 130.

  2. Script dump (explicit shell arg, or stdout is not a TTY) — writes the generated completion script to stdout. Pipe it into your rc file or source it directly:

    uip completion zsh >> ~/.zshrc
    uip completion bash >> ~/.bashrc
    uip completion fish > ~/.config/fish/completions/uip.fish
    uip completion pwsh >> $PROFILE
    uip completion zsh >> ~/.zshrc
    uip completion bash >> ~/.bashrc
    uip completion fish > ~/.config/fish/completions/uip.fish
    uip completion pwsh >> $PROFILE
    
  3. Uninstall (--uninstall) — removes the managed block, regardless of TTY state.

Ejemplos

# Interactive install — auto-detect shell, prompt, write rc file
uip completion

# Preview without touching the filesystem
uip completion --print

# Dump the zsh script to a specific rc file
uip completion zsh >> ~/.zshrc

# Dump the PowerShell script to your profile
uip completion pwsh >> $PROFILE

# Remove the managed completion block
uip completion --uninstall
# Interactive install — auto-detect shell, prompt, write rc file
uip completion

# Preview without touching the filesystem
uip completion --print

# Dump the zsh script to a specific rc file
uip completion zsh >> ~/.zshrc

# Dump the PowerShell script to your profile
uip completion pwsh >> $PROFILE

# Remove the managed completion block
uip completion --uninstall

Data shape (--output json)

On successful install:

{
  "Code": "CompletionInstalled",
  "Data": {
    "shell": "zsh",
    "path": "/Users/alice/.zshrc",
    "action": "appended",
    "notes": [
      "Dynamic flag-value completion (e.g. --package-name <TAB>) requires `jq` on PATH; without it, those candidates are suppressed."
    ]
  }
}
{
  "Code": "CompletionInstalled",
  "Data": {
    "shell": "zsh",
    "path": "/Users/alice/.zshrc",
    "action": "appended",
    "notes": [
      "Dynamic flag-value completion (e.g. --package-name <TAB>) requires `jq` on PATH; without it, those candidates are suppressed."
    ]
  }
}

On --print:

{
  "Code": "CompletionPrint",
  "Data": {
    "shell": "zsh",
    "path": "/Users/alice/.zshrc",
    "mode": "block",
    "content": "# >>> uip completion >>>\n…generated script…\n# <<< uip completion <<<"
  }
}
{
  "Code": "CompletionPrint",
  "Data": {
    "shell": "zsh",
    "path": "/Users/alice/.zshrc",
    "mode": "block",
    "content": "# >>> uip completion >>>\n…generated script…\n# <<< uip completion <<<"
  }
}

On --uninstall:

{
  "Code": "CompletionUninstalled",
  "Data": {
    "shell": "zsh",
    "path": "/Users/alice/.zshrc",
    "action": "removed"
  }
}
{
  "Code": "CompletionUninstalled",
  "Data": {
    "shell": "zsh",
    "path": "/Users/alice/.zshrc",
    "action": "removed"
  }
}

Failure modes

  • Unsupported shellFailure with Message: "Unsupported shell: <name>", instructions to use one of bash, zsh, fish, pwsh.
  • Shell-special characters in a command nameFailure from the zsh / fish generator; rename the offending command or open an issue.
  • No write access to the rc fileFailure with instructions to check permissions on the target path.
  • User cancels the confirm prompt — exits 130 (no envelope).

Dynamic flag-value completion

Static completion (subcommand names, option names) works on all four shells. Dynamic flag-value completion — for example, uip or packages upload --package-name <TAB> suggesting live package names — is currently zsh-only and requires jq on PATH. Without jq, dynamic candidates are suppressed silently; the install step emits a note in the notes[] array when this applies.

Static snapshot: re-run after every upgrade

The generated completion script is a static snapshot of the subcommand names and option names known when uip completion was run. It is not regenerated at shell startup. After any of the following, re-run uip completion so newly added verbs and flags appear in tab completion:

  • npm install -g @uipath/cli@<new-version> — the host bumped, new global flags or top-level commands may exist.
  • uip tools install <new-tool> — a tool you didn't have is now installed; its alias and verbs are not in the script yet.
  • uip tools update — installed tools moved to a new MINOR; new verbs or flags may have been added.
uip completion              # interactive — refreshes the existing block
uip completion zsh >> ~/.zshrc   # or pipe into the rc file directly
uip completion              # interactive — refreshes the existing block
uip completion zsh >> ~/.zshrc   # or pipe into the rc file directly

Without a refresh, the new verbs still work on the command line — they just won't be suggested by <TAB>. Dynamic flag-value completion (the zsh-only case above) is the one piece that resolves at runtime; everything else needs the refresh.

Ver también

  • uip toolsuip completion reflects the installed tools' subcommands; re-run after uip tools install if you want completion for newly-installed commands.
  • Global options--output, --output-filter, --log-level, --log-file.
  • Exit codes — the standard contract plus 130 for user cancellation.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado