Source: https://cli.nylas.com/docs/commands/completion-bash

# nylas completion bash

Generate shell completion script for bash, zsh, fish, or PowerShell.

Written by [Qasim Muhammad](https://cli.nylas.com/authors/qasim-muhammad) Staff SRE

Published February 13, 2026

Updated June 21, 2026

## What does nylas completion bash do?

The nylas completion bash command outputs a shell completion script that enables tab-completion for all Nylas CLI commands, flags, and arguments. Pipe the output into your shell's completion directory or source it from your profile. Works with bash, zsh, fish, and PowerShell — replace 'bash' with your shell name.

## Usage

```bash
nylas completion bash
```

## Flags

| Flag | Description |
| --- | --- |
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
| --no-descriptions | disable completion descriptions |

## Examples

The nylas completion bash command outputs a shell completion script that enables tab-completion for all Nylas CLI commands, flags, and arguments.

### Add completions to.bashrc

```bash
nylas completion bash >> ~/.bashrc
source ~/.bashrc
```

### Add completions to.zshrc

```bash
nylas completion zsh >> ~/.zshrc
source ~/.zshrc
```

### Fish shell completions

```bash
nylas completion fish > ~/.config/fish/completions/nylas.fish
```

## Example output

```text
# bash completion V2 for nylas                            -*- shell-script -*-

__nylas_debug()
{
    if [[ -n ${BASH_COMP_DEBUG_FILE-} ]]; then
        echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
    fi
}
# ... (source with: source <(nylas completion bash))
```

## Troubleshooting

### Completions not working after sourcing

Open a new terminal session. Some shells cache completions and won't pick up changes until restart.

### Completions outdated after CLI update

Regenerate the completion script after each CLI update. The script is tied to the installed version's command set.

## Related commands

[nylas airAI-powered email assistant. Opens an interactive REPL where you can draft, reply, search, and manage email with natural language.](https://cli.nylas.com/docs/commands/air)

[nylas completion fishGenerate Fish completion script](https://cli.nylas.com/docs/commands/completion-fish)

[nylas completion powershellGenerate PowerShell completion script.](https://cli.nylas.com/docs/commands/completion-powershell)

[nylas completion zshGenerate Zsh completion script](https://cli.nylas.com/docs/commands/completion-zsh)

[nylas config getGet a specific config value](https://cli.nylas.com/docs/commands/config-get)

[nylas config listShow all configuration](https://cli.nylas.com/docs/commands/config-list)

Run `nylas completion bash --help` for full help output.
