Skip to content

Fig

A repository of command-line completion specs that add IDE-style suggestions to your terminal.withfig/autocomplete

Stars
25.2k
Forks
5.4k
Licence
MIT
Language
TypeScript
Last update
1.5 years ago
Type
Other

No commits in over a year — check for forks or alternatives before adopting.

What it is

This repository holds declarative completion specs describing the subcommands, options and arguments of many popular command-line tools such as git, npm, docker and aws. The README says these specs power autocomplete suggestions in the terminal, and that the completions are now provided by Amazon Q Developer CLI, formerly Fig. Developers use it to get contextual suggestions as they type commands in their shell.

  • Get suggested subcommands and flags for git, npm, docker or aws as you type
  • Write a new TypeScript completion spec for a CLI you use and test it in dev mode
  • Fix missing options or arguments in an existing spec and submit a pull request

Great for

  • macOS developers who use zsh, bash or fish and want suggestions for common CLIs
  • Developers who want to write or fix completion specs for a tool they use
  • Contributors who want to add missing subcommands or options to existing specs

Not ideal for

  • Linux or Windows users, since the README says Amazon Q for command line is macOS-only for now and Linux/Windows support is still in progress
  • People who want a standalone project to run without the Amazon Q app, since the README ties the completions to that app
  • Anyone looking for a self-contained library to install from a package manager, since the README describes this repo mainly as a spec collection
Step-by-step guide: how to use FigInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Node.js · pnpm · Amazon Q for command line (macOS app)

    Install Amazon Q on macOS via Homebrew

    brew install amazon-q

    Clone your fork of the repo

    git clone https://github.com/YOUR_GITHUB_USERNAME/autocomplete.git autocomplete

    Install packages

    pnpm install

    Turn on dev mode

    pnpm dev
  2. 2

    Run it

    • Install Amazon Q for command line on macOS, either by the DMG or with brew install amazon-q, and launch the app.
    • Fork and clone the repository, then run pnpm install in the folder.
    • Run pnpm create-spec abc to create an example spec, then pnpm dev to turn on dev mode.
    • In your terminal, type abc followed by a space to see the example spec appear.
  3. 3

    Get the most out of it

    • Edit specs in the src/ folder and run pnpm build to compile them to build/
    • Run pnpm test to typecheck all specs before submitting changes
    • Run pnpm lint:fix to fix lint issues in your spec changes
    • Use the README's generators guide to add dynamic argument suggestions
    • If completions fail after installing, run q doctor as the README suggests

Downloads

Strengths

  • Covers hundreds of popular CLIs according to the README
  • Specs are plain TypeScript files that are easy to read and edit
  • Active contributor community, with the README citing 400+ contributors

Trade-offs

  • The README states it is macOS-only for now, with Linux and Windows still in progress
  • Completions depend on the Amazon Q Developer CLI app, so the setup is tied to AWS's product
  • The README's latest-release and last-push information suggests the repo is not updated frequently, and the README itself is focused on Amazon Q

How it compares

ProjectStarsTypeLevelUpdatedBest for
autocomplete (this)25.2kOtherintermediate1.5 years agomacOS developers who use zsh, bash or fish and want suggestions for common CLIs
zsh-autosuggestions36.2kAppbeginner1.4 years agoPeople who use zsh as their daily terminal shell
inshellisense10.8kDev toolbeginner7 days agoDevelopers who spend a lot of time in the terminal and want suggestions for unfamiliar command options
atuin32.2kDev toolbeginner4 days agoDevelopers who work in a terminal and often need to find past commands
zoxide40.4kDev toolbeginner4 days agoDevelopers who move between many project folders in a terminal
direnv15.5kDev toolbeginner11 days agoDevelopers who juggle several projects with different environment variables

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.