Skip to content

gexiaowei/autocomplete

Repository files navigation

[![All Contributors](https://img.shields.io/badge/all_contributors-22-orange.svg?style=flat-square)](#contributors-)


os Signup Documentation 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>

Can I create autocomplete specs for myself / my team's internal scripts?

Hell yeah: https://withfig.com/docs/autocomplete/getting-started

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.

Did we miss something?

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

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Brendan Falk

💻

Roland Shen

💻

Matt Schrage

💻

Tim Raderschad

💻

Tom

💻

Julius Kiekbusch

💻

Flowy

💻

Sam Winslow

💻

James Jackson

💻

Dipak Parmar

💻

Danny Aziz

💻

JJ Fliegelman

💻

Alexandru Naiman

💻

Omi

💻

winnayx

💻

Brian

💻

Vicente Úbeda

💻

Ravi Y

💻

Carter

💻

Gerard de Brieder

💻

Chair4ce

💻

Liam McCann

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Fig adds autocomplete to your terminal.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%