Turn plain English into shell commands instantly!
AIask is a powerful command-line assistant that understands what you want to do and gives you the exact shell command. No more googling syntax or reading man pages!
$ aiask "find all files larger than 100MB"
β¨ Suggested command:
find . -type f -size +100M
What would you like to do?
[e]xecute | [c]opy | e[d]it | [r]e-prompt | [q]uit
>
- π£οΈ Natural Language β Just describe what you want in plain English
- π Multi-Shell β Works with PowerShell, CMD, Bash, Zsh, and Fish
- π§ Multiple AI Providers β Grok, OpenAI, Anthropic, Google Gemini, or local Ollama
- β‘ Interactive β Execute, copy, edit, or refine commands before running
- π₯οΈ Cross-Platform β Windows, macOS, and Linux
- π Command History β Track and search your command history
- π Templates β Save and reuse frequently used prompts
- π Explain Mode β Understand what any command does
- π¬ Interactive REPL β Continuous conversation mode
- π‘οΈ Safety Warnings β Detect and warn about dangerous commands
- β©οΈ Undo Suggestions β Get undo commands after execution
- π§ Error Recovery β Get help when commands fail
- π₯ Stdin Support β Pipe output for analysis
- π¨ Syntax Highlighting β Colorized command output
- π Environment Variables β Configure via env vars for CI/CD
- π€ JSON Output β Machine-readable output for scripting
- π Verbose Mode β Debug information when needed
- β±οΈ Configurable Timeout β Adjust request timeouts
- π Auto-Update Check β Know when updates are available
- π― Shell Completions β Tab completion for Bash, Zsh, Fish, PowerShell
Option 1: winget
winget install Hermithic.aiaskOption 2: Direct download
# Download the latest release
Invoke-WebRequest -Uri "https://github.com/Hermithic/aiask/releases/latest/download/aiask-2.0.1-windows-amd64.zip" -OutFile aiask.zip
Expand-Archive aiask.zip -DestinationPath .
Move-Item aiask-windows-amd64.exe C:\Windows\aiask.exebrew tap Hermithic/aiask
brew install aiaskOption 1: Direct binary (Recommended)
wget https://github.com/Hermithic/aiask/releases/latest/download/aiask-2.0.1-linux-amd64.tar.gz
tar -xzf aiask-2.0.1-linux-amd64.tar.gz
sudo mv aiask-linux-amd64 /usr/local/bin/aiaskOption 2: One-liner install
curl -fsSL https://raw.githubusercontent.com/Hermithic/aiask/master/install.sh | bashRequires Go 1.23+:
git clone https://github.com/Hermithic/aiask.git
cd aiask
go build -o aiask ./cmd/aiaskaiask configThis interactive wizard helps you configure your AI provider.
| Provider | Description | API Key Required |
|---|---|---|
| π Grok | xAI's Grok (recommended) | Yes |
| π€ OpenAI | GPT-4o, GPT-4 | Yes |
| π§ Anthropic | Claude 3.5/4 | Yes |
| β¨ Gemini | Google Gemini | Yes |
| π Ollama | Run locally, free! | No |
| Provider | Where to get it |
|---|---|
| Grok | console.x.ai |
| OpenAI | platform.openai.com |
| Anthropic | console.anthropic.com |
| Gemini | ai.google.dev |
| Ollama | No key needed! ollama.ai |
AIask stores your settings in ~/.aiask/config.yaml:
provider: grok
api_key: "xai-..."
model: "grok-3"
timeout: 60 # Request timeout in seconds
ollama_url: "http://localhost:11434"
system_prompt_suffix: "" # Custom instructions for the AI
check_updates: true # Check for updates on startupConfigure AIask without a config file (great for CI/CD):
export AIASK_PROVIDER=openai
export AIASK_API_KEY=sk-...
export AIASK_MODEL=gpt-4o
export AIASK_TIMEOUT=120
export AIASK_OLLAMA_URL=http://localhost:11434
export AIASK_SYSTEM_PROMPT_SUFFIX="Prefer one-liners when possible"Environment variables take precedence over the config file.
For maximum privacy, run AI completely locally:
# 1. Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# 2. Pull a model
ollama pull llama3.2
# 3. Configure AIask
aiask config # Select "ollama"aiask "your request in plain English"File Operations:
aiask "list all .txt files modified in the last 7 days"
aiask "find and delete all empty directories"
aiask "compress the logs folder into a zip"
aiask "count lines of code in all Python files"System Info:
aiask "show disk usage for each partition"
aiask "list all running processes sorted by memory"
aiask "what's my public IP address"
aiask "show system uptime"Git Operations:
aiask "undo my last commit but keep the changes"
aiask "show commits from the last week"
aiask "create a new branch called feature-login"
aiask "squash the last 3 commits"Networking:
aiask "list all open ports"
aiask "download this file from URL"
aiask "check if google.com is reachable"
aiask "show my network interfaces"After AIask suggests a command:
| Key | Action |
|---|---|
e |
|
c |
π Copy β Copy to clipboard |
d |
βοΈ Edit β Modify before running |
r |
π Re-prompt β Ask something different |
q |
π Quit β Exit without action |
Understand what any command does:
aiask explain "tar -xzvf archive.tar.gz"
aiask explain "git rebase -i HEAD~3"
aiask explain "find . -name '*.log' -mtime +7 -delete"Track and search your command history:
aiask history # Show recent history
aiask history -n 20 # Show last 20 entries
aiask history --search git # Search history
aiask history clear # Clear all historySave and reuse frequently used prompts:
# Save a template
aiask save git-log "show commits from the last week with stats"
aiask save find-large "find files larger than 100MB" -d "Find large files"
# List templates
aiask templates
# Run a template
aiask run git-logContinuous conversation mode without restarting:
aiask interactive
# or
aiask iCommands in REPL:
/helpβ Show available commands/historyβ Show session history/configβ Show current configuration/clearβ Clear the screen/exitβ Exit interactive mode
Pipe output for analysis:
# Analyze error logs
cat error.log | aiask --stdin "what's wrong here?"
# Get help with failed commands
npm install 2>&1 | aiask --stdin "how do I fix this?"
# Analyze any output
docker logs myapp | aiask --stdin "find any errors"AIask automatically warns about dangerous commands:
$ aiask "delete all files in root"
β οΈ CRITICAL Warning
β’ Recursive delete of root, all files, or home directory
Type 'yes' to confirm execution, or any other key to cancel.After execution, get undo suggestions:
π‘ To undo: git reset HEAD~1
(Undo the last commit, keeps changes staged)
Machine-readable output for scripting:
aiask --json "list files" | jq .commandOutput:
{
"command": "ls -la",
"shell": "bash",
"os": "linux",
"prompt": "list files",
"provider": "grok",
"model": "grok-3"
}Debug information when needed:
aiask -v "show disk space"Output:
[DEBUG] Shell: PowerShell
[DEBUG] OS: Windows
[DEBUG] Provider: grok
[DEBUG] Model: grok-3
[DEBUG] Timeout: 1m0s
[DEBUG] Prompt: show disk space
[DEBUG] Response time: 1.234s
Enable tab completion for your shell:
# Bash
aiask completion bash > /etc/bash_completion.d/aiask
# Zsh
aiask completion zsh > "${fpath[1]}/_aiask"
# Fish
aiask completion fish > ~/.config/fish/completions/aiask.fish
# PowerShell
aiask completion powershell | Out-String | Invoke-Expression| Provider | Default | Other Options |
|---|---|---|
| Grok | grok-3 | grok-2 |
| OpenAI | gpt-4o | gpt-4o-mini, gpt-4-turbo |
| Anthropic | claude-sonnet-4-20250514 | claude-3-opus |
| Gemini | gemini-2.0-flash | gemini-1.5-pro |
| Ollama | llama3.2 | mistral, codellama, phi |
AIask automatically detects your shell and generates appropriate commands:
| Platform | Shells Detected |
|---|---|
| Windows | PowerShell, CMD |
| macOS/Linux | Bash, Zsh, Fish |
It also detects:
- Current working directory
- Git repository status (branch, dirty state)
Usage:
aiask [prompt] [flags]
aiask [command]
Available Commands:
config Configure aiask settings
explain Explain what a command does
history View command history
interactive Start interactive REPL mode
templates Manage saved prompt templates
save Save a new template
run Run a saved template
completion Generate shell completion scripts
version Print the version number
help Help about any command
Flags:
-v, --verbose Show verbose output including debug information
--json Output result as JSON (non-interactive)
--stdin Read additional context from stdin
-s, --stream Stream the response as it generates
-h, --help Help for aiask
- Go 1.23+
- Make (optional)
make build # Build for current platform
make build-all # Build for all platforms
make release # Create release archives
make deb # Build .deb package
make checksums # Generate SHA256 checksums# Windows
GOOS=windows GOARCH=amd64 go build -o aiask.exe ./cmd/aiask
# Linux
GOOS=linux GOARCH=amd64 go build -o aiask ./cmd/aiask
# macOS
GOOS=darwin GOARCH=arm64 go build -o aiask ./cmd/aiaskaiask config # Run the setup wizardOr set environment variables:
export AIASK_PROVIDER=openai
export AIASK_API_KEY=sk-...- β Verify your API key is correct
- β Check you have credits/quota with your provider
- β Ensure you're using a valid model name
- β
Try increasing the timeout:
export AIASK_TIMEOUT=120
ollama serve # Make sure Ollama is running
ollama list # Verify you have models installedSome commands need elevated privileges:
- Windows: Run terminal as Administrator
- Linux/macOS: Use
sudo
Try a faster model:
# In ~/.aiask/config.yaml
model: gpt-4o-mini # Faster than gpt-4o- π API keys stored locally in
~/.aiask/config.yamlwith restricted permissions - π€ Prompts are sent to your configured AI provider
- π Use Ollama for 100% local, private inference
- β Commands never execute without your confirmation
- π‘οΈ Dangerous commands require explicit "yes" confirmation
- π History stored locally in
~/.aiask/history.yaml
Contributions are welcome! Feel free to:
- π Report bugs
- π‘ Suggest features
- π§ Submit pull requests
MIT License β see LICENSE for details.
- π§ Fixed release artifacts and distribution package configurations
- π§ Updated Homebrew formula with correct checksums
- π§ Fixed winget manifest structure for package submission
- β¨ Added
explaincommand to describe what commands do - β¨ Added command history with search (
aiask history) - β¨ Added templates system (
aiask save,aiask run,aiask templates) - β¨ Added interactive REPL mode (
aiask interactive) - β¨ Added stdin support for piping input (
--stdin) - β¨ Added JSON output mode (
--json) - β¨ Added verbose/debug mode (
-v) - β¨ Added dangerous command detection and warnings
- β¨ Added undo suggestions after command execution
- β¨ Added error recovery assistance
- β¨ Added shell completion scripts (
aiask completion) - β¨ Added environment variable configuration
- β¨ Added configurable timeout
- β¨ Added custom system prompt suffix
- β¨ Added auto-update check on startup
- β¨ Added git context awareness (branch, dirty status)
- β¨ Added directory context in prompts
- β¨ Added syntax highlighting for commands
- π Fixed various shell detection issues
- π Comprehensive documentation update
- π Initial release
- Basic natural language to command conversion
- Support for multiple AI providers
- Cross-platform support
Made with β€οΈ by Hermithic