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
Now start editing specs in the dev/
. They will compile to the specs/
folder on save. You can start testing your spec immediately in your terminal.
Note: by default, Fig looks for completion specs in your ~/.fig/autocomplete
folder
Install the following plugins discussed here: https://forum.withfig.com/t/auto-linting-and-auto-formatting-completion-specs/53
# 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>
These CLI commands update the ~/.fig/settings.json
file. Read more here.
# Turn on Fig developer mode
fig settings autocomplete.developerMode true
# Update the folder Fig uses to look for completion specs.
# Only works in developer mode. Otherwise, defaults to ~/.fig/autocomplete
fig settings autocomplete.devCompletionsFolder path/to/folder
Note: These settings are updated automatically when starting / stopping npm run dev
Fig works with iTerm, the native MacOS Terminal app, Hyper and the integrated terminal in VSCode.
Fig has built an API around the terminal that allows you to insert text, position windows, and run local shell commands and render output in a browser.
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 the autocomplete for teams in our docs. Reach out to [email protected] if you need help.
Get in touch at [email protected] or chat with us on Slack