Home

Awesome

🖥️ LLM-Term

A Rust-based CLI tool that generates and executes terminal commands using OpenAI's language models or local Ollama models.

Features

Demo

LLM-Term Demo

Installation

Development

  1. Clone the repository
  2. Build the project using Cargo: cargo build --release
  3. The executable will be available in the target/release directory

Usage

  1. Set your OpenAI API key (if using OpenAI models):

    • MacOS/Linux:

      export OPENAI_API_KEY="sk-..."
      
    • Windows:

      set OPENAI_API_KEY="sk-..."
      
  2. If using Ollama, make sure it's running locally on the default port (11434)

  3. Run the application with a prompt:

    ./llm-term "your prompt here"
    
  4. The app will generate a command based on your prompt and ask for confirmation before execution.

Configuration

A config.json file will be created in the same directory as the binary on first run. You can modify this file to change the default model and token limit.

Options

Supported Models