# Enable autocompletion for the Stripe CLI

Let the Stripe CLI automatically complete your commands.

For more details, see the [Stripe CLI reference](https://docs.stripe.com/cli.md).

Use the `stripe completion` command to enable autocompletion in macOS and Linux. After you enable autocomplete, you can type a command and press the **Tab** key to view available commands and flags. The Stripe CLI doesn’t currently support Windows autocompletion.

## Use Zsh to set up autocompletion 

Open a new Zsh shell and run the following commands:

```bash
stripe completion
mkdir -p ~/.stripe
mv stripe-completion.zsh ~/.stripe
```

Add the following lines to your `.zshrc` file:

```bash
# The next lines enables shell command completion for Stripe
fpath=(~/.stripe $fpath)
autoload -Uz compinit && compinit -i
```

## Use Bash to set up autocompletion 

Follow the instructions in [bash-completion](https://formulae.brew.sh/formula/bash-completion/) to set up bash completions. Open a new Bash shell and run the following commands:

```bash
stripe completion
mkdir -p ~/.stripe
mv stripe-completion.bash ~/.stripe
```

Add the following lines to your `.bashrc` file:

```bash
# The next line enables shell command completion for Stripe
source ~/.stripe/stripe-completion.bash
```
