A natural language interface for your Windows terminal powered by Google's Gemini AI. Control your computer, navigate files, and run programs using plain English commands.
- π£οΈ Natural Language Processing: Type commands in plain English
- π Real-Time Execution: Commands run directly on your system with persistent directory navigation
- π‘οΈ Safety First: Automatic detection of dangerous commands with confirmation prompts
- β‘ Direct Command Mode: Bypass AI with
!prefix for instant command execution - π Advanced File Management: Visual file browser with search, tree view, and detailed info
- π» System Monitoring: Real-time CPU, memory, and disk usage information
- π¨ Rich UI: Beautiful terminal output with colors and formatting
- π Smart History: Track command history and bookmarks
- Python 3.8 or higher
- Windows 10/11
- Google Gemini API key (Get one free here)
-
Clone the repository
git clone https://github.com/nimnay/AI-poweredNLPTerminal.git cd AI-poweredNLPTerminal
-
Install dependencies
pip install -r requirements.txt -
Set up your API key
Copy the example environment file:
copy .env.example .env
Edit
.envand add your Gemini API key:GEMINI_API_KEY=your-actual-api-key-here -
Run the terminal
python ai_terminal_assistant.py
The main terminal with the best balance of features:
- Persistent directory navigation
- Auto-balances quotes in paths
- Direct command mode with
!prefix - Smart command generation
- Safety confirmations for dangerous operations
python ai_terminal_assistant.pySimpler version with confirmations for every command:
- Always asks before execution
- Good for learning and testing
- Includes fuzzy matching features
python ai_terminal.pyAdvanced file manager with built-in commands:
- Visual file browser
- Built-in commands (ls, tree, info, search)
- System monitoring dashboard
- Bookmarks and history tracking
python file_manager_terminal.py# Navigation
"show my files"
"go to desktop"
"go to my documents"
"go back up"
"go to CPSC 1010"
# File Operations
"create folder test"
"list all python files"
"delete old.txt"
"copy file.txt to backup.txt"
"show me all files modified today"
# System Information
"show disk usage"
"what's my current directory"
"list running processes"
# Program Execution
"run python script.py"
"execute test.py"
"open notepad"For faster execution, prefix any command with ! to bypass AI:
!dir
!cd ..
!python script.py
!type file.txt
!ipconfigls # List directory contents
tree # Show directory tree
info file.txt # Detailed file information
search *.py # Search for files
sysinfo # System information
diskinfo # Disk usage
help # Show help
exit # Quit terminalCreate a .env file in the project root:
GEMINI_API_KEY=your-api-key-hereOr set as a system environment variable:
setx GEMINI_API_KEY "your-api-key-here"Edit the starting directory in any terminal script:
def __init__(self):
self.cwd = os.getcwd() # Change this to your preferred starting directoryThe terminal includes several safety mechanisms:
- Dangerous Command Detection: Automatically identifies potentially harmful commands
- Confirmation Prompts: Asks for explicit confirmation before executing dangerous operations
- Command Preview: Shows the translated command before execution
- Quote Auto-Balancing: Fixes unbalanced quotes in file paths
Dangerous keywords detected:
rm,del,format,diskpartshutdown,reboot,rmdirreg delete,wmic, and more
AI-poweredNLPTerminal/
βββ ai_terminal_assistant.py β Main terminal (recommended)
βββ ai_terminal.py Simple version with confirmations
βββ file_manager_terminal.py Advanced file manager
βββ requirements.txt Python dependencies
βββ .env Your API key (not in git)
βββ .env.example API key template
βββ .gitignore Git ignore rules
βββ LICENSE MIT License
βββ README.md This file
βββ PROJECT_SUMMARY.md Project cleanup summary
βββ QUICKSTART.md Quick reference guide
βββ src/
βββ ai_terminal/
βββ file_manager.py File operations module
βββ system_monitor.py System monitoring module
Problem: GEMINI_API_KEY not found
Solution: Ensure .env file exists in project root and contains your API key
Problem: Directory not found
Solution: Use exact capitalization for folder names: "CPSC 1010" not "cpsc 1010"
Problem: Import errors with psutil
Solution: Install psutil: pip install psutil
Problem: Command not executing
Solution: Check if quotes are balanced in paths with spaces
The terminal auto-fixes this in ai_terminal_assistant.py
Type help in any terminal to see available commands and examples.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI - For powering the natural language processing
- Rich Library - For beautiful terminal formatting
- psutil - For system monitoring capabilities
Project Link: https://github.com/nimnay/AI-poweredNLPTerminal
- This terminal executes real commands on your system. Always review commands before confirming execution.
- Keep your API key secure and never commit it to version control.
- The terminal respects your current directory and maintains state across commands.
- For folders with spaces, use exact names:
"My Folder"not"my folder"
π‘ Pro Tips:
- Use
!prefix for commands you use frequently to bypass AI translation - Type
helpto see all available features - Check
QUICKSTART.mdfor a quick reference guide - The AI learns from context - be specific in your requests