Awesome
Autocomplete.sh
--help
less, accomplish more: Command your terminal
Command your terminal with intelligent suggestions
Autocomplete.sh adds AI-powered command-line suggestions directly to your terminal. Just type <TAB><TAB>
and it calls an LLM (OpenAI by default) to return the top suggestions for you.
Use natural language without copying between CoPilot or ChatGPT
Quick Start
wget -qO- https://autocomplete.sh/install.sh | bash
Features
- Context-Aware: Considers terminal state, recent commands, and
--help
information - Flexible: Supports various LLM models, from fast and cheap to powerful
- Secure: Enables local LLMs and sanitizes prompts for sensitive information
- Efficient: Caches recent queries for speed and convenience
- Cost-Effective: Monitors API call sizes and costs
Supported Models
We support OpenAI, Groq, Anthropic, and Ollama models. Configure your model with:
autocomplete model
How It Works
Autocomplete.sh provides faster, more accurate suggestions by considering:
- Your machine's environment
- Recently executed commands
- Current directory contents
- Command-specific help information
View the full prompt with:
autocomplete command --dry-run "your command here"
Tips and Tricks
- For command parameters:
ffmpeg # reformat video to fit youtube
then<TAB><TAB>
- For complex tasks:
# create a github repo, init a readme, and push it
then<TAB><TAB>
Configuration
source autocomplete config
Update settings with:
autocomplete config set <key> <value>
Usage Tracking
autocomplete usage
Use Cases
- Data Engineers: Manipulate datasets efficiently
- Backend Developers: Deploy updates swiftly
- Linux Users: Navigate systems seamlessly
- Terminal Novices: Build command-line confidence
- Efficiency Seekers: Streamline repetitive tasks
- Documentation Seekers: Quickly understand commands
Development
Local Installation
git clone git@github.com:closedloop-technologies/autocomplete-sh.git
ln -s $PWD/autocomplete.sh $HOME/.local/bin/autocomplete
. autocomplete.sh install
Testing
sudo apt install bats
bats tests
Docker Testing
docker build -t autocomplete-sh .
docker run --rm -e OPENAI_API_KEY=$OPENAI_API_KEY autocomplete-sh
Maintainers
Currently maintained by Sean Kruzel @closedloop at Closedloop.tech
Contributions and bug fixes are welcome!
Support Open Source
The best way to support Autocomplete.sh is to just use it!
- Just use it!
- Share it!
- Star it!
If you want to help me keep up the energy to build stuff like this, please:
License
See the MIT-LICENSE file for details.