Skip to content

Latest commit

 

History

History
134 lines (94 loc) · 8.29 KB

README.md

File metadata and controls

134 lines (94 loc) · 8.29 KB


os Signup Documentation All-Contributors Slack Twitter

Fig adds autocomplete to the terminal. As you type, Fig pops up subcommands, options, and contextually relevant arguments in your existing terminal on macOS.

Fig Visual Autocomplete For Your Terminal Demo

Add a completion spec for a CLI tool

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.

Get Started

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


Other available commands

# 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>

FAQ

What terminals does Fig work with?

Fig works with iTerm, the native MacOS Terminal app, Hyper and the integrated terminal in VSCode.

How does Fig work?

Fig uses the Accessibility API on Mac to insert text on your behalf and read the current keybuffer.

Does Fig work on Windows or Linux?

Currently, Fig is only available on MacOS.

How can I get access?

Sign up for the waitlist at withfig.com. Fig is currently in a private beta. We are onboarding batches of new users each week.

Can I use Fig to build autocomplete for my team's internal scripts and CLI tools?

Yes! Check out our guide on how to get started building autocomplete specs.

Did we miss something?

Get in touch at [email protected] or chat with us on Slack

Contributors ✨