b9ceaecc3d0b2a322b918fbe0d94ba30939f168b
# finish.sh
AI-powered shell completion that runs 100 % on your machine.
One command and your terminal learns what you type next.
## Install
```bash
curl -sSL https://git.appmodel.nl/tour/finish/raw/branch/main/docs/install.sh | bash
source ~/.bashrc # or ~/.zshrc
Press Tab twice on any partial command and finish.sh suggests the rest—no cloud, no data leak, no latency.
How it works
- Captures your current directory, recent history, env vars.
- Builds a concise prompt for a local LLM (LM-Studio, Ollama, or any OpenAI-compatible endpoint).
- Returns ranked completions in <200 ms, cached for instant replay.
Use
docker <Tab><Tab> # → docker run -it --rm ubuntu bash
git commit <Tab><Tab> # → git commit -m "feat: add finish.sh"
# large files <Tab><Tab> # → find . -type f -size +100M
Dry-run mode:
finish --dry-run "tar czf backup.tar.gz"
Configure
finish config set endpoint http://plato.lan:11434/v1/chat/completions
finish config set model codellama:13b
finish model # interactive picker
Providers
| Provider | Auth | URL | Notes |
|---|---|---|---|
| LM-Studio | none | http://localhost:1234/v1 |
default |
| Ollama | none | http://localhost:11434 |
|
| OpenAI | key | https://api.openai.com/v1 |
Add others by editing ~/.finish/config.
Commands
finish install # hook into shell
finish remove # uninstall
finish clear # wipe cache & logs
finish usage # tokens & cost
Requirements
Bash ≥4 or Zsh ≥5, curl, jq, bc.
Optional: bash-completion.
{
"provider": "lmstudio",
"model": "darkidol-llama-3.1-8b-instruct-1.3-uncensored_gguf:2",
"endpoint": "http://plato:1234/v1/chat/completions",
"temperature": 0.0,
"api_prompt_cost": 0.0,
"api_completion_cost": 0.0,
"max_history_commands": 20,
"max_recent_files": 20,
"cache_size": 100
}
{
"provider": "ollama",
"model": "llama3:latest",
"endpoint": "http://localhost:11434/api/chat",
"temperature": 0.2,
"api_prompt_cost": 0.0,
"api_completion_cost": 0.0,
"max_history_commands": 20,
"max_recent_files": 20,
"cache_size": 100
}
License
BSD 2-Clause.
Description
Releases
1
basic functionality
Latest
Languages
Shell
70.5%
Python
25.7%
Dockerfile
2%
Ruby
1.8%