Skip to content

AI-powered CLI tool that translates natural language into Linux shell commands using Google Gemini.

License

Notifications You must be signed in to change notification settings

anugrahk21/KORTEX-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python AI Platform

🧠 KORTEX-CLI

The Neural Layer for your Linux Kernel

Translate natural language → shell commands using AI


🎯 What is KORTEX?

KORTEX is your AI-powered terminal assistant. It translates natural language questions into precise Linux shell commands using Google Gemini — so you can focus on what you want to do, not how to do it.


🤔 Why KORTEX?

Problem KORTEX Solution
Forgot the find command syntax? Just ask: kx "find files larger than 100MB"
Don't know how to use nmap? Just ask: kx "scan this IP for open ports"
Tired of Googling basic commands? Get instant answers in your terminal
Learning Linux/Security? See real commands for your questions

KORTEX is for:

  • 🐧 Linux beginners learning command-line
  • 🔐 Security professionals who need quick commands
  • 💻 Developers who work faster with AI assistance
  • 🎓 Students learning system administration
$ kx "find all files larger than 100MB"

🧠 Analyzing...

════════════════════════════════════════════════════════════
👉 Proposed Command:

   find . -type f -size +100M

════════════════════════════════════════════════════════════

[E]xecute  [R]efine  [C]ancel
> e

▶ Executing...

./backup.tar.gz
./videos/movie.mp4

✓ Done (exit code: 0)

🚀 Installation

Step 1: Clone

git clone https://github.com/anugrahk21/Kortex-CLI.git
cd Kortex-CLI

Step 2: Install

chmod +x install.sh
./install.sh

Step 3: Get API Key (Free)

When prompted, get your key from: https://makersuite.google.com/app/apikey

Done!

💡 After installation, kx works globally from anywhere on your system — just like ls or grep. No need to be in the Kortex-CLI folder!


💡 Usage

kx "<your request>"

How It Works

Step What Happens
1 You describe what you want in plain English
2 AI generates the shell command
3 You choose: [E]xecute, [R]efine, or [C]ancel

Action Options

Key Action Description
E Execute Run the command
R Refine Ask again with different wording
C Cancel Cancel without running

📝 Examples

File Operations

kx "find all python files"
kx "find files larger than 100MB"
kx "compress this folder to zip"
kx "delete files older than 30 days"

Network & Security

kx "scan 192.168.1.1 for open ports"
kx "show active network connections"
kx "check if port 80 is open"
kx "show my public IP"

System Administration

kx "show disk usage sorted by size"
kx "find processes using most CPU"
kx "show memory usage"
kx "list running services"

🛠️ Commands

Command Description
kx "<request>" Translate to shell command
kx --help Show help
kx --version Show version
kx --models List available AI models
kx update Update KORTEX from GitHub

🔄 Updating

kx update

Handles everything automatically — no manual git commands needed!


⚙️ Configuration

API key is stored in .env:

GEMINI_API_KEY=your_key_here

To change: Edit .env or delete it and run ./install.sh again.


📁 Structure

Kortex-CLI/
├── kortex.py        # Main application
├── install.sh       # Installer
├── .env             # API key (git-ignored)
├── requirements.txt # Dependencies
├── README.md        
└── LICENSE          

🛠️ Manual Installation

pip install google-genai
echo "GEMINI_API_KEY=your_key" > .env
chmod +x kortex.py
sudo ln -s $(pwd)/kortex.py /usr/local/bin/kx

📄 License

MIT License - See LICENSE


KORTEX-CLI by Anugrah K

⭐ Star if useful!

About

AI-powered CLI tool that translates natural language into Linux shell commands using Google Gemini.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published