---
title: Using shell completion scripts
framework: swift-package-manager
role: article
role_heading: Article
path: swift-package-manager/documentation/packagemanagerdocs/usingshellcompletion
---

# Using shell completion scripts

Customize your shell to automatically complete swift package commands.

## Overview

Overview Package manager ships with completion scripts for Bash, Zsh, and Fish. Generate completion lists for your shell in order to use it. Bash Use the following commands to install the Bash completions to ~/.swift-package-complete.bash and automatically load them using your ~/.bash_profile file. swift package completion-tool generate-bash-script > ~/.swift-package-complete.bash echo -e "source ~/.swift-package-complete.bash\n" >> ~/.bash_profile source ~/.swift-package-complete.bash Alternatively, add the following commands to your ~/.bash_profile file to directly load completions: # Source Swift completion if [ -n "`which swift`" ]; then     eval "`swift package completion-tool generate-bash-script`" fi Zsh Use the following commands to install the Zsh completions to ~/.zsh/_swift. You can chose a different folder, but the filename should be _swift. This will also add ~/.zsh to your $fpath using your ~/.zshrc file. mkdir ~/.zsh swift package completion-tool generate-zsh-script > ~/.zsh/_swift echo -e "fpath=(~/.zsh \$fpath)\n" >> ~/.zshrc compinit

## See Also

### Guides

- [Creating a Swift package](swift-package-manager/documentation/packagemanagerdocs/creatingswiftpackage.md)
- [Setting the Swift tools version](swift-package-manager/documentation/packagemanagerdocs/settingswifttoolsversion.md)
- [Adding dependencies to a Swift package](swift-package-manager/documentation/packagemanagerdocs/addingdependencies.md)
- [Resolving and updating dependencies](swift-package-manager/documentation/packagemanagerdocs/resolvingpackageversions.md)
- [Creating C language targets](swift-package-manager/documentation/packagemanagerdocs/creatingclanguagetargets.md)
- [Using build configurations](swift-package-manager/documentation/packagemanagerdocs/usingbuildconfigurations.md)
- [Packaging based on the version of Swift](swift-package-manager/documentation/packagemanagerdocs/swiftversionspecificpackaging.md)
- [Bundling resources with a Swift package](swift-package-manager/documentation/packagemanagerdocs/bundlingresources.md)
- [Releasing and publishing a Swift package](swift-package-manager/documentation/packagemanagerdocs/releasingpublishingapackage.md)
- [Generating Software Bill of Materials (SBOM)](swift-package-manager/documentation/packagemanagerdocs/generatingsboms.md)
- [Continuous Integration Workflows](swift-package-manager/documentation/packagemanagerdocs/continuousintegration.md)
- [Plugins](swift-package-manager/documentation/packagemanagerdocs/plugins.md)
- [Module Aliasing](swift-package-manager/documentation/packagemanagerdocs/modulealiasing.md)
- [Using a package registry](swift-package-manager/documentation/packagemanagerdocs/usingswiftpackageregistry.md)
- [Package Collections](swift-package-manager/documentation/packagemanagerdocs/packagecollections.md)
