An intelligent AI-powered command control system for Windows that enables natural language interaction to execute commands, run code, and manage your system.
Created by: Dequs
Core Features:
- Natural Language Control: Communicate with AI in plain English to control your Windows system
- Code Execution: Execute Python code generated by AI with safety confirmations
- Command Execution: Run Windows CMD commands directly from chat
- Chat History: Persistent chat history with unique session identifiers
- Configuration Management: Easy setup and modification of API keys and model selection
- Update System: Built-in update checking and application updates
- Safety Mode: Optional confirmation prompts before executing commands and code
- Color-Coded UI: User-friendly terminal interface with color-coded responses
- Python 3.7+
- Windows OS (Windows 10/11 recommended)
- Internet Connection (for API calls)
- API Key (Gemini API or compatible service)
git clone https://github.com/Dequs/HEXEC.git
cd HEXECThe application automatically checks for and installs missing dependencies on first run.
start.batOn first run, you'll be prompted to enter:
- API Key: Your Gemini API key
- API Key Comment: An optional description/label for your API key
- Model: AI model to use (e.g.,
gemini-2.5-flash, only supported by generativeai from google) - Always Ask Mode: Whether to confirm before executing commands (y/n)
Configuration is stored in config.json. After first run, you can modify settings with the config command in the application.
While in the application, use:
>>> config
Then follow the prompts to update:
- API Key
- Model selection
- Always Ask mode preference
python main.pyrun start.bat-
Select a Chat Session:
- View available chat histories
- Start a new chat
- Or delete all chat histories
-
Interact with AI:
>>> What is the current time? >>> Create a file called test.txt >>> List all files in the current directory -
Built-in Commands:
exit- Exit the applicationconfig- Update configurationcls/clear- Clear the screenhistory- Reset chat historyreset- Same as history
-
Always Ask Mode: When enabled, you'll be prompted to confirm before:
- Executing any Windows CMD commands
- Running Python code
-
Dry Run & Safe Mode: The command executor can validate commands before execution
HEXEC/
├── main.py # Main application entry point
├── config.json # Configuration file (auto-generated)
├── prompt.txt # System prompt for AI behavior
├── logs.log # Full detailed application logs
├── promptComments.txt # Prompt for response processing
├── promptThinking.txt # Prompt for deep thinking
├── VERSION # Version information
├── README.md # This file
├── utils/
│ ├── client.py # AI client/API communication
│ ├── commands.py # Command execution logic
│ ├── config.py # Configuration management
│ └── functions.py # Utility functions
└── chats/ # Chat history storage
└── *.elham # Individual chat session files
- User Input: You provide commands in natural language
- AI Processing: The AI analyzes your request and generates a response
- JSON Parsing: Response is parsed as JSON containing command(s) to execute
- Confirmation: If "Always Ask" is enabled, you approve command execution
- Execution: Commands are executed and results are captured
- Feedback: Results are sent back to AI for context-aware responses
- Display: Final response is displayed to the user
- File operations (create, read, write, delete)
- Data processing and calculations
- System information retrieval
- Any Python standard library operations
- File operations (
dir,copy,move,del, etc.) - Directory management (
mkdir,rmdir, etc.) - System queries
- Text processing
- Network operations
Currently supports:
- Google Gemini API (default)
The application uses the model specified in configuration (e.g., gemini-2.5-flash).
To use a different API, modify the client.py file in the utils/ folder.
- The AI response wasn't valid JSON
- Try asking your question again with more specific terms
- The command may be invalid for your system
- Check that you're using Windows-compatible commands
- Review the command before confirming execution
- Verify your API key is correct
- Check your internet connection
- Ensure your API key has the necessary permissions
Check your current version at application startup. The system automatically checks for updates and offers to apply them.
Contributions are welcome! Feel free to fork, modify, and submit pull requests.
Please check the LICENSE file for licensing information.
For issues, questions, or suggestions, please open an issue on GitHub.
Created with by Dequs
