A professional AI chatbot integrated directly into Windows PowerShell and CMD. Ask for code, get code - no explanations, no comments, just pure output. Works on any Windows device - no admin required!
function ai($q) { & ([scriptblock]::Create((iwr 'https://raw.githubusercontent.com/GraphicsAndroid65/payload/main/wrapper.ps1').Content)) -Query $q }
ai "write a python code of odd and even numbers"
- Terminal Integration: Works directly in PowerShell and CMD
- Code-Only Output: No explanations, comments, or extra text
- Interactive Chat Mode: Real-time conversations
- Chat History: Automatically saved locally
- Gemini 2.0 Flash API: Fast and reliable responses
- Easy Installation: One-command setup (no admin needed!)
- Windows Native: No external dependencies
- Admin-Protected Devices: Works even on restricted networks
- GamerX Branding: Professional and sleek
- Windows 10 or later
- PowerShell 5.0 or later (built-in)
- Internet connection
- No administrator access required!
git clone https://github.com/GraphicsAndroid65/payload.git
cd payload/ai-chatbot-windowsOpen PowerShell (no admin required!) and run:
Set-ExecutionPolicy-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
.\install.ps1Note: If you get a permission error on the execution policy, you can still use:
& .\src\chatbot.ps1 "your query"Close and reopen PowerShell for changes to take effect. Done!
ai "write a python function to reverse a string"Output (just code):
defreverse_string(s):
returns[::-1]ai -chatThen type your questions:
You: write a javascript function to fetch an API
AI: async function fetchAPI(url) {
const response = await fetch(url);
return response.json();
}
You: explain decorators in Python
AI: Decorators are functions that modify other functions...
ai -historyai -clearai -helpai "write a function to check if a number is prime"ai "javascript code to validate email address"ai "write a merge sort algorithm in C++"ai "python code to read CSV and print column names"ai "what does this code do: def factorial(n): return 1 if n<=1 else n*factorial(n-1)"| Action | Key |
|---|---|
| Exit Chat Mode | exit |
| Clear History | clear |
| Show Help | help |
| Copy Output | Ctrl + C |
| Paste | Ctrl + V |
ai-chatbot-windows/
├── src/
│ └── chatbot.ps1 # Main PowerShell script
├── install.ps1 # Installation script
├── setup.bat # Batch setup (alternative)
├── README.md # This file
├── QUICKSTART.md # Quick start guide
└── examples/
├── python_examples.md # Python code examples
├── javascript_examples.md
└── general_examples.md
The API key is hardcoded in src/chatbot.ps1. To change it:
- Open
src/chatbot.ps1 - Find:
$API_KEY = "AIzaSyA1tszcr-fKZNCotwm3Xt8yoyupBB2np6E" - Replace with your own Gemini API key from https://aistudio.google.com
- Windows:
%APPDATA%\ai-chatbot\chat_history.json - Full Path:
C:\Users\YourUsername\AppData\Roaming\ai-chatbot\chat_history.json
Set-ExecutionPolicy-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force- Restart PowerShell
- Or reload profile:
. $PROFILE
- Check internet connection
- Verify API key is correct
- Check Gemini API quota at https://aistudio.google.com
- Right-click PowerShell
- Select "Run as Administrator"
- Run the install script again
# Generate code and save to file
ai "write a hello world program in Python"|Out-File hello.py
# Generate code and pipe to another command
ai "write a JSON object"|ConvertFrom-Json# Create multiple files from AI-generated code$languages=@("Python","JavaScript","C++")
foreach ($langin$languages) {
ai "write hello world in $lang"|Out-File"hello.$lang"
}- API key is stored in the script (consider environment variables for production)
- Chat history is stored locally in
%APPDATA%\ai-chatbot\ - No data is sent to external servers except Gemini API
- Disk Space: ~5 MB
- Memory: Minimal (PowerShell native)
- Network: Required for API calls
- OS: Windows 10+
Feel free to fork and submit pull requests!
MIT License - See LICENSE file for details
- Install:
.\install.ps1(as Administrator) - Restart PowerShell
- Try:
ai "write a python function to reverse a string" - Enjoy!
For issues or questions:
- Check the QUICKSTART.md
- Review examples/ folder
- Open an issue on GitHub
Version: 1.0 Framework: PowerShell 5.0+ API: Google Gemini 2.0 Flash Status: ✅ Production Ready