QIAI (Quick Assistant) is a CLI tool that helps you get relevant terminal commands quickly using AI (OpenAI GPT & Google Gemini).
npm install -g qiaiYou need at least one API key to use QIAI:
# Set OpenAI API key (becomes default)
qiai --set-openai-api-key your-openai-api-key
# Or set Gemini API key (becomes default)
qiai --set-gemini-api-key your-gemini-api-key# Auto-select available provider
qiai -q "how to list files in directory"
# Force specific provider
qiai -q "how to install docker" --openai
qiai -q "how to install docker" --gemini# Ask any command-related question
qiai -q "your question" # Auto-select provider
qiai -q "your question" --openai # Force OpenAI
qiai -q "your question" --gemini # Force Gemini
# API key management
qiai --set-openai-api-key your-api-key # Set OpenAI key
qiai --set-gemini-api-key your-api-key # Set Gemini key
# Provider management
qiai --set-default-provider openai|gemini # Set default providerThe last API key you set automatically becomes the default provider:
# Set OpenAI key - becomes default
qiai --set-openai-api-key your-key
# Set Gemini key - becomes default
qiai --set-gemini-api-key your-key
# Manually override default
qiai --set-default-provider openai
qiai --set-default-provider gemini$ qiai -q "how to stop all docker containers"
Using GEMINI provider...
┌─────────────────────────────────┬─────────────────────┬──────────────┐
│ COMMAND │ DESCRIPTION │ DANGER_LEVEL │
├─────────────────────────────────┼─────────────────────┼──────────────┤
│ docker stop $(docker ps -q) │ Stop all containers │ Level 2 │
└─────────────────────────────────┴─────────────────────┴──────────────┘$ qiai -q "clone laravel project"
Using OPENAI provider...
┌─────────────────────────────────────┬─────────────────────────┬──────────────┐
│ COMMAND │ DESCRIPTION │ DANGER_LEVEL │
├─────────────────────────────────────┼─────────────────────────┼──────────────┤
│ composer create-project laravel/... │ Create Laravel project │ Level 1 │
│ cd my-project && php artisan serve │ Start dev server │ Level 1 │
└─────────────────────────────────────┴─────────────────────────┴──────────────┘$ qiai -q "check disk usage"
$ qiai -q "find large files"
$ qiai -q "kill process by name"
$ qiai -q "compress folder to zip"QIAI returns commands in a structured table format:
- Command: The actual terminal command to run
- Description: Brief explanation of what the command does
- Danger Level: Safety indicator
- Level 1: Safe commands (read-only, basic operations)
- Level 2: Commands that might change data
- Level 3: Potentially destructive commands
- Go to OpenAI Platform
- Create a new API key
- Set it:
qiai --set-openai-api-key your-key
- Go to Google AI Studio
- Create a new API key
- Set it:
qiai --set-gemini-api-key your-key
- Multi-AI Support: Works with both OpenAI GPT and Google Gemini
- Auto Provider Selection: Automatically uses available AI provider
- OS-Specific: Provides commands for your operating system (Windows, macOS, Linux)
- Smart Responses: Returns organized commands with safety levels
- Token Optimized: Efficient prompts to reduce API costs
# Reinstall globally
npm install -g qiai
# Check installation
which qiai- Verify your API keys are valid
- Check your internet connection
- Ensure you have API credits/quota available
- Make sure your question is about terminal commands
- Try rephrasing your question
- Check if the provider is working:
qiai -q "list files" --openai
# Development
qiai -q "start a local python web server"
qiai -q "install node modules"
qiai -q "run database migration with express"
# System Administration
qiai -q "check system memory"
qiai -q "monitor network traffic"
qiai -q "backup directory"
# File Operations
qiai -q "copy files recursively"
qiai -q "find files by extension"
qiai -q "change file permissions"