A modern desktop application built using Python Tkinter that provides a feature-rich command-line interface with Google's Gemini AI integration for intelligent, context-aware assistance.
๐ง Shell Command Execution
Execute real shell commands directly from the GUI:
cd
to change directoryclear
to reset the terminalls
, dir
, pip list
, etc.๐ค AI Assistant (Gemini 1.5 Flash)
Interact with Google's Gemini AI and get answers based on:
๐ Command History Log
Logs each command along with its output and error for Gemini context.
๐ง Smart Chat UI
A separate AI chat panel styled like a terminal with:
Sample UI preview
git clone https://github.com/Pranay-Dommati/CommandLineAi.git cd CommandLineAi
pip install -r requirements.txt
Or install manually:
pip install google-generativeai pillow
You have two options to set your Google API key:
Set your Google API key as an environment variable.
Linux/macOS:
export GOOGLE_API_KEY='your_api_key'
Windows (CMD):
set GOOGLE_API_KEY=your_api_key
Windows (PowerShell):
$env:GOOGLE_API_KEY="your_api_key"
Create a .env
file in the project root directory with the following content:
GOOGLE_API_KEY=your_api_key
The application will automatically check for the API key in both locations.
Run the app with:
python clproject.py
Run in CLI mode (no GUI):
python clproject.py --cli
cd ..
, dir
, ls
and press Enterclear
to reset the terminal output areaWhy did my last command fail?
)โโโ clproject.py # Main Python script
โโโ logo.png # Logo displayed on the right side of the UI
โโโ README.md # This documentation file
โโโ requirements.txt # List of Python dependencies
โโโ .env # Environment file for API key (not tracked in git)
โโโ .gitignore # Git ignore file (ignores .env file)
Before running the app, ensure you've set up your Google API key using one of these methods:
GOOGLE_API_KEY=your_google_generative_ai_key
Create a .env
file in the project root:
GOOGLE_API_KEY=your_google_generative_ai_key
Note: The .env
file is included in .gitignore
to prevent accidentally committing your API key.
logo.png
with your own brandingmain.py
to personalize UIPull requests are welcome!
For major changes, please open an issue first to discuss what you'd like to change.
Pranay Dommati
GitHub: @Pranay-Dommati
LinkedIn: LinkedIn Profile