---
title: "Shell Completion and Endpoint Test Redirects"
canonical: "https://test.abhinandan.one/cli-completion-and-utilities"
markdown_url: "https://test.abhinandan.one/cli-completion-and-utilities.md"
publisher: "Primitive SDKs"
kind: "reference"
content_type: "reference"
category: "CLI"
description: "Bash, zsh, and PowerShell completion for the primitive CLI use oclif's built-in autocomplete plugin, while fish is generated by a custom script."
keywords: ["primitive autocomplete", "primitive completion", "fish completion", "oclif autocomplete", "routes test", "functions test-function"]
last_modified: "2026-08-11T18:55:04.924836+00:00"
published_at: "2026-08-11T18:55:04.750575+00:00"
sections:
  - {anchor: "shell-completion", title: "Shell completion"}
  - {anchor: "bash-zsh-powershell", title: "bash, zsh, PowerShell"}
  - {anchor: "fish", title: "fish"}
  - {anchor: "endpoint-test-redirects", title: "Endpoint test redirects"}
  - {anchor: "next-steps", title: "Next steps"}
---

> Documentation index: https://test.abhinandan.one/llms.txt

# 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?](https://test.abhinandan.one/cli-overview.md) 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:

```bash
primitive autocomplete
```

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

```bash
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:

| Command | What it does |
|---|---|
| `primitive routes-test` | Previews where a recipient address resolves under [recipient routing](https://test.abhinandan.one/cli-overview/cli-domains-and-routes.md) rules, including the rule trace |
| `primitive functions-test-function` | Runs a test invocation against a deployed [Primitive Function](https://test.abhinandan.one/cli-overview/cli-functions.md) 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:

- Route resolution and matching output: `primitive routes-test --help`
- Function invocation output and log correlation: `primitive functions-test-function --help` (see [Primitive Functions: Deploy, Route, and Manage](https://test.abhinandan.one/cli-overview/cli-functions.md))

For the API-level test-delivery behavior these commands sit on top of, including how a test delivery is signed, see [Webhook Events Overview](https://test.abhinandan.one/webhook-events.md).
