# withfig/autocomplete

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/withfig-autocomplete).**

25,189 stars · 5,455 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/withfig/autocomplete
- Homepage: https://fig.io
- awesome-repositories: https://awesome-repositories.com/repository/withfig-autocomplete.md

## Topics

`autocomplete` `bash` `cli` `fig` `fish` `hacktoberfest` `iterm2` `macos` `shell` `terminal` `typescript` `zsh`

## Description

This project is a shell autocomplete engine and completion provider that adds real-time suggestions for command line interface options and arguments within a terminal. It functions as a declarative completion framework, allowing command hierarchies and option sets to be defined via structured data instead of manual shell scripts.

The system acts as a cross-shell completion bridge, translating a single unified definition into commands compatible with multiple different shell environments. This ensures a consistent autocomplete experience across various terminals using a shared specification format.

The engine handles the parsing and resolution of JSON-based specifications to determine valid subcommands and flags based on cursor position. It utilizes shell-integrated hooks to intercept terminal input and apply dynamic filtering to provide hints as the user types.

## Tags

### Development Tools & Productivity

- [Completion Frameworks](https://awesome-repositories.com/f/development-tools-productivity/custom-completion-providers/completion-frameworks.md) — Implements a declarative framework for defining shell autocomplete specifications using structured data instead of manual scripts.
- [Declarative Schemas](https://awesome-repositories.com/f/development-tools-productivity/shell-completion-generators/declarative-schemas.md) — Allows command hierarchies and options to be defined via structured data instead of manual shell scripts.
- [CLI Autocompletion Generators](https://awesome-repositories.com/f/development-tools-productivity/cli-autocompletion-generators.md) — Generates shell completion scripts from declarative schemas for subcommands and options. ([source](https://cdn.jsdelivr.net/gh/withfig/autocomplete@master/README.md))
- [Cross-Shell Completion Interfaces](https://awesome-repositories.com/f/development-tools-productivity/cross-shell-completion-interfaces.md) — Provides a unified bridge that ensures a consistent autocomplete experience across multiple different shell environments.
- [Shell Autocompletion Providers](https://awesome-repositories.com/f/development-tools-productivity/shell-autocompletion-providers.md) — Ships an engine that provides context-aware command and flag suggestions within terminal shells using declarative schemas.
- [Declarative Specifications](https://awesome-repositories.com/f/development-tools-productivity/shell-completion-generators/declarative-specifications.md) — Defines command hierarchies and option sets through structured data instead of shell scripts.
- [Shell Completion Providers](https://awesome-repositories.com/f/development-tools-productivity/shell-completion-providers.md) — Acts as a backend that generates real-time suggestions for CLI options and arguments.
- [Shell Integration Hooks](https://awesome-repositories.com/f/development-tools-productivity/shell-integration-hooks.md) — Intercepts terminal input via native shell scripts to trigger the suggestion engine.
- [Command Suggestion Tools](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/cli-tooling-frameworks/command-suggestion-tools.md) — Analyzes user input to provide intelligent, real-time completions for command-line instructions.
- [CLI User Experience Tools](https://awesome-repositories.com/f/development-tools-productivity/cli-user-experience-tools.md) — Enhances the usability of CLI tools by providing real-time hints for options and arguments.
- [Environment-Aware Completion Filtering](https://awesome-repositories.com/f/development-tools-productivity/command-suggestion-engines/environment-aware-completion-filtering.md) — Matches user input against completion schemas to narrow down valid subcommands and flags.
- [Developer Experience](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/workflow-productivity-enhancers/developer-productivity-utilities/developer-experience.md) — Improves the developer workflow by providing real-time command hints directly in the shell.
- [Interactive CLI Tools](https://awesome-repositories.com/f/development-tools-productivity/interactive-cli-tools.md) — Provides an intuitive interaction model for complex CLI tools through advanced autocompletion.

### Part of an Awesome List

- [Command Line Interface](https://awesome-repositories.com/f/awesome-lists/devtools/command-line-interface.md) — Adds IDE-style suggestions to terminals to help users discover available commands.
- [Command Line Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/command-line-utilities.md) — Context-aware terminal autocompletion for commands.

### Data & Databases

- [Completion Spec Resolution](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/file-based-storage/local-file-storage/json-based-persistence/completion-spec-resolution.md) — Parses JSON configuration files into a structured tree to determine available completions.
- [Input Suggestions](https://awesome-repositories.com/f/data-databases/search-suggestions/input-suggestions.md) — Provides real-time filtering of available subcommands and flags as the user types.

### Software Engineering & Architecture

- [Cursor-Position Resolution](https://awesome-repositories.com/f/software-engineering-architecture/path-based-schema-resolution/cursor-position-resolution.md) — Parses structured configuration into a command tree to determine valid suggestions based on cursor position.
