Skip to content

koompi/koopmi-linux-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KOOMPI Linux MCP

🌍 Multi-lingual Terminal Enhancement Tool - Bringing natural language commands to Linux terminals in English, Khmer, and more!

Rust License: MIT Platform

🚀 What is KOOMPI Linux MCP?

KOOMPI Linux MCP is a revolutionary terminal enhancement tool that seamlessly integrates with ANY existing terminal to provide multi-lingual natural language command translation. Instead of memorizing complex CLI commands, just tell your terminal what you want to do in plain English or Khmer!

🆕 What's New in v0.2.0

  • 🤖 AI-Powered Translation: Integration with DeepSeek, OpenAI, Kimi, and Claude APIs
  • 💾 Offline Mode: Enhanced pattern matching for 30+ common commands without internet
  • ⚡ Smart Caching: Reduces API costs by caching translations for 1 hour
  • 🔒 Privacy Mode: Support for local AI models (Ollama, llama.cpp)
  • 🌏 Better Language Support: Improved handling of mixed-language commands

✨ Key Features

  • 🗣️ Natural Language Commands: show me large filesfind . -size +100M -ls
  • 🌏 Multi-lingual Support: English, Khmer (ភាសាខ្មែរ), Chinese, and more
  • 🤖 AI-Powered Translation: Supports DeepSeek, OpenAI, Kimi, Claude, and local models
  • 🔄 Universal Integration: Works with ANY terminal (GNOME Terminal, Alacritty, iTerm2, VS Code, etc.)
  • 🐧 Cross-Platform: Supports all major Linux distributions + macOS
  • 💾 Offline Mode: Works without internet using enhanced pattern matching
  • Smart Caching: Reduces API costs with intelligent result caching
  • 🔒 Privacy First: Optional local AI models for sensitive environments

📦 Supported Linux Distributions

  • Ubuntu/Debian (apt)
  • Fedora/RHEL/CentOS (dnf/yum)
  • Arch Linux (pacman)
  • openSUSE (zypper)
  • Gentoo (portage)
  • Void Linux (xbps)
  • Alpine Linux (apk)
  • NixOS (nix)
  • macOS (homebrew)

🏃‍♂️ Quick Start

One-Line Installation

curl -sSL https://koompi.org/install/interminal-mcp | bash

Manual Installation

  1. Install Rust (if not already installed):

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    source ~/.cargo/env
  2. Clone and Build:

    git clone https://github.com/koompi/koompi-linux-mcp.git
    cd koompi-linux-mcp
    cargo build --release
  3. Install:

    ./target/release/koompi-mcp install
  4. Configure AI Provider (Optional but recommended):

    # Copy environment template
    cp .env.example .env
    
    # Edit .env and add your API key
    # For Kimi/Moonshot (recommended):
    KOOMPI_AI_PROVIDER=kimi
    KOOMPI_AI_API_KEY=your_moonshot_api_key_here
    
    # Or use local mode (no API needed):
    KOOMPI_AI_PROVIDER=local
  5. Restart your terminal or run:

    source ~/.bashrc

🎯 Usage Examples

English Commands

# File operations
show me hidden files          # → ls -la
find large files              # → find . -size +100M -ls  
copy this folder              # → cp -r . ../backup

# System operations
show running processes        # → ps aux
check disk space             # → df -h
kill chrome                  # → pkill chrome

# Package management
install python               # → sudo apt install python3 python3-pip
install video editor        # → sudo apt install kdenlive
update system               # → sudo apt update && sudo apt upgrade

Khmer Commands (ភាសាខ្មែរ)

# ប្រតិបត្តិការឯកសារ
បង្ហាញឯកសារលាក់                    # → ls -la
រុករកឯកសារធំៗ                     # → find . -size +100M -ls
ចម្លងថតនេះ                      # → cp -r . ../backup

# ប្រតិបត្តិការប្រព័ន្ធ  
បង្ហាញដំណើរការដែលកំពុងដំណើរការ       # → ps aux
ពិនិត្យទំហំថាស                   # → df -h
ឃាត់ chrome                    # → pkill chrome

# ការគ្រប់គ្រងកម្មវិធី
ដំឡើង python                   # → sudo apt install python3 python3-pip
ដំឡើងកម្មវិធីកែវីដេអូ               # → sudo apt install kdenlive
ធ្វើបច្ចុប្បន្នភាពប្រព័ន្ធ            # → sudo apt update && sudo apt upgrade

