---
title: Shell Completion
url: https://arcana.otnelhq.com/docs/shell-completion
---

New in v0.4.0 

Tab completion for bash, zsh, and fish shells.

# Shell Completion

Arcana provides tab completion scripts for **bash**, **zsh**, and **fish** shells. Complete commands, subcommands, flags, model names, provider names, and skill names.

## Setup

### Bash

```bash
# Add to ~/.bashrc
eval "$(arcana completion bash)"

# Or install system-wide
arcana completion bash > /etc/bash_completion.d/arcana
```

### Zsh

```bash
# Add to ~/.zshrc
eval "$(arcana completion zsh)"

# Or install to fpath
arcana completion zsh > "${fpath[1]}/_arcana"
```

### Fish

```bash
# Add to ~/.config/fish/config.fish
arcana completion fish | source

# Or install permanently
arcana completion fish > ~/.config/fish/completions/arcana.fish
```

## What Completes

| Context | Completes |
| --- | --- |
| `arcana ` | Commands: `run`, `doctor`, `models`, `providers`, etc. |
| `arcana run --` | Flags: `--json`, `--timeout`, `--skill`, etc. |
| `arcana models --provider ` | Provider names: `openai`, `anthropic`, etc. |
| `arcana skills list --query ` | Skill names from installed skills |
| `arcana theme set --name ` | Theme names: `dragon`, `bloodmoon`, etc. |
| `arcana cron add --schedule ` | Common cron expressions |

## Verification

After setup, restart your shell and test:

```bash
# Type and press Tab
arcana ru<Tab>     # → arcana run
arcana run --<Tab> # → --json --timeout --skill --ndjson ...
arcana theme set --name <Tab>  # → dragon bloodmoon coven ...
```

## Troubleshooting

### Completion not working

- Restart your shell after adding the eval line
- Ensure `arcana` is on your `PATH`
- Check that the completion script produces output: `arcana completion bash`

### Zsh fpath issues

```bash
# Ensure compinit is loaded
autoload -Uz compinit && compinit

# Then add completion
eval "$(arcana completion zsh)"
```

## Related

- [CLI Commands](/docs/cli) — Full command reference
- [JSON & Exit Codes](/docs/cli-json) — Machine-readable output for CI
- [Quick Start](/docs/quickstart) — Get running in under a minute
