explaingit

withfig/autocomplete

25,183TypeScriptAudience · developerComplexity · 2/5StaleLicenseSetup · moderate

TLDR

Community database of autocomplete specs for terminal commands. Describes what flags, subcommands, and arguments each CLI tool accepts so your terminal can suggest them as you type.

Mindmap

mindmap
  root((repo))
    What it does
      Terminal autocomplete
      Suggestion menus
      IDE-style completions
    How it works
      TypeScript specs
      Describes CLI structure
      Amazon Q reads specs
    Use cases
      Add completions
      Fix existing specs
      Improve CLI experience
    Tech stack
      TypeScript
      Amazon Q CLI
      Shell integration
    Audience
      CLI tool users
      Open source contributors

Things people build with this

USE CASE 1

Add autocomplete specs for a CLI tool you maintain or use frequently.

USE CASE 2

Fix or improve existing completion specs for popular command-line tools.

USE CASE 3

Enable IDE-style suggestions in your terminal for hundreds of tools without writing specs yourself.

Tech stack

TypeScriptAmazon Q Developer CLImacOS Accessibility API

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Amazon Q Developer CLI setup and macOS Accessibility API permissions configuration.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

This repository is the community-maintained database of completion specifications for Amazon Q Developer CLI (formerly known as Fig), a tool that adds IDE-style autocomplete to your terminal. When you start typing a command like "git commit" or "docker run", the tool pops up a suggestion menu showing available subcommands, flags, and arguments, similar to how code editors like VS Code suggest completions as you type code. Each completion spec is a small TypeScript file that describes the structure of a command-line tool: what subcommands it has, what flags those subcommands accept, and what kinds of arguments to expect. Amazon Q reads these specs to generate contextually relevant suggestions. The repository contains specs for hundreds of popular tools. The actual tool that displays completions is Amazon Q Developer CLI, which you install separately and is currently only available on macOS (Linux and Windows support is in progress). The tool uses the Mac Accessibility API to position the suggestion window and integrates with your shell to read what you have typed. You would contribute to this repo if you want to add or fix a completion spec for a command-line tool you use. The specifications themselves are written in TypeScript.

Copy-paste prompts

Prompt 1
Show me how to write a completion spec for a custom CLI tool in this repo's format.
Prompt 2
I want to add autocomplete for my npm package. What does a TypeScript spec file look like in this repo?
Prompt 3
How do I test a new completion spec before submitting it to this repository?
Prompt 4
What's the structure of a subcommand definition in Amazon Q's completion spec format?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.