An interactive command-line tool that helps you learn and use PowerShell commands with AI-powered explanations and safety features.
- Install required packages:
git clone https://github.com/myselfayush010/ai-powershell.git
cd ai-powershell
pip install -r requirements.txt
pip install -r requirements.txt --upgrade
- Set up your environment:
- Copy
env.example
to.env
:Copy-Item env.example .env
- Edit
.env
and configure your preferred AI provider:
- Copy
- AI-powered command generation from natural language
- Simple explanations for every command
- Beautiful colored interface
- Built-in safety checks
- Learning-friendly output
- Command previews before execution
- Admin privilege detection
- Dangerous command warnings
- Command confirmation prompts
- System protection measures
The assistant supports multiple AI providers. Choose one and configure accordingly:
GEMINI_API_KEY=your_gemini_api_key_here
AI_PROVIDER=gemini
OPENAI_API_KEY=your_openai_api_key_here
AI_PROVIDER=openai
OPENAI_MODEL=gpt-4 # or gpt-3.5-turbo
CLAUDE_API_KEY=your_claude_api_key_here
AI_PROVIDER=claude
CLAUDE_MODEL=claude-2 # or claude-instant
XAI_API_KEY=your_xai_api_key_here
AI_PROVIDER=xai
XAI_MODEL=grok-beta
Choose the AI provider that best suits your needs:
- Gemini: Good balance of performance and cost
- GPT-4: Best for complex command understanding
- Claude: Excellent for detailed explanations
- Grok: Specialized in technical and coding tasks
The .env
file is automatically ignored by git for security.
Run the assistant:
python ps.py
- System information:
show system info
- Process management:
show running processes
- Network status:
show network status
- Service management:
list services
,check service status
- File operations:
list files
,create directory
- Registry operations:
read registry
,check installed software
What would you like to do? show running processes
Command Explanation:
╔════════════════════════════════════════════════════════════╗
║ Lists all active processes running on your system ║
╚════════════════════════════════════════════════════════════╝
Executing command:
╔════════════════════════════════════════════════════════════╗
║ Get-Process ║
╚════════════════════════════════════════════════════════════╝
- Use the
help
command to see available options - Read the command explanations before execution
- Start with simple commands and gradually try more complex ones
- Pay attention to the safety warnings
- Use the command preview feature to understand what will be executed
Feel free to submit issues and enhancement requests!
GPL - 3.0