DocsTutorialsContributing to public specs

How to contribute

All of Fig's completion specs are open source and driven by the community.

If you're interested in improving existing autocomplete functionality or adding support for a new CLI tool, we welcome contributions!

Setting up the repository

Create your own copy of withfig/autocomplete by forking the repository.

Once you have created your own fork, clone the repo to your local machine.

Make sure to replace YOUR_GITHUB_USERNAME with your actual username.

git clone fig-autocomplete

Finally, link your fork back to the upstream repo so you can pull the latest updates and contribute changes back.

cd fig-autocomplete
git remote add upstream

Making changes

  1. Edit an existing completion spec inside the src/ folder or create a new one
  2. Use npm run dev to start Fig's local development server.
  3. Test your edits in your terminal like you do normally.

Tip 1: You can pull the most up to date version of the withfig/autocomplete repo by running git pull upstream master or from your fork's Github page.

Tip 2: You can view the logs from your spec by right clicking autocomplete popup window and selecting "Inspect element."


If you are adding autocomplete to a new CLI tool, make sure the CLI Skeleton is mapped out correctly.

Before creating a Pull Request:

  1. Run npm run test to validate that your completion spec is well-typed.
  2. Run git pull upstream master to merge the most up to date version of the withfig/autocomplete repo into your local master branch
  3. Run npm run lint:fix to ensure your completion spec has the correct formatting.

Creating a pull request

Commit and push your changes.

git add .
git commit -m "feat: add git completion spec"
git push origin master

Open your fork on Github. You should see a banner, like the one below.

Click the "Contribute" button, then "Open pull request"

You're done! 🎉

The Fig Core team will review your PR as quickly as possible!