A modern, production-ready Linux shell with integrated AI capabilities supporting multiple AI backends (OpenAI, Google Gemini, Anthropic Claude, DeepSeek, Ollama), automatic natural language detection, multilingual input (English, Urdu, Arabic, Hindi, and more), and comprehensive safety features.
- π€ Multi-Backend AI Support - OpenAI, Google Gemini, Anthropic Claude, DeepSeek, and local Ollama
- π§ Automatic Language Detection - Routes natural language to AI, commands to shell
- π Multilingual Support - Urdu, Arabic, Hindi, Spanish, French, Chinese, and more
- π Full Shell Features - Pipes (
|), redirection (>), command chaining (;) - π Command History -
history,!!,!<num> - π Path Expansion - Tilde (
~) and variable expansion
- π‘οΈ Risk Analysis - Automatic risk evaluation before command execution
β οΈ Safety Confirmation - User confirmation for risky commands- π« Blocked Patterns - Prevents catastrophic commands (
rm -rf /, fork bombs) - π¦ Sandbox Mode - Preview commands without execution
- π Audit Logging - Complete history of AI interactions
- Zsh Plugin - Native zsh integration with keybindings
- Bash Plugin - Bash integration with command_not_found handler
- Fish Plugin - Fish shell integration with completions
- PowerShell Module - Windows PowerShell support
# Ubuntu/Debian
sudo apt install build-essential libcurl4-openssl-dev libjansson-dev libreadline-dev
# Fedora
sudo dnf install gcc libcurl-devel jansson-devel readline-devel
# macOS
brew install curl jansson readlinegit clone https://github.com/Dynamo2k1/CortexCLI.git
cd CortexCLI
make# Zsh
echo 'source /path/to/CortexCLI/shell_integrations/cortexcli.zsh' >> ~/.zshrc
# Bash
echo 'source /path/to/CortexCLI/shell_integrations/cortexcli.bash' >> ~/.bashrc
# Fish
echo 'source /path/to/CortexCLI/shell_integrations/cortexcli.fish' >> ~/.config/fish/config.fish
# PowerShell
Add-Content $PROFILE '. /path/to/CortexCLI/shell_integrations/cortexcli.ps1'Set one or more of the following environment variables:
# Google Gemini (Default)
export GEMINI_API_KEY="your-gemini-key"
# OpenAI
export OPENAI_API_KEY="your-openai-key"
# Anthropic Claude
export ANTHROPIC_API_KEY="your-anthropic-key"
# DeepSeek
export DEEPSEEK_API_KEY="your-deepseek-key"
# Ollama (Local LLMs)
export OLLAMA_HOST="http://localhost:11434"# Enable sandbox mode by default
export CORTEX_SANDBOX=1
# Set preferred language
export CORTEX_LANG=urdu
# Custom audit log path
export CORTEX_AUDIT_LOG=/var/log/cortexcli.log
# Disable audit logging
export CORTEX_AUDIT_DISABLED=1
# Set risk threshold (low/medium/high/critical)
export CORTEX_RISK_THRESHOLD=high./dynamo# Explicit AI prefix
β€ 'create a Python script to parse JSON files
# Alternative prefix
β€ ai:show files larger than 10MB
# Auto-detected natural language
β€ how do I find all log files?
# Multilingual (Urdu)
β€ Ψ§Ψ±Ψ―Ω Ω
ΫΪΊ Python Ψ§Ψ³Ϊ©Ψ±ΩΎΩΉ Ψ¨ΩΨ§Ψ€ Ψ¬Ω CSV ΩΨ§Ψ¦Ω Ψ±ΫΪ Ϊ©Ψ±Ϋ
# Multilingual (Hindi)
β€ ΰ€ΰ€ Python ΰ€Έΰ₯ΰ€ΰ₯ΰ€°ΰ€Ώΰ€ͺΰ₯ΰ€ ΰ€¬ΰ€¨ΰ€Ύΰ€ ΰ€ΰ₯ JSON ΰ€ͺΰ€’ΰ€Όΰ₯# List available backends
β€ ai backend
# Switch backend
β€ ai use openai
β€ ai use claude
β€ ai use ollama
# Change model
β€ ai model gpt-4
β€ ai model claude-3-sonnet-20240229# Enable sandbox mode (preview only)
β€ sandbox on
# Disable sandbox mode
β€ sandbox off
# View audit log
β€ audit
# Clear audit log
β€ audit clear# Standard commands work as expected
β€ ls -la | grep ".txt"
β€ cat file.txt > output.txt
β€ cd ~/Documentsβ€ 'create a new React project with Tailwind CSS and TypeScript
π€ Detected: English (confidence: 87%)
COMMAND: npx create-react-app my-app --template typescript
COMMAND: cd my-app && npm install -D tailwindcss postcss autoprefixer
COMMAND: npx tailwindcss init -p
EXPLAIN: Created React project with TypeScript template and installed Tailwind CSS...
β€ Ψ§Ψ±Ψ―Ω Ω
ΫΪΊ Ψ§ΫΪ© Python Ψ§Ψ³Ϊ©Ψ±ΩΎΩΉ Ψ¨ΩΨ§Ψ€ Ψ¬Ω CSV ΩΨ§Ψ¦Ω Ψ±ΫΪ Ϊ©Ψ±Ϋ Ψ§ΩΨ± JSON Ω
ΫΪΊ ΨͺΨ¨Ψ―ΫΩ Ϊ©Ψ±Ϋ
π€ Detected: Urdu (confidence: 95%)
COMMAND: cat > csv_to_json.py << 'EOF'
import csv
import json
...
EOF
EXPLAIN: ΫΫ Ψ§Ψ³Ϊ©Ψ±ΩΎΩΉ CSV ΩΨ§Ψ¦Ω Ϊ©Ω JSON Ω
ΫΪΊ ΨͺΨ¨Ψ―ΫΩ Ϊ©Ψ±ΨͺΨ§ ΫΫ...
β€ 'fix the last git error and commit with a proper message
π€ Processing natural language query...
COMMAND: git status
COMMAND: git add -A
COMMAND: git commit -m "fix: resolve merge conflicts and update dependencies"
EXPLAIN: Fixed the staging issue and created a descriptive commit message...
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CortexCLI β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Input Parser β Language Detector β AI Router β Executor β
β β β β β β
β [Classify] [Detect Lang] [Multi-Backend] [Safe Exec]β
β β β β β β
β Command/NL EN/UR/AR/HI Gemini/OpenAI Risk Check β
β Claude/DeepSeek Confirm β
β Ollama Sandbox β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Audit Logger β
β (All AI interactions logged) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
AI_SHELL.mp4
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT License - See LICENSE for details
- Google Gemini API
- OpenAI API
- Anthropic Claude API
- DeepSeek API
- Ollama Project
- Readline Library
- Jansson JSON Parser
"Where Human Intuition Meets Machine Intelligence"
