Code Monkey home page Code Monkey logo

autocomplete's Introduction


os Signup Documentation All-Contributors Discord Twitter

Fig adds autocomplete to your 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


⚡️ Installation


👋 What are "completion specs"?

A completion spec is a declarative schema that specifies the subcommands, options and arguments for a CLI tool. We use these schemas to generate suggestions.


😎 Contribute your first spec in < 3 minutes

Use the steps below or follow our getting started guide: fig.io/docs

Prerequisites:

  • Download Fig for macOS
  • Node and NPM (or Yarn).

Steps

  1. Click here to fork this repo.

  2. Clone your forked repo and create an example spec

# Replace `YOUR_GITHUB_USERNAME` with your own github username
git clone https://github.com/YOUR_GITHUB_USERNAME/autocomplete.git fig-autocomplete
cd fig-autocomplete

# Add withfig/autocomplete as a remote
git remote add upstream https://github.com/withfig/autocomplete.git

# Install packages
npm install

# Create an example spec (call it "abc")
npm run create-spec abc

# Turn on "dev mode"
npm run dev
  1. Now go to your terminal and type abc[space]. Your example spec will appear. 😊

Other things to know

  • Edit your spec in typescript in the src/ folder
  • On save, specs are compiled to the build/ folder
  • In dev mode specs are read from the build folders.

📦 Other available package.json commands

# Typecheck all specs in the src/ folder
npm test

# Compile typescripts specs from src/ folder to build/ folder
npm run build

# Copy all specs from the build/ folder to the ~/.fig/autocomplete folder
npm run copy:all

# Copy an individual spec from the build/ folder to the ~/.fig/autocomplete folder
npm run copy <spec-name>

🔥 Contributions

We would love contributions for:

  • new completion specs
  • errors with existing completion specs (e.g. missing subcomannds, options, or arguments)
  • generators for argument suggestions
  • better descriptions, icons etc
  • themes!

If you aren't able to contribute, please feel free to open an issue. Most people think that contributing will be too hard, but you'd be surprised, we have deliberately made contributing very very easy. Give it a go!

😊 Need Help?

Join our community

🙋‍♀️ FAQ

What terminals does Fig work with?

Fig works with the native MacOS Terminal app, iTerm, Tabby, Hyper and the integrated terminal in VSCode. We are adding support for Alacritty, Kitty, and the integrated terminals in JetBrains very soon.

How does Fig work?

Fig uses the Accessibility API on Mac to position the window, insert text on your behalf, and read what you've typed in your terminal.

Does Fig work on Windows or Linux?

Currently, Fig is only available on MacOS.

How can I download Fig?

Run brew install fig or by downloading the app at fig.io/download.

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.

How do I submit a PR?

Check out our How to Contribute guide. Many of Fig's 150+ contributors made their first open source contribution to Fig!

Did we miss something?

Get in touch at [email protected] or chat with us in Discord.


✨ Contributors

autocomplete's People

Contributors

a7medev avatar alexnaiman avatar ankithm28 avatar bogdaaamn avatar brendanfalk avatar castachick avatar clo4 avatar cstrnt avatar dannyaziz avatar fedeci avatar fig-io avatar flowycoder avatar fwesss avatar geenva avatar gh-action-bump-version avatar grant0417 avatar jubeki avatar kailan avatar lsh avatar miketheman avatar mschrage avatar nicholasoxford avatar nmassardot avatar nutlope avatar quiibz avatar rmorey avatar rolandtshen avatar seonggwonyoon avatar sullivan-sean avatar yavko avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.