> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# phala completion

> Generate shell completion scripts for bash, zsh, or fish.

## Usage

```
phala completion [options]
```

## Options

| Flag      | Short | Default     | Description                           |
| --------- | ----- | ----------- | ------------------------------------- |
| `--shell` |       | auto-detect | Shell type (bash, zsh, fish)          |
| `--fig`   |       |             | Generate Fig/Amazon Q completion spec |

If `--shell` is omitted, the CLI auto-detects the shell from the `$SHELL` environment variable.

## Examples

### Bash

```bash theme={"system"}
$ phala completion --shell bash >> ~/.bashrc && source ~/.bashrc
```

### Zsh

```bash theme={"system"}
$ phala completion --shell zsh >> ~/.zshrc && source ~/.zshrc
```

### Fish

```bash theme={"system"}
$ phala completion --shell fish > ~/.config/fish/completions/phala.fish
```

### Fig/Amazon Q

```bash theme={"system"}
$ phala completion --fig
```
