closedloop-technologies / autocomplete-sh

Large language model in the terminal! Less `--help` and `man` and more getting stuff done
MIT License
42 stars 2 forks source link

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.

Autocomplete.sh Demo

Use natural language without copying between CoPilot or ChatGPT

Quick Start

wget -qO- https://autocomplete.sh/install.sh | bash

Features

Supported Models

We support OpenAI, Groq, Anthropic, and Ollama models. Configure your model with:

autocomplete model

Model Selection

How It Works

Autocomplete.sh provides faster, more accurate suggestions by considering:

View the full prompt with:

autocomplete command --dry-run "your command here"

Tips and Tricks

  1. For command parameters: ffmpeg # reformat video to fit youtube then <TAB><TAB>
  2. For complex tasks: # create a github repo, init a readme, and push it then <TAB><TAB>

Configuration

source autocomplete config

Configuration Options

Update settings with:

autocomplete config set <key> <value>

Usage Tracking

autocomplete usage

Usage Statistics

Use Cases

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!

If you want to help me keep up the energy to build stuff like this, please:

"Buy Me A Coffee"

License

See the MIT-LICENSE file for details.