- Overview
- Get started
- Concepts
- Using UiPath CLI
- How-to guides
- CI/CD recipes
- Command reference
- Overview
- Exit codes
- Global options
- uip codedagent
- uip docsai
- add-test-data-entity
- add-test-data-queue
- add-test-data-variation
- analyze
- build
- create-project
- diff
- find-activities
- get-analyzer-rules
- get-default-activity-xaml
- get-errors
- get-manual-test-cases
- get-manual-test-steps
- get-versions
- get-workflow-example
- indicate-application
- indicate-element
- inspect-package
- install-data-fabric-entities
- install-or-update-packages
- list-data-fabric-entities
- list-workflow-examples
- pack
- restore
- run-file
- search-templates
- start-studio
- stop-execution
- uia
- uip traces
- Migration
- Reference & support
UiPath CLI user guide
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).
Arguments
[shell](optional) — One ofbash,zsh,fish,pwsh(alias:powershell). When omitted, the shell is auto-detected from$SHELL/$PSModulePath/ the platform.
Options
--print— Print the target rc-file path and the block that would be written, without modifying the filesystem. Useful for previewing whatuip completionwould 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.
Behavior
The command follows a simple three-branch rule:
-
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. -
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 >> $PROFILEuip completion zsh >> ~/.zshrc uip completion bash >> ~/.bashrc uip completion fish > ~/.config/fish/completions/uip.fish uip completion pwsh >> $PROFILE -
Uninstall (
--uninstall) — removes the managed block, regardless of TTY state.
Examples
# 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 shell —
FailurewithMessage: "Unsupported shell: <name>", instructions to use one ofbash,zsh,fish,pwsh. - Shell-special characters in a command name —
Failurefrom the zsh / fish generator; rename the offending command or open an issue. - No write access to the rc file —
Failurewith 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.
Related
- Installing UiPath CLI — Enable shell completion — per-shell setup walkthrough and troubleshooting.
- Troubleshooting — Tab completion doesn't complete — common install-time issues.
- Scripting patterns — Suppressing interactive prompts — avoiding the confirm prompt in CI.
See also
- uip tools —
uip completionreflects the installed tools' subcommands; re-run afteruip tools installif you want completion for newly-installed commands. - Global options —
--output,--output-filter,--log-level,--log-file. - Exit codes — the standard contract plus
130for user cancellation.