gerg is a command‑line agent that uses your local Ollama model to plan shell commands for a natural‑language task. It can either output the command to help, or execute it for you.
Safety-first: by default gerg asks before running anything. Use
--yesto auto‑run, and see--allow-unsafeto permit risky commands.
pip install gerg- Make sure Ollama is running locally (default
http://127.0.0.1:11434). - Run gerg:
gerg "list all files in my Downloads directory"- Approve the plan or run automatically:
gerg -y "compress the Downloads folder into downloads.zip"- Need multi-step planning and commands. Enable the --think flag for Chain of Thought planning and execution.
- Change default model with:
export GERG_MODEL="DESIRED MODEL"# Only print commands (never execute)
gerg --print "find the 5 largest files under ~/Downloads"
# Use a different model just for this run
gerg -m llama3:8b "init a git repo, make first commit"
# Work from another directory (without cd'ing first)
gerg --cwd ~/Projects/website "build the site and serve locally"
gerg --think "create a .txt file in my Documents folder with a simple rhyme"