Mixed Language Commands

ដំឡើង python និង nodejs         # → sudo apt install python3 nodejs
show me ឯកសារធំៗ               # → find . -size +100M -ls
install កម្មវិធីរុករក              # → sudo apt install firefox

🛠️ Commands

Installation & Setup

koompi-mcp install                    # Install shell integration
koompi-mcp uninstall                  # Remove shell integration  
koompi-mcp setup --terminal=alacritty # Setup for specific terminal

Usage

koompi-mcp process "show large files" # Process natural language command
koompi-mcp translate "បង្ហាញឯកសារ"      # Translate Khmer to CLI

Configuration

koompi-mcp config show                # Show current configuration
koompi-mcp config set primary-language km  # Set Khmer as primary
koompi-mcp config set auto-confirm true    # Enable auto-confirmation

⚙️ Configuration

AI Provider Setup

Configure AI translation in .env file:

# AI Provider (openai, deepseek, kimi, claude, local)
KOOMPI_AI_PROVIDER=kimi

# API Key (get from provider's website)
KOOMPI_AI_API_KEY=sk-xxxxxxxxxxxx

# Model selection
KOOMPI_AI_MODEL=moonshot-v1-8k

# For local/offline mode
KOOMPI_AI_PROVIDER=local

See AI Setup Guide for detailed configuration.

System Configuration

Additional settings in ~/.config/koompi-mcp/config.toml:

[system]
os = "linux"
distro = "ubuntu" 
distro_version = "22.04"
package_manager = "apt"

[languages]
primary = "en"              # Primary language (en/km)
supported = ["en", "km"]    # Supported languages

[integration]
shell_hook = true           # Enable shell integration
auto_confirm = false        # Auto-confirm translations

[package_managers.apt]
install_cmd = "sudo apt install"
update_cmd = "sudo apt update"
search_cmd = "apt search"
remove_cmd = "sudo apt remove"

🔧 Development

Build from Source

git clone https://github.com/koompi/koompi-linux-mcp.git
cd koompi-linux-mcp
cargo build --release

Run Tests

cargo test

Start Development Server

cargo run --bin koompi-mcp-server

Project Structure

koompi-linux-mcp/
├── src/
│   ├── ai/            # AI service & providers
│   ├── core/          # Core functionality
│   ├── languages/     # Language detection & translation
│   ├── mcp/          # MCP client/server
│   └── integration/  # Shell integration
├── scripts/          # Installation & utility scripts
├── docs/            # Documentation
└── tests/           # Test files

🌍 Language Support

Currently Supported

  • English (en): Full support with 100+ command patterns
  • Khmer (km): Comprehensive support for Cambodian users

Planned Languages

  • Vietnamese (vi)
  • Thai (th)
  • Chinese (zh)
  • Spanish (es)
  • French (fr)

Want to contribute translations for your language? See Contributing!

🤝 Contributing

We welcome contributions! Here's how you can help:

Add New Language Support

  1. Create language dictionary in src/languages/
  2. Add detection patterns
  3. Update configuration
  4. Add test cases

Improve Translations

  • Add new command patterns
  • Fix translation accuracy
  • Add cultural context

Testing

  • Test on different Linux distributions
  • Test with various terminals
  • Add integration tests

See CONTRIBUTING.md for detailed guidelines.

📖 Documentation

🐛 Troubleshooting

Common Issues

Shell integration not working?

# Reinstall integration
koompi-mcp uninstall
koompi-mcp install
source ~/.bashrc

Command translation fails?

# Check MCP server status
koompi-mcp config show
# Or use fallback mode
export KOOMPI_MCP_FALLBACK=true

Khmer text not displaying?

  • Install Khmer fonts: sudo apt install fonts-khmeros
  • Ensure terminal supports Unicode

See TROUBLESHOOTING.md for more solutions.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • KOOMPI for sponsoring this project
  • Anthropic for the Model Context Protocol
  • Rust Community for excellent tooling
  • Cambodia tech community for Khmer language support
  • All contributors and testers

📞 Support


Made with ❤️ by the KOOMPI team and community contributors.

ធ្វើឡើងដោយក្រុមការងារ KOOMPI និងអ្នករួមចំណែកសហគមន៍។ 🇰🇭

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •