--- title: Enable auto-completion for Solana CLI date: 2022-10-19 00:44:09.005181 UTC --- If you are using the [command-line tool](https://docs.solana.com/cli) for Solana blockchain, you may be tired from remembering and typing its subcommands and options. How to get auto-completion for it? Thank to great Rust libraries, Solana CLI automatically has a feature to generate auto-completion scripts. It is just that the feature is not mentioned in documentation yet. To generate this script for your shell, just run: ```console $ solana completion -s ``` For example, I use Zsh shell, so my command is: ```console $ solana completion -s zsh ``` The script content is returned via _standard output_, you need to save to some file and config your shell to "source" it. How to do is different from shell to shell. Following is my example with Zsh. In my setup, (and just my personal taste), I have a folder _~/.local/share/zsh_extras/zfunc_ to contain auto-completion scripts for various tools. The folder is declared to Zsh as specified in _.zshrc_: ```sh fpath=(~/.local/share/zsh_extras/zfunc $fpath) ``` To enable auto-completion for Solana CLI, I just need to dump the script to this folder: ```console $ solana completion -s zsh > ~/.local/share/zsh_extras/zfunc/_solana ``` Done. Now open new Terminal window, the `solana` command can be auto-complete. ![solana-complete](https://quan-images.b-cdn.net/blogs/imgur/2026/NOncmyf.png)