Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

gcmd (Generate Command)

Generate and run bash commands from natural language descriptions using a local LLM via Ollama.

Demo

gcmd demo

What it does

Describe what you want to do in plain English, and gcmd will generate the appropriate bash command, show you what it does, and let you run it or refine it. Other tools exist like this, but this one is fully designed for local Ollama models.

gcmd find all pdf files larger than 10MB in my home directory

Installation

  1. Install dependencies:
pip install ollama questionary rich
  1. Install Ollama and pull your preferred model (default: llama3.2:3b):
ollama pull llama3.2:3b
  1. Install globally (optional but recommended):
chmod +x gcmd.py
sudo ln -s "$(pwd)/gcmd.py" /usr/local/bin/gcmd

Configuration

On first run, a config file is created at ~/.config/gcmd/config.json:

{
  "model": "llama3.2:3b"
}

Edit this file to use a different Ollama model.

Usage

gcmd <describe your task>

After the command is generated, you can:

  • Run - execute the command in your shell
  • Refine - add more context to get a better command
  • Cancel - exit without running

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages