Top Related Projects
Fish-like autosuggestions for zsh
🙃 A delightful community-driven (with 2,400+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.
The user-friendly command line shell.
The configuration framework for Zsh
A Zsh theme
:cherry_blossom: A command-line fuzzy finder
Quick Overview
The withfig/autocomplete repository is a collection of autocomplete specifications for various command-line tools and applications. It aims to enhance the command-line experience by providing intelligent suggestions and completions for commands, options, and arguments. The project is designed to work with Fig, a tool that adds autocomplete functionality to terminal environments.
Pros
- Improves productivity by reducing typing and errors in command-line interfaces
- Supports a wide range of popular CLI tools and applications
- Community-driven project with regular updates and contributions
- Easy to integrate with existing terminal setups using Fig
Cons
- Requires installation of Fig, which may not be suitable for all users or environments
- Limited to macOS and some Linux distributions (as of the last update)
- May have occasional inconsistencies or outdated specifications for rapidly evolving tools
- Learning curve for users not familiar with advanced autocomplete features
Getting Started
To use the autocomplete specifications from this repository:
- Install Fig from the official website: https://fig.io/
- Once Fig is installed, it will automatically download and use the latest autocomplete specifications from this repository.
- Open your terminal and start typing commands to see the autocomplete suggestions in action.
For developers who want to contribute:
- Fork the repository
- Create a new specification file or modify an existing one
- Test your changes locally using Fig
- Submit a pull request with your improvements
Note: Detailed contribution guidelines can be found in the repository's CONTRIBUTING.md file.
Competitor Comparisons
Fish-like autosuggestions for zsh
Pros of zsh-autosuggestions
- Lightweight and focused solely on command-line suggestions
- Works seamlessly with Zsh, integrating well with other Zsh plugins
- Provides suggestions based on command history, making it highly personalized
Cons of zsh-autosuggestions
- Limited to Zsh shell, not compatible with other shells like Bash
- Lacks advanced features like context-aware completions or AI-powered suggestions
- May require manual configuration for optimal performance
Code Comparison
zsh-autosuggestions:
# In .zshrc
source /path/to/zsh-autosuggestions.zsh
# Usage
$ git com<TAB> # Suggests 'git commit' based on history
autocomplete:
# Installation
brew install fig
# Usage
$ git <TAB> # Shows context-aware git subcommands
$ docker <TAB> # Displays Docker-specific completions
zsh-autosuggestions focuses on providing simple, history-based suggestions within the Zsh environment. It's lightweight and easy to set up but limited in scope. autocomplete, on the other hand, offers a more comprehensive solution with context-aware completions across multiple shells and tools, including AI-powered suggestions. However, it may have a steeper learning curve and require more system resources.
🙃 A delightful community-driven (with 2,400+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.
Pros of Oh My Zsh
- Extensive plugin ecosystem with a wide range of pre-configured tools and aliases
- Highly customizable with themes and options for prompt customization
- Large and active community, providing support and continuous development
Cons of Oh My Zsh
- Can be slower to load compared to minimal shell configurations
- May include unnecessary features for some users, potentially bloating the shell environment
Code Comparison
Oh My Zsh configuration example:
ZSH_THEME="robbyrussell"
plugins=(git docker kubectl)
source $ZSH/oh-my-zsh.sh
Fig Autocomplete configuration example:
{
"autocomplete": {
"sources": ["git", "docker", "kubectl"]
}
}
Oh My Zsh focuses on providing a comprehensive shell configuration framework, while Fig Autocomplete specializes in enhancing command-line autocomplete functionality. Oh My Zsh offers a broader range of features and customization options, but may come with more overhead. Fig Autocomplete provides a more focused solution for improving command-line productivity through intelligent suggestions and completions.
Both projects aim to enhance the command-line experience, but they approach it from different angles. Oh My Zsh is a full-fledged Zsh configuration framework, while Fig Autocomplete is a tool specifically designed to improve autocomplete functionality across various shells and applications.
The user-friendly command line shell.
Pros of fish-shell
- Complete shell environment with built-in features like autosuggestions and web-based configuration
- Cross-platform support (macOS, Linux, and Windows via WSL)
- Active community and extensive documentation
Cons of fish-shell
- Requires learning a new shell syntax, which may not be compatible with existing Bash scripts
- Limited plugin ecosystem compared to more established shells like Bash or Zsh
Code Comparison
fish-shell:
function greet
echo "Hello, $argv!"
end
greet World
autocomplete:
{
"name": "greet",
"description": "Greet someone",
"args": [
{
"name": "name",
"description": "Name to greet"
}
]
}
Key Differences
- fish-shell is a complete shell replacement, while autocomplete focuses on enhancing existing shells
- autocomplete uses JSON for configuration, while fish-shell uses its own scripting language
- fish-shell provides a more integrated experience, while autocomplete offers flexibility across different shells
Use Cases
- Choose fish-shell for a comprehensive, user-friendly shell environment
- Opt for autocomplete to enhance autocompletion in your existing shell setup without switching entirely
The configuration framework for Zsh
Pros of Prezto
- Comprehensive Zsh configuration framework with modular design
- Extensive customization options for Zsh environment
- Large community and long-standing project with proven stability
Cons of Prezto
- Steeper learning curve for beginners
- Requires manual installation and configuration
- Limited to Zsh shell environments
Code Comparison
Prezto (configuration example):
zstyle ':prezto:*:*' color 'yes'
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'directory'
Autocomplete (configuration example):
{
"autocomplete": {
"sources": ["path", "history", "git"],
"fuzzy": true,
"max_results": 10
}
}
Prezto focuses on comprehensive Zsh configuration, offering a modular approach to customizing the shell environment. It provides extensive options but requires more setup and is limited to Zsh.
Autocomplete, on the other hand, is a more specialized tool focusing on enhancing command-line completion across various shells. It offers a simpler setup process and works with multiple shells, but may not provide the same level of overall shell customization as Prezto.
The choice between the two depends on the user's specific needs, shell preference, and desired level of customization.
A Zsh theme
Pros of Powerlevel10k
- Highly customizable and feature-rich Zsh theme with extensive configuration options
- Extremely fast and efficient, with instant prompt and asynchronous rendering
- Supports a wide range of programming languages and version control systems
Cons of Powerlevel10k
- Limited to Zsh shell, not compatible with other shells or command-line interfaces
- Requires manual configuration and setup, which can be overwhelming for some users
- Focused on prompt customization rather than command-line completion
Code Comparison
Powerlevel10k configuration example:
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
dir
vcs
newline
prompt_char
)
Fig autocomplete example:
{
"name": "git",
"subcommands": [
{
"name": "commit",
"options": [
{ "name": "-m", "description": "Use the given message as the commit message" }
]
}
]
}
While Powerlevel10k focuses on prompt customization, Fig Autocomplete provides intelligent command-line suggestions and completions. Powerlevel10k excels in creating visually appealing and informative prompts, while Fig Autocomplete enhances the command-line experience with context-aware suggestions across various shells and tools.
:cherry_blossom: A command-line fuzzy finder
Pros of fzf
- Lightweight and fast, with minimal dependencies
- Highly versatile, can be used for various fuzzy-finding tasks beyond just shell completion
- Extensive integration with popular tools and editors (vim, tmux, etc.)
Cons of fzf
- Requires more manual setup and configuration for advanced features
- Less focused on providing a polished, out-of-the-box shell completion experience
- May have a steeper learning curve for non-technical users
Code Comparison
fzf:
# Basic usage
fzf
# Using with a command
vim $(fzf)
# Custom fuzzy completion
_fzf_complete_git() {
_fzf_complete "--multi --reverse" "$@" < <(
git branch -a | sed 's/.* //'
)
}
Autocomplete:
# No additional code required for basic usage
# Autocomplete is automatically loaded and activated
# Custom completion spec (simplified example)
const completionSpec: Fig.Spec = {
name: "git",
subcommands: [
{
name: "checkout",
args: {
name: "branch",
generators: {
script: "git branch -a | sed 's/.* //'"
}
}
}
]
}
Both tools offer powerful completion capabilities, but fzf provides a more general-purpose fuzzy finding solution, while Autocomplete focuses on providing a seamless, preconfigured shell completion experience.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Amazon Q Developer CLI
adds IDE-style completions for hundreds of popular CLIs like git
, npm
,
docker
, and aws
. Start typing, and Amazon Q populates contextually relevant
subcommands, options and arguments.
Amazon Q Developer CLI, formerly known as Fig, is open source. See aws/amazon-q-developer-cli to learn more.
â¡ï¸ Installation
- macOS:
- DMG: Download from AWS: aws.amazon.com
- Homebrew:
brew install amazon-q
- Linux/Windows:
- Remote machines
NOTE: Once it's downloaded, launch the app to set up Amazon Q for command line!
ð What are "completion specs"?
A completion spec is a declarative schema that specifies the subcommands
,
options
and args
for a CLI tool. Amazon Q uses 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 Amazon Q for command line
- Node and Pnpm
Steps
-
Make sure you have
pnpm
installed, as that's the package manager used in this repo. -
Click here to fork this repo.
-
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 autocomplete cd autocomplete # Add withfig/autocomplete as a remote git remote add upstream https://github.com/withfig/autocomplete.git # Install packages pnpm install # Create an example spec (call it "abc") pnpm create-spec abc # Turn on "dev mode" pnpm dev
-
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
folder, and generators run every keystroke.
ð¦ Other available package.json commands
# Typecheck all specs in the src/ folder
pnpm test
# Compile typescripts specs from src/ folder to build/ folder
pnpm build
# Lint and fix issues
pnpm lint:fix
ð¥ Contributions
We would love contributions for:
- New completion specs
- Errors with existing completion specs (e.g. missing subcommands, 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.
ðââï¸ FAQ
What terminals does Amazon Q work with?
Amazon Q for command line works with the native macOS Terminal app, iTerm, Tabby, Hyper, Kitty, WezTerm, and Alacritty. It also works in the integrated terminals of VSCode, JetBrains IDEs, Android Studio, and Nova.
Want to see another terminal included? Check our issue tracker and add your support for it!
How does Amazon Q for command line work?
Amazon Q for command line uses the Accessibility API on Mac to position the window, and integrates with your shell to read what you've typed.
Does Amazon Q for command line work on Windows or Linux?
Not yet, Amazon Q for command line is only available on macOS for now. Windows and Linux support is in progress!
How can I download Amazon Q?
Run brew install amazon-q
or, downloading the app at
aws.amazon.com.
Then, launch the Amazon Q app!
How do I submit a PR?
Check out our How to Contribute guide. Many of Amazon Q's 400+ contributors made their first open source contribution to Amazon Q!
Amazon Q for command line doesn't work for me!
Run q doctor
to automatically debug issues with your installation. Otherwise
make an issue in our GitHub discussions community:
aws/q-command-line-discussions
⨠Contributors
Top Related Projects
Fish-like autosuggestions for zsh
🙃 A delightful community-driven (with 2,400+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.
The user-friendly command line shell.
The configuration framework for Zsh
A Zsh theme
:cherry_blossom: A command-line fuzzy finder
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot