https://github.com/closedLoop-technologies/autocomplete-sh
Large language model in the terminal! Less `--help` and `man` and more getting stuff done
https://github.com/closedLoop-technologies/autocomplete-sh
Last synced: 30 days ago
JSON representation
Large language model in the terminal! Less `--help` and `man` and more getting stuff done
- Host: GitHub
- URL: https://github.com/closedLoop-technologies/autocomplete-sh
- Owner: closedloop-technologies
- License: mit
- Created: 2024-05-30T07:41:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-25T01:38:31.000Z (11 months ago)
- Last Synced: 2024-08-03T06:01:15.253Z (10 months ago)
- Language: Shell
- Size: 9.08 MB
- Stars: 32
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-code-ai - autocomplete.sh
README
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 `` 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
```bash
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:
```bash
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 informationView the full prompt with:
```bash
autocomplete command --dry-run "your command here"
```## Tips and Tricks
1. For command parameters: `ffmpeg # reformat video to fit youtube` then ``
2. For complex tasks: `# create a github repo, init a readme, and push it` then ``## Configuration
```bash
source autocomplete config
```
Update settings with:
```bash
autocomplete config set
```## Usage Tracking
```bash
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
```bash
git clone [email protected]:closedloop-technologies/autocomplete-sh.git
ln -s $PWD/autocomplete.sh $HOME/.local/bin/autocomplete
. autocomplete.sh install
```We can also install the development version from the local file:
```bash
./docs/install.sh dev
```### Testing
```bash
sudo apt install bats
bats tests
```### Docker Testing
```bash
docker build -t autocomplete-sh .
docker run --rm -e OPENAI_API_KEY=$OPENAI_API_KEY autocomplete-sh
```## Maintainers
Currently maintained by Sean Kruzel [@closedloop](https://github.com/closedloop) at [Closedloop.tech](https://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!](https://github.com/closedloop-technologies/autocomplete-sh?tab=readme-ov-file#quick-start)
- [Share it!](https://x.com/intent/post?text=I+love+autocomplete.sh%21++I+just+press+%3CTAB%3E%3CTAB%3E+to+just+build+quickly+%40JustBuild_ai)
- Star it!If you want to help me keep up the energy to build stuff like this, please:
[](https://www.buymeacoffee.com/skruzel)
## License
See the [MIT-LICENSE](./LICENSE) file for details.