Documentation Index: Fetch llms.txt first to discover every published page. This page is also available as Markdown at /cli-completion-and-utilities.md.
Verified · 8/11/2026

Shell Completion and Endpoint Test Redirects

Set up bash, zsh, PowerShell, or fish tab-completion for the primitive CLI, and understand the internal test-redirect helper that backs primitive routes-test and functions-test-function.

Shell completion#

The primitive CLI ships shell completion for bash, zsh, and PowerShell through oclif's official autocomplete plugin, plus a separately generated fish completion output. See What is the Primitive CLI? for the command-surface overview the completions are derived from.

bash, zsh, PowerShell#

Run the built-in autocomplete command to print the setup instructions for your shell:

primitive autocomplete

Pass the shell name explicitly to get the instructions for a shell other than your current one:

primitive autocomplete bash
primitive autocomplete zsh
primitive autocomplete powershell

Follow the exact commands the output prints. The generated script location and the shell hook are managed by oclif's autocomplete plugin, so they can differ across oclif versions.

fish#

Fish is not covered by oclif's autocomplete plugin, so the CLI emits its own fish completion output instead. Install that output as a fish completion for the primitive command, then start a new shell to pick up the CLI's subcommands and flags.

Note

The fish output is produced separately from the bash/zsh/PowerShell path, so a newly added command or flag needs the fish completion re-installed rather than just a shell restart.

Endpoint test redirects#

endpoints-test-redirect is an internal CLI helper, not a command you invoke. It is the shared plumbing exercised by two public commands:

CommandWhat it does
primitive routes-testPreviews where a recipient address resolves under recipient routing rules, including the rule trace
primitive functions-test-functionRuns a test invocation against a deployed Primitive Function so you can exercise its handler without waiting on real inbound mail

Because the helper is plumbing rather than a user-facing command, look up its behavior through whichever command you are running:

For the API-level test-delivery behavior these commands sit on top of, including how a test delivery is signed, see Webhook Events Overview.

Next steps#

Was this page helpful?

© Primitive SDKs

Powered by Browzer