AISH is an intelligent shell that seamlessly combines traditional UNIX shell functionality with AI-powered assistance. It provides an enhanced command-line experience where you can use natural language to interact with your system while maintaining full compatibility with standard shell operations.
- π€ Natural Language Commands - Execute system operations using plain English
- π» Full Shell Compatibility - Complete POSIX shell support with readline and autocompletion
- βοΈ Flexible AI Configuration - Customize OpenAI API settings, models, and system prompts
- π§ Custom Tool Integration - Extend functionality with your own local executables
- π¨ Beautiful Interface - Enjoy colorful, informative prompts with system information
- π Workspace Support - Project-specific configurations via
.aishrcfiles
- OpenAI API key
- Go 1.23.0 or later (if build from source)
go install github.com/ruandada/aish/cmd/aish@latestSee releases
Before using AISH, configure your OpenAI API settings:
# Create or edit your configuration file
vim ~/.aishrcAdd your OpenAI configuration:
# Set your OpenAI API key
aiset openai.api_key "<your-api-key>"
# Optionally customize the model (default: gpt-4o-mini)
aiset openai.model "gpt-4o-mini"
# Set custom base URL for alternative providers
aiset openai.base_url "https://api.openai.com/v1"# Interactive mode
aish
# Single command execution
aish -c "what day is today?"
# Execute from script file
aish ./story.sh# Execute native shell commands directly
uname -a
# > Darwin macbook.local 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 arm64
# Use natural language for AI interaction
tell me a joke
# > Why do programmers prefer dark mode?
# > Because light attracts bugs!
# Use quotes for explicit AI mode (useful when command conflicts with built-ins)
"what day is today"
# > Today is Sunday, July 27, 2025.
# Or use the "ai:" prefix for explicit AI commands
ai: what is the time
# > The current time is Sun Jul 27 10:24:29 CST 2025.# Subcommands with shell expansion
get my ip addr: $(ifconfig)
generate a report: $(df -h)
# Multi-step operations
create a new react project here && launch that project
# Piping with AI commands
"count from 1 to 100" | grep 0
# Output redirection
"generate a poem about computers" > ./poem.txtAISH supports full shell script syntax, allowing you to create scripts using natural language. Here's an example of a story generator script:
#!/usr/bin/env aish
# Color definitions
CYAN='\033[0;36m'
NC='\033[0m' # No Color
print_banner() {
echo -e "${CYAN}"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo "β π Epic Story Generator π β"
echo "β AI-Powered AISH Script β"
echo "ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ"
echo -e "${NC}"
}
generate_story() {
"tell me a random story"
}
print_banner
generate_storyMake it executable and run:
chmod +x ./random_story.sh
./random_story.shAISH automatically reads .aishrc files in the current directory, enabling project-specific configurations:
- Define custom AI tools
- Set project-specific system prompts
- Configure specialized LLM models
Explore our examples for advanced usage:
- Emoji Agent - Customize AI prompts to create specialized agents
- Custom Tools - Expose local executables as AI tools
AISH operates in three distinct modes:
Automatically detects whether input is a shell command or AI conversation.
All input is processed by the AI assistant.
# Force AI mode for single command
ai: write an essay about GitHub
# Switch to AI mode
ai:
# Direct AI interaction
write an essay about GitHubAll input is processed by the traditional shell interpreter (no AI).
# Force user mode for single command
user: ifconfig
# Shortcut
:: ifconfig
# Switch to user mode
::
# Direct shell execution
ifconfig| Command | Description |
|---|---|
aiset <key> <value> |
Set configuration values |
aiget <key> |
Get specific configuration value |
aiget |
Display all configuration values |
| Command | Description |
|---|---|
aiprompt <prompt> |
Append custom system prompts |
aiprompt reset |
Reset to default system prompts |
aiprompt |
View current system prompt |
| Command | Description |
|---|---|
auto: |
Switch to auto mode |
ai: |
Switch to AI mode |
user: or :: |
Switch to user mode |
auto: <command> |
Execute in auto mode (mode unchanged) |
ai: <command> |
Execute in AI mode (mode unchanged) |
user: <command> or :: <command> |
Execute in user mode (mode unchanged) |
# Build the application
make
# Test local development
go run ./cmd/aishaish/
βββ cmd/aish/ # Main application entry point
βββ internal/ # Core implementation
β βββ base/ # Base shell functionality
β βββ plugins/ # AI and extension plugins
βββ docs/ # Documentation and examples
βββ Makefile # Build configuration
This project is licensed under the MIT License - see the LICENSE file for details.
- Shell Engine: Built with mvdan.cc/sh for POSIX compatibility
- AI Integration: Powered by OpenAI's GPT models
- Inspiration: Modern shell experiences and AI-assisted development tools
If you find AISH helpful and would like to support its development, consider buying me a coffee! Your support helps keep this project alive and enables me to continue improving it.
Made with β€οΈ by @ruandada



