AIask is an AI-powered command-line assistant designed to convert natural language into shell commands for PowerShell, CMD, Bash, Zsh, and Fish. It streamlines the process of executing tasks by understanding plain English inputs and generating the corresponding commands.
Key Features:
Natural Language Processing: Translate everyday language into precise shell commands.
Multi-Shell Compatibility: Automatically detects and supports various shells, including PowerShell, CMD, Bash, Zsh, and Fish.
Multiple AI Providers: Integrates with Grok, OpenAI, Anthropic, Gemini, and Ollama for diverse AI capabilities.
Interactive Mode: Offers options to execute, copy, edit, or refine commands before running them.
Audience & Benefit:
Ideal for developers, system administrators, and command-line users who seek efficiency. By converting natural language into shell commands, AIask eliminates the need for manual syntax research, saving time and reducing errors. Its cross-platform support ensures it is versatile across Windows, macOS, and Linux environments.
README
š¤ AIask
> 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
>
⨠Features
Core Features
š£ļø 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
New in v2.0 š
š Command History ā Track and search your command history
š Templates ā Save and reuse frequently used prompts
š Explain Mode ā Understand what any command does
> Environment variables take precedence over the config file.
š Using Ollama (100% Local & Free)
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"
š Usage
Basic Usage
aiask "your request in plain English"
š Examples
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"
aiask history # Show recent history
aiask history -n 20 # Show last 20 entries
aiask history --search git # Search history
aiask history clear # Clear all history
š Templates
Save 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-log
š¬ Interactive REPL Mode
Continuous conversation mode without restarting:
aiask interactive
# or
aiask i
Commands in REPL:
/help ā Show available commands
/history ā Show session history
/config ā Show current configuration
/clear ā Clear the screen
/exit ā Exit interactive mode
š„ Stdin Support
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"
š”ļø Safety Features
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)
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)
š Command Reference
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
šØ Building from Source
Prerequisites
Go 1.23+
Make (optional)
Build Commands
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
Cross-Compilation
# 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/aiask