---
schema_version: "1"
id: 2e362f24f5367d73a71fd87a728d4625a63a8590233c062379de6d0408438fbe
title: Configuring Command Autocompletion
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/exchange/apicat-configure-cli-autocomplete.md
canonical_url: https://docs.mulesoft.com/exchange/apicat-configure-cli-autocomplete
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 731a2e01d484e84accda3c8bf286b8f9c0d6d6d2aa146195a1ea9a167c2b5726
description: MuleSoft Documentation Site
latest: true
---
---
product: Exchange
---

# Configuring Command Autocompletion

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The `api-catalog-cli autocomplete` command enables you to configure completion for API Catalog CLI
commands.

To configure command autocompletion:

- If you are using a Bash shell:

  1.  Run `api-catalog autocomplete bash`. This creates a cache and displays configuration and test
      instructions.

  2.  Follow the instructions that are displayed by the command:

      1. Add the autocomplete env var to your bash profile and source it
         $ printf "eval $(api-catalog autocomplete:script bash)" >> ~/.bashrc; source ~/.bashrc

      NOTE: If your terminal starts as a login shell you may need to print the init script into
      ~/.bash\_profile or ~/.profile.

      2. Test it out, e.g.: $ api-catalog <TAB><TAB>                 # Command completion
        $
         api-catalog \[command\] --<TAB><TAB> # Flag completion

- If you are using a Z shell:

  1.  Run `api-catalog autocomplete zsh`. This creates a cache and displays configuration and test
      instructions.

  2.  Follow the instructions that are displayed by the command:

      1. Add the autocomplete env var to your zsh profile and source it $ printf "eval $(api-catalog
         autocomplete:script zsh)" >> ~/.zshrc; source ~/.zshrc

      NOTE: After sourcing, you can run \`$ compaudit -D\` to ensure that no permissions conflicts
      are present

      2. Test it out, e.g.: $ api-catalog <TAB>                 # Command completion
        $
         api-catalog \[command\] --<TAB> # Flag completion

## api-catalog autocomplete

$ api-catalog autocomplete \[flags\]

This command accepts the following flags:

<table><colgroup><col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p>blank</p></div></div></td><td><div><div><p>Displays instructions for configuring autocompletion</p></div></div></td></tr><tr><td><div><div><p>bash</p></div></div></td><td><div><div><p>Installs autocompletion using Bash shell settings</p></div></div></td></tr><tr><td><div><div><p>zsh</p></div></div></td><td><div><div><p>Installs autocompletion using Z shell settings</p></div></div></td></tr><tr><td><div><div><p>-r, --refresh cache</p></div></div></td><td><div><div><p>Removes the current autocompletion configuration. Use this before running the command with a different shell type.</p></div></div></td></tr></tbody></table>

**Examples**

$ api-catalog autocomplete
$ api-catalog autocomplete bash $ api-catalog autocomplete zsh
$
api-catalog autocomplete --refresh-cache

> [!WARNING] The API Catalog CLI autocomplete plugin is not currently supported in Windows.
