Fig adds autocomplete to the terminal. As you type, Fig pops up subcommands, options, and contextually relevant arguments in your existing terminal on macOS.
Looking to improve autocomplete functionality or add support for your favorite CLI tool? We welcome contributions for new specs!
Completion specs are defined in a declarative schema that specifies subcommands
, options
and arguments
. Suggestions can be generated dynamically by running shell commands or reading local files, in addition to the information in the spec itself.
For more documentation and tutorials, visit withfig.com/docs
To request completions for a CLI tool, open an issue.
git clone https://github.com/withfig/autocomplete.git fig-autocomplete
cd fig-autocomplete
# Install packages
npm install
# Go into testing mode
npm run dev
Edit your spec in the dev/
folder. It will compile to the specs/
folder on save. Start testing your spec immediately in your terminal.
Note: Fig usually looks for completion specs in your ~/.fig/autocomplete
folder. When in testing mode, we check your cloned repo's specs/
folder
# Create a new spec from a boilerplate template
npm run create-boilerplate
# Typecheck all specs in the dev/ folder
npm test
# Compile typescripts specs from dev/ folder to specs/ folder
npm run build
# Copy all specs from the specs/ folder to the ~/.fig/autocomplete folder
npm run copy:all
# Copy an individual spec from the specs/ folder to the ~/.fig/autocomplete folder
npm run copy <spec-name>
Fig works with iTerm, the native MacOS Terminal app, Hyper and the integrated terminal in VSCode.
Fig uses the Accessibility API on Mac to insert text on your behalf and read the current keybuffer.
Currently, Fig is only available on MacOS.
Sign up for the waitlist at withfig.com. Fig is currently in a private beta. We are onboarding batches of new users each week.
Yes! Check out our guide on how to get started building autocomplete specs.
Get in touch at [email protected] or chat with us on Slack