Skip to main content

A Linux CLI assistant

Project description

TerMate 🤖💻

TerMate is a command-line assistant powered by OpenRouter.
It helps you generate safe Linux commands with explanations, and lets you choose to run them interactively from the terminal.

I originally built this just for fun, but it turned out to be much better and more useful than I expected.

📂 Project Structure

CLIAI/
├── src/
│   ├── app.py               # Entry point
│   ├── utils/
│   │   ├── openRouterClient.py  # Handles OpenRouter API calls
│   │   ├── processCommand.py    # Parses JSON and displays steps
│   │   ├── runCommand.py        # Executes Linux commands with consent
│   │   ├── bcolors.py           # CLI color helper
│   │   └── userCLI.py           # CLI loop & interaction
└── README.md

🔑 API Key Setup

You need an API key from OpenRouter.

  • Sign up for free and grab your API key.
  • Set it as an environment variable so the app can use it:

Linux / macOS

export OPENROUTER_API_KEY="your_api_key_here"

(You can add this line to your ~/.bashrc or ~/.zshrc to make it permanent.)

After setting it, restart your terminal.

✅ The app will automatically read the key from the OPENROUTER_API_KEY environment variable. Currently, the project is configured to run on the free model: deepseek/deepseek-chat-v3.1:free

🚀 How to Run

  1. Clone this repository:

    git clone https://github.com/heshanthenura/termate.git
    cd termate
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the app:

    python src/app.py
    

⚠️ Disclaimer

This project is not production ready. Always review commands before running them. The authors are not responsible for any damage caused by running generated commands.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termate_ai-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

termate_ai-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file termate_ai-0.1.0.tar.gz.

File metadata

  • Download URL: termate_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for termate_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bb1a797271704756f7891739d1b9584fd07aa536c80f605e75ededcef5643317
MD5 55e1f660d3b1edfbd0e4d1bc8dbe3e24
BLAKE2b-256 2d1e4676fe7d37879e188fca84ac48210452c7da71f973c966916f261c609e08

See more details on using hashes here.

File details

Details for the file termate_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: termate_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for termate_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26000a5685b8464808d42142dd0a500b4929859e89665f2b95c6a19e746b0ad3
MD5 8607c7768bd36976d093b0f8acba171d
BLAKE2b-256 2c975361967ad28ffcefc9e248cb92ee8a34eac9d58f9dac2a4460f0c4a58a0c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page