Skip to content
 
 

Repository files navigation

Kourage Logo

Kourage — The All-Knowing AI Terminal Emulator

Blazing fast GPU-accelerated terminal with 100% local Voice-to-Command & on-device LLM intelligence. Inspired by the Attic Computer from Courage the Cowardly Dog.

Rust Local AI Whisper STT Ollama OpenGL License


⚡ What is Kourage?

Kourage is a fork of the ultra-fast, OpenGL-accelerated Alacritty terminal that adds embedded voice commands and local natural language understanding.

Just like the legendary Attic Computer from Courage the Cowardly Dog that always had the answer to every impossible crisis, Kourage lets you type in plain English or simply speak your intent, translating it into executable shell commands directly in your active terminal session.

Important

100% Privacy & Zero Cloud Dependency: Speech recognition runs entirely on your CPU/GPU using Whisper GGML models, and language generation connects to local LLM daemons (e.g. Ollama). No voice audio or command data ever leaves your computer.


🌟 Key Features

  • 💬 Natural Language AI Prompt Bar: Press Ctrl+Shift+Space to open an inline AI prompt bar (🤖 AI: ), type your intent in plain English, and hit Enter.
  • 🎙️ Hands-Free Voice-to-Command: Press Ctrl+Shift+S and speak naturally (e.g., "show all hidden files sorted by modification time").
  • 🧠 Local LLM Intent Parsing: Automatically turns natural language into valid shell commands (ls -lat) using local models like qwen2.5-coder or llama3.
  • 🔇 Smart RMS Silence Detection: Automatically detects when you stop speaking and begins transcription with zero manual cutoffs.
  • Pure High-Performance Rust: Non-blocking asynchronous worker threads ensure that voice and LLM processing never freeze Alacritty's 60+ FPS GPU render loop.
  • 🔒 Safe & Offline: No API keys, no subscriptions, and no internet connection required.

🔄 How It Works

+--------------------------+       +-----------------------+       +----------------------+
| 💬 Text Prompt Bar        |       | 🔊 Whisper STT Engine  |       | 🧠  Local LLM Server  |
| (Ctrl+Shift+Space)       | ----+ | (whisper-rs / GGML)   | ----> | (Ollama / REST API)  |
+--------------------------+     | +-----------------------+       +----------------------+
                                 |             ^                               |
+--------------------------+     |             |                               v
| 🎙️  Microphone            | ----+-------------+                   +----------------------+
| (Ctrl+Shift+S / cpal)    |                                       | 💻  Alacritty PTY    |
+--------------------------+                                       | (Automatic Execution)|
                                                                   +----------------------+
  1. Text Mode: Press Ctrl+Shift+Space, type your prompt (e.g. "find all files bigger than 50MB"), and hit Enter.
  2. Voice Mode: Press Ctrl+Shift+S, speak your command naturally, and Whisper transcribes it.
  3. Inference: The prompt is processed locally by your LLM (e.g. Ollama).
  4. Execution: The resulting shell command is injected straight into the terminal PTY.

🚀 Quick Start Guide

1. Prerequisites

Make sure the native system audio and build tools are installed:

# Ubuntu / Debian
sudo apt install -y libasound2-dev libopenblas-dev libclang-dev cmake pkg-config fontconfig

2. Download a Local Whisper Model (Optional for Voice)

Download a compact GGML model (e.g. tiny or base):

mkdir -p ~/.config/alacritty/models
wget -O ~/.config/alacritty/models/ggml-tiny.bin https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-tiny.bin

3. Start your Local LLM (Ollama)

Make sure Ollama is installed and running:

ollama run qwen2.5-coder:3b # or: ollama run llama3

4. Configure Alacritty

Add the [voice] section to your alacritty.toml (located at ~/.config/alacritty/alacritty.toml):

[voice]
whisper_model_path = "~/.config/alacritty/models/ggml-tiny.bin"
llm_api_url = "http://localhost:11434/api/generate"
model = "qwen2.5-coder:3b" # or "llama3"
temperature = 0.0
timeout_secs = 15

5. Build and Run

# Clone the repository
git clone https://github.com/Sunidhi-Satika/Kourage.git
cd Kourage

# Build & launch
cargo run --release --bin alacritty
  • Press Ctrl+Shift+Space to open the AI prompt bar and type any command!
  • Press Ctrl+Shift+S to speak your command!

⌨️ Default Keybindings

Keybinding Action Description
Ctrl + Shift + Space ToggleAiPrompt Opens/closes inline natural language AI prompt bar (🤖 AI: )
Ctrl + Shift + S VoiceCommand Starts microphone recording and executes transcribed AI command
Enter (in prompt) AiPromptConfirm Submits prompt to LLM for shell command generation
Esc (in prompt) AiPromptCancel Cancels and closes prompt overlay
Up / Down (in prompt) History Nav Cycles through previous AI prompt history
Ctrl + W (in prompt) AiPromptDeleteWord Deletes previous word in prompt
Enter (in preview) AiPreviewConfirm Execute previewed command immediately into shell
Tab (in preview) AiPreviewEdit Paste into terminal prompt for manual editing before running
Esc (in preview) AiPreviewCancel Dismiss preview without running anything
Ctrl + Shift + + IncreaseFontSize Increase terminal font size
Ctrl + Shift + - DecreaseFontSize Decrease terminal font size

🗺️ Roadmap & In-Development Features

  • Interactive Preview & Safety Guard: Full interactive preview bar for all AI commands (Enter to run, Tab to edit arguments, Esc to cancel) with intelligent danger analysis (red ⚠️ warnings for rm -rf, mkfs, dd, git reset --hard, git push --force, etc.).
  • Context Awareness Engine: Automatically extracts active CWD (/proc/<pid>/cwd), directory files, tech stack detection (Rust/Cargo, Node/npm, Python, Go, Docker, Git), active shell, OS distro, and recent terminal buffer output to provide hyper-accurate command generation.
  • Natural Language Text Prompt Bar (Ctrl+Shift+Space): Inline prompt overlay with typing, cursor, history (Up/Down), word deletion (Ctrl+W), and execution.
  • Local Voice Capture & STT (Ctrl+Shift+S): Hands-free voice capture with silence auto-cutoff (cpal + whisper-rs).
  • Local LLM Engine: REST API client querying local LLM daemon (Ollama / Qwen / Llama).
  • Visual Feedback: Real-time stage updates ("🎙️ Recording...", "⚙️ Transcribing...", "🤖 Generating LLM...") and error notifications in the message bar.
  • Configurable LLM Settings: Configurable model, temperature, timeout, and tilde ~ path resolution.
  • Error Diagnosis & Fix (Ctrl+Shift+E): Analyze recent terminal errors and suggest automated fixes.

📄 License

Kourage is released under the Apache License, Version 2.0.

About

Alacritty integrated with 'NLP' and 'Agentic AI' abilities

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages