CMDCraft is a desktop application designed to execute Command Prompt (CMD) commands based on natural language prompts. By leveraging the power of the Gemini API, it translates user-friendly requests into precise system commands to troubleshoot Windows issues, provide detailed information about a user's PC, and perform repetitive or manual tasks in a single prompt
-
Get System Information Retrieve details about the user's PC, such as IP address, system specifications, and OS version. Example:
"What's my IP address?"
-
Troubleshoot Windows Issues & Install Missing Tools Automatically fix common Windows problems or check and install missing dependencies. Examples:
"Fix my Bluetooth driver" "Why am I getting an error that Python is not installed?" "Install PyTorch"
-
Command Information & Usage If a user wants to know how a command works or how to use it, the system provides detailed information and examples without executing the command. This helps users understand the command's function and syntax before running it.
-
Malicious Command Detection and Prevention 🛡️ Utilizes Sigma rules in the backend and API to detect and block malicious requests, such as "delete my c drive". This ensures the safety and integrity of the user's system.
-
Consent for Risky Operations 🚨 For commands that could lead to data loss or significant changes (e.g., deleting a folder), the system will prompt the user for explicit consent before proceeding. This acts as a crucial safety net.
-
Generate and Save Scripts 📜 Generates a bash script based on the user's request and saves it for later use. This is helpful for automating complex or repetitive tasks.
-
Execution Summary & Output Transformation For every request with commands, the system transforms the raw console output into a user-friendly format. It also provides a summary of the execution, detailing the commands used and what each command does.
-
Perform Manual Tasks Handle multi-step operations in one natural language prompt. Examples:
"Create 100 text files in the Documents folder" "Zip all the reports in the Reports folder of Documents in C drive created between June 2025 and August 2025"
-
Automate Repetitive Tasks Carry out repetitive actions automatically without manual intervention. Examples:
"Clear my google chrome browser cache" "Delete all windows log files"
-
Manual Debugging Steps 🛠️ For issues that cannot be fixed with commands (e.g., "why is my printer not printing"), the system provides a clear, step-by-step guide for the user to debug the problem manually.
-
Non-Technical PC Users
Resolve common computer issues and perform system tasks by simply chatting with AI — no need to learn CMD commands, call customer support, or take your PC to a repair shop. -
System Administrators
Automate repetitive maintenance tasks like log cleanup and cache clearing. -
Developers
Install dependencies, check system setup, and manage local environments with a single prompt. -
Users with Large Manual Tasks
Easily handle time-consuming operations — like creating and naming hundreds of files, sorting large datasets into folders, or archiving months of reports — simply by telling the AI what you need.
Frontend / Desktop Application
- PySide 6 – Used to build the GUI for the desktop application.
- Requests – Fetches data and sends natural language prompts to backend APIs.
- Python Subprocess – Executes CMD commands or batch scripts locally.
- PyInstaller – Packages the Python application into a standalone
.exefile for Windows distribution.
Backend
- Node.js – Backend runtime environment.
- Express.js – Handles API creation and routing.
- Gemini API – Processes natural language prompts and generates CMD instructions.
- Sigma Rules – Used for detecting malicious commands.
Tools
- Postman – Used for testing and debugging backend APIs.
- CMDCraft is installed as a standalone
.exefile and runs on any Windows system. - The user is greeted with a chat-based interface where they type a natural language prompt describing the task or issue.
- The prompt is sent from the desktop application to the backend API.
- The backend uses the Gemini LLM API to generate an appropriate CMD command from the prompt.
- If the Gemini API determines that more information is required to generate an accurate command, it sends a request to the frontend to prompt the user for the necessary details.
- Once the additional information is provided by the user, the backend finalizes the CMD command.
- Before processing the request, the backend immediately checks for any malicious commands using Sigma rules. If a malicious command is detected, it is blocked to ensure the safety of the user's system.
- The generated command or batch script is sent back to the desktop application, which executes it locally using the Windows CMD environment.
- The operating system logs the output of the executed command, and the application retrieves this output.
- The backend processes this raw data and transforms it into a meaningful, user-friendly language, making it easy for the user to understand the result.
- The final result is displayed in the chat interface for the user to review.
- Navigate to the Backend Folder: Open your terminal or command prompt and go to the
backend-serverdirectory. - Configure Environment Variables: Copy the
.env.samplefile and rename it to.env. - Set API Keys: In the new
.envfile, replace the placeholder values forGEMINI_API_KEYandGEMINI_API_MODELwith your own API keys. - Set Sigma Rules: For testing purposes, you can set
SIGMA_RULEStofalseto disable the malicious command detection. To impose the security rules, set the value totrue. - Install Dependencies: Run
npm installin the terminal to install all the required Node.js packages. - Run the Server: Use
npm run devto start the server in development mode, ornpm run startto run it in production.
-
For Development and Testing:
- Navigate to the
desktop-appdirectory. - Copy the
.env.samplefile and rename it to.env. In the new.envfile, setAPI_ENDPOINTto your backend API's URL. If you are running the backend locally, you can keep the default value. - Run
pip install -r requirements.txtto install all the necessary Python packages. - Execute the command
python main.py. The desktop application will open as a new window.
- Navigate to the
-
For Direct Testing:
- The
CMDCraft.exefile is available in the root folder. - Simply run
CMDCraft.exeto launch the application. - This executable uses
http://localhost:5000as the backend API URL by default, so ensure your backend server is running locally on that port.
- The
- To import the Postman collection, locate and import the provided
CMDCraft.postman_collection.jsonfile from the root directory into your Postman workspace. - Select an API from the collection and open its Body tab (set to
rawJSON). The collection already includes a sample input JSON that you can modify to suit your test case. - You can keep the live deployment URL (for testing the Render-hosted API) or replace it in the Postman request with:
http://localhost:5000/if you are running the backend locally.