- ๐ง Smart Task Planning - Analyzes tasks, breaks them down into subtasks, and creates optimized execution plans
- ๐ Context Awareness - Maintains conversation context and understands task relationships across interactions
- โ๏ธ Automatic Command Generation - Creates optimal commands for your specific operating system
- ๐ฅ๏ธ Cross-Platform Support - Works seamlessly on Windows, macOS, and Linux with automatic adaptation
- ๐ฉน Intelligent Error Recovery - Automatically recovers from command failures and suggests alternatives
- ๐ Real-time Execution Monitoring - Streams command output with status updates and progress indicators
- ๐ Smart Installation Detection - Finds existing software installations before attempting new installations
- ๐ File Organization - Can sort and organize files by type and content
- ๐ฆ Package Manager Integration - Automatically installs Chocolatey (Windows) when needed for installing software
- ๐ Auto-Run Mode - Executes tasks automatically without requiring confirmation for each step
- โ Intelligent Questioning - Asks clarifying questions only when necessary for task completion
- ๐ Portable Usage - Run from anywhere with PATH integration
- Python 3.8 or higher
- Google API key for Gemini AI
- Internet connection for AI operations
- Windows operating system (primary support, Linux/macOS supported with limitations)
- Clone the repository or download and extract the source code
- Run the setup script:
python setup.pyThis will automatically:
- Check and install required dependencies
- Set up the configuration files
- Create a virtual environment (if requested)
- Guide you through API key setup
To make the assistant accessible from anywhere in your system:
- Run the setup script first to ensure all dependencies are installed
- Run the PATH integration script as administrator:
add-to-path.batThis will:
- Add the assistant's installation directory to your system PATH
- Allow you to run the assistant from any command prompt or terminal
- Enable direct command execution from anywhere
Create a .env file in the project root with your Google API key:
GOOGLE_API_KEY=your_api_key_here
You can obtain a Gemini API key from Google AI Studio.
After setting up the PATH (Option 2 above), you can run from any terminal:
terminal-assistantOr directly from the installation directory:
terminal-assistant.batRun a specific task without entering interactive mode:
terminal-assistant "your task description here"Example:
terminal-assistant "check if python is installed"| Command | Description |
|---|---|
help |
Display help information |
exit |
Exit the application |
clear |
Clear the terminal screen |
history |
Show command history |
tasks |
Show active and completed tasks |
context |
Show current context information |
cd [path] |
Change directory |
pwd |
Show current directory |
auto on/off |
Enable/disable auto-run mode |
The assistant can handle both:
- Task-based queries - Commands to execute specific operations
- Conversational queries - Natural language questions and conversation
The assistant automatically detects the type of input and responds appropriately, using the Gemini AI to generate natural responses for conversational interactions.
"Check if ffmpeg is installed on my system"
"Install Python 3.11 with pip"
"Sort my downloads folder by file type"
"Find all JPG files larger than 5MB and compress them"
"Create a backup of my documents folder"
"Monitor CPU and memory usage in real-time"
"Install Node.js and set up a new React project"
"Find duplicate files in my pictures folder"
- Added PATH integration for global access from any terminal
- Implemented direct command execution mode
- Improved error handling and keyboard interrupt management
- Added conversational mode using Gemini AI for natural interactions
- Enhanced the batch file for better drive handling and directory changes
- Added silent mode for non-interactive use
- Fixed issues with command history saving and loading
- agent_terminal.py - Main agent implementation with task processing logic
- run_agent.py - Launcher script with dependency checking and argument processing
- setup.py - Setup script for installing dependencies
- terminal-assistant.bat - Batch file for running the assistant
- add-to-path.bat - Script for adding the assistant to the system PATH
Customize the assistant by modifying config.yaml:
# General Settings
max_history: 100 # Maximum number of commands to keep in history
history_file: "command_history.json" # File to store command history
max_tokens: 8000 # Maximum tokens to use in AI requests
# Agent Behavior
auto_run: true # Execute commands automatically without confirmation
question_probability: 0.1 # Probability of asking clarifying questions (0.0-1.0)-
"The system cannot find the drive specified"
- Ensure the batch file has the correct path to your installation directory
- Try running the terminal-assistant.bat file directly from its location
-
API Key Issues
- Verify your Gemini API key is correctly set in the .env file
- Check that the API key has not expired or reached its quota limit
-
Python Not Found
- Ensure Python 3.8+ is installed and in your system PATH
- Try running
python --versionto verify Python is accessible
-
Keyboard Interrupt Not Working
- If Ctrl+C doesn't terminate properly, press it multiple times
- As a last resort, close the terminal window and restart
If the add-to-path.bat script fails:
- Run it as administrator
- Verify you have write permissions to the registry
- Try adding the directory manually to your PATH environment variable
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for providing the AI capabilities
- All open-source libraries and tools used in this project