Who is AIShell.org
AIShell.org is an informational and community-driven website dedicated to empowering users of Unix-like systems — the BSD family, Linux distributions, and other Unix-based environments — with access to AI terminal-based tools, shell integrations, and open-source interfaces and collaborations.
The site serves as a resource hub for developers, sysadmins, and researchers exploring lightweight, command-line, and privacy-respecting AI toolkits. It highlights accessibility, transparency, and cross-platform compatibility.
- Educate users on available AI toolkits for Unix-like systems.
- Provide direct links to open-source repositories, documentation, and install guides.
- Highlight compatibility across BSD, Linux, and Unix variants.
- Support privacy-conscious and offline AI workflows.
- Connect developers contributing to open AI tools in terminal environments.
What is an AI command-line shell
An AI command-line shell integrates a large language model (LLM) — such as Anthropic Claude or OpenAI GPT — into the traditional Unix shell environment. Instead of memorising exact syntax, you describe what you want in plain language and the AI generates the corresponding command for your review before execution.
A traditional shell such as bash, zsh, or fish runs
programs, automates tasks via scripts, and manages files and processes. An AI shell augments
that environment: generating commands from natural language, explaining what a command does
before you run it, fixing errors, writing pipelines, and summarising logs. The Unix execution
model stays deterministic. The AI operates in the thinking phase, not the execution phase.
find . -type f -mtime -1 -print0 | tar -czvf modified_today.tar.gz --null -T -
It acts as a bridge between natural language and command syntax.
What It Can Do
- Generate Unix commands from natural language.
- Explain what a command does before you run it.
- Fix or optimise command errors.
- Write scripts or pipelines automatically.
- Summarise file contents or logs.
- Integrate with other AI tools (coding, data analysis, system administration).
How It Typically Works
- Install a CLI tool or plugin (e.g.,
npm install -g @anthropic-ai/claude-codeorpip install shell-gpt). - Connect to an AI model (local or cloud — Anthropic Claude, OpenAI, Ollama).
- Type a natural-language request.
- AI generates a shell command or script.
- You review and approve before execution.
What are AI command-line shells used for
Command Assistance and Autocompletion
AI shells suggest or auto-complete commands based on your intent — even if you don't remember the exact syntax.
You: "show files bigger than 100MB"
AI: find . -type f -size +100M -exec ls -lh {} \;
Natural Language to Shell Commands
"Kill all processes using port 8080" → lsof -ti:8080 | xargs kill -9
Explaining and Debugging Commands
explain "sudo rm -rf /tmp/*" "This deletes all files and folders in /tmp without confirmation."
Automating Workflows
"Compress all .log files, move to /backup, then delete originals." → Bash script
Integration with AI Tools
- Search documentation
- Generate scripts
- Explain errors
- Manage environments (Docker, Git, Python)
Who uses AI command-line shells
Developers, DevOps engineers, system administrators, data scientists, security researchers, and power users who want to speed up or automate terminal workflows.
- Developers: Generate commands, scripts, or project boilerplates.
- DevOps/Cloud: Manage infrastructure, deploy services, handle logs.
- Data/ML: Install frameworks, verify CUDA, bootstrap notebooks.
- Sysadmins: Create users, audit systems, rotate logs.
- Security: Generate nmap scans, parse results, draft reports.
- New users: Learn Linux or shell scripting via explain-first workflows.
How to use an AI command-line shell
An AI shell understands natural language and assists with command-line operations. Instead of memorising complex syntax, you type what you mean, and the AI translates it into the correct commands.
Install Claude Code (npm — Linux, macOS, FreeBSD)
Claude Code requires Node.js 18 or later.
npm install -g @anthropic-ai/claude-code claude --version claude # browser login on first run, or set ANTHROPIC_API_KEY
Using Claude Code
claude # > find all TODO comments in this codebase and open a GitHub issue for each one claude -p "write a bash script to back up /etc to /backup with a timestamp" claude --add-dir ../frontend --model claude-sonnet-4-5-20250929
Install ShellGPT (Debian/Ubuntu)
Option A — Virtual environment (recommended):
sudo apt update sudo apt install -y python3 python3-venv python3 -m venv ~/.venvs/sgpt source ~/.venvs/sgpt/bin/activate pip install shell-gpt export OPENAI_API_KEY="your_api_key_here"
Option B — System-wide (Ubuntu 22.04+ / Debian 12+):
sudo apt update sudo apt install -y python3-pip pip install shell-gpt --break-system-packages export OPENAI_API_KEY="your_api_key_here"
Usage
sgpt "list all processes using more than 1GB of RAM"
# → ps aux --sort=-rss | awk '$6 > 1048576 {print $0}'
FreeBSD
# Claude Code pkg install node npm npm install -g @anthropic-ai/claude-code setenv ANTHROPIC_API_KEY "your_api_key_here" # ShellGPT pkg install py311-pip pip install shell-gpt setenv OPENAI_API_KEY "your_api_key_here"
sgpt "find and compress all .log files larger than 100MB in /var/log"
# → find /var/log -type f -name "*.log" -size +100M -exec gzip {} \;
Interactive mode
sgpt --shell # > remove all empty directories under /usr/local # → find /usr/local -type d -empty -delete
Safety tips
- Review commands before execution; favour
--dry-runwhere available. - Claude Code always presents a plan and asks for confirmation before applying changes.
- Avoid running as
rootunless absolutely necessary. - Store API keys securely in shell rc files or a secrets manager.
Complex examples including script generation
Example 1 — Monitoring script
#!/bin/bash # sys_monitor.sh - Logs CPU and memory usage every 10 seconds for 5 minutes LOG_FILE="/var/log/sys_monitor.log" END=$((SECONDS+300)) echo "Starting system monitoring at $(date)" >> "$LOG_FILE" while [ $SECONDS -lt $END ]; do echo "------ $(date) ------" >> "$LOG_FILE" echo "CPU Usage:" >> "$LOG_FILE" top -bn1 | grep "Cpu(s)" >> "$LOG_FILE" echo "Memory Usage:" >> "$LOG_FILE" free -h >> "$LOG_FILE" sleep 10 done echo "Monitoring complete at $(date)" >> "$LOG_FILE"
Example 2 — Data pipeline
curl -s https://api.coincap.io/v2/assets/bitcoin/history?interval=d1 | \
jq -r '.data[] | [.date, .priceClose] | @csv' > btc_prices.csv
awk -F, '{print $1","$2}' btc_prices.csv > btc_closing.csv
python3 - <<'EOF'
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('btc_closing.csv', names=['date','close'])
df['date'] = pd.to_datetime(df['date'])
df['close'] = df['close'].astype(float)
df.plot(x='date', y='close', title='Bitcoin Closing Prices')
plt.savefig('btc_closing_chart.png')
EOF
Example 3 — Log analysis summary
find /var/log/ -type f -mtime -1 -print0 | \ xargs -0 grep -i "error" -l | while read file; do count=$(grep -i "error" "$file" | wc -l) echo "$(basename "$file"),$count" done | column -t -s ',' | sort -k2 -nr↑ Back to top
What AI shells are available
- Claude Code — Anthropic's official agentic coding CLI. Understands full codebases, edits files, runs shell commands, and handles git workflows. Installed via npm; requires a Claude Pro/Max subscription or
ANTHROPIC_API_KEY. - Warp AI — modern terminal with command suggestions and explanations (macOS and Linux).
- Amazon Q for command line — AI-powered autocompletion and chat; free for individuals. Successor to the discontinued Fig CLI.
- ShellGPT, Aider, OpenHands (formerly OpenDevin) — open-source CLI assistants. Aider and OpenHands both support Anthropic Claude as a backend.
- Ollama + local models — self-hosted assistant for shell tasks.
- fish-ai — plugin integrating AI autocomplete into
fish; supports Anthropic Claude as a configurable backend.
Download and installing
Claude Code (npm)
npm install -g @anthropic-ai/claude-code # requires Node.js 18+
Python (pip) — virtual environment (recommended)
python3 -m venv ~/.venvs/sgpt source ~/.venvs/sgpt/bin/activate pip install shell-gpt
Python (pip) — system-wide on Debian/Ubuntu 22.04+ or Debian 12+
pip install shell-gpt --break-system-packages
FreeBSD
pkg install node npm && npm install -g @anthropic-ai/claude-code pkg install py311-pip && pip install shell-gpt
From source
git clone https://github.com/your/tool.git cd tool ./install.sh
Always review install scripts before running.
↑ Back to topSecurity, login, credentials, and guest usage
- Store API keys in environment variables or a secrets manager; restrict file permissions.
- Prefer "explain before execute." Never auto-run destructive commands without confirmation.
- Use
sudosparingly; run as an unprivileged user by default. - For guest usage, restrict capabilities (e.g., read-only directories, network egress controls).
- Log command generation and approvals for audit in corporate environments.
Local and remote models
AI shells can connect to both local and remote LLMs:
- Local: Ollama, OpenLLM, LocalAI — keep data on-prem, control latency; require compute.
- Remote — Anthropic Claude: Accessed via
https://api.anthropic.com/v1/messagesusingANTHROPIC_API_KEY. Current models:claude-opus-4,claude-sonnet-4-5-20250929,claude-haiku-4-5-20251001. Also available via Amazon Bedrock and Google Cloud Vertex AI. - Remote — OpenAI GPT, Google Gemini, Mistral, Cohere: Easy setup, pay-as-you-go, OpenAI-compatible endpoints.
Choose based on privacy, cost, performance, and maintenance trade-offs.
↑ Back to topAvailable remote models
- OpenAI GPT family
- Anthropic Claude — claude-opus-4, claude-sonnet-4-5, claude-haiku-4-5; available via docs.anthropic.com, Amazon Bedrock, and Google Cloud Vertex AI
- Google Gemini
- Mistral
- Cohere Command
Consider API pricing, throughput, latency, data retention, and fine-tuning options.
↑ Back to topPersistent AI-enhanced shell prompt integration
Minimal recipes to integrate LLM suggestions directly into bash or fish.
Bash: Claude API helper (claude-ask)
Uses Anthropic's Messages API directly. Requires jq. Note: Claude uses x-api-key for auth, not Authorization: Bearer.
# ~/.bashrc
export ANTHROPIC_API_KEY="your_key_here"
claude-ask() {
local payload
payload=$(jq -n --arg p "$*" \
'{"model":"claude-sonnet-4-5-20250929","max_tokens":1024,"messages":[{"role":"user","content":$p}]}')
curl -sS \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d "$payload" \
https://api.anthropic.com/v1/messages | jq -r '.content[0].text'
}
# Optional: bind Ctrl-G to fill readline buffer with a Claude suggestion
claude_fill_line() {
local desc; read -rp "Describe command: " desc
READLINE_LINE="$(claude-ask "Output only the shell command, no explanation: $desc")"
READLINE_POINT="${#READLINE_LINE}"
}
bind -x '"\C-g":claude_fill_line'
Bash: OpenAI-compatible helper (ai)
Use for OpenAI, Mistral, Ollama, or any OpenAI-compatible endpoint.
# ~/.bashrc
export OPENAI_API_KEY="..."
export AI_ENDPOINT="https://api.openai.com/v1/chat/completions"
ai() {
local payload
payload=$(jq -n --arg p "$*" '{"model":"gpt-4","messages":[{"role":"user","content":$p}]}')
curl -sS \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d "$payload" \
"$AI_ENDPOINT" | jq -r '.choices[0].message.content'
}
Fish: Claude API function
# ~/.config/fish/functions/claude-ask.fish
function claude-ask
if test -z "$ANTHROPIC_API_KEY"
echo "Error: ANTHROPIC_API_KEY is not set." >&2; return 1
end
set -l payload (jq -n --arg p (string join ' ' $argv) \
'{"model":"claude-sonnet-4-5-20250929","max_tokens":1024,"messages":[{"role":"user","content":$p}]}')
curl -sS \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d $payload \
https://api.anthropic.com/v1/messages | jq -r '.content[0].text'
end
# usage: claude-ask "show disk usage sorted by size"
↑ Back to top
AI Toolkit and CLI program index
| Name | Description | Link |
|---|---|---|
| Claude Code | Anthropic's official agentic coding CLI. Reads your codebase, edits files, runs commands, and handles git workflows via natural language. Requires Node.js 18+. Supports MCP server integration. | GitHub |
| tgpt | CLI chat tool for accessing LLMs from the terminal; supports Linux/BSD. | GitHub |
| AI Shell | Converts natural-language prompts into shell commands for Unix workflows. | GitHub |
| Cai | Unified CLI interface for multiple AI models, enabling chat/code generation. | GitHub |
| AIChat | Multi-provider LLM CLI assistant with REPL; works across Unix systems. Supports Anthropic Claude. | GitHub |
| ShellGPT | Python-based CLI for generating shell commands, code, and explanations. | GitHub |
| OpenCode | Go-based CLI coding assistant with TUI for terminal workflows. | GitHub |
| Gorilla CLI | Generates shell commands for many APIs based on natural-language input. | GitHub |
| llm | CLI + Python library for interacting with local or hosted LLMs. Supports Claude via the llm-claude plugin. | GitHub |
| tAI | Terminal AI assistant that suggests Unix commands and explains them. | GitHub |
| Lexido | Gemini-powered terminal assistant for productivity and automation. | GitHub |
| fish-ai | Plugin for the fish shell that uses LLMs for command correction/autocomplete. Supports Anthropic Claude. | GitHub |
| easy-llm-cli | Cross-model LLM CLI supporting OpenAI, Gemini, and Anthropic Claude APIs from a single interface. | GitHub |
| mcp-client-cli | CLI for MCP client interactions with LLMs. Compatible with Claude Code's MCP server ecosystem. | GitHub |
| code2prompt | Generates prompts from codebases for AI code review and analysis. | GitHub |
| Aider | AI pair-programming assistant integrating with git and terminal editors. Natively supports Anthropic Claude. | GitHub |
| OpenLLM | Framework for running self-hosted open-source LLMs locally. | GitHub |
| Elia | Terminal UI for interacting with local or remote LLMs. Supports Anthropic Claude. | GitHub |
| NekroAgent | Framework for multi-modal AI agent development and terminal automation. | GitHub |
| Cai-lib | Library for integrating AI assistance into CLI programs. | GitHub |
| OpenHands (formerly OpenDevin) | AI software development agent with shell, browser, and code execution. Supports Anthropic Claude via API. | GitHub |
| Amazon Q for command line (formerly Fig) | AI-powered terminal autocompletion and assistance; free individual tier. Fig was sunset September 1, 2024. | AWS |
Resources
- Anthropic API documentation — full reference for the Claude Messages API, model list, rate limits, and SDKs.
- Claude Code on GitHub — source, issues, and changelog.
- External community links, shell plugin projects, and open AI framework references.
- Email or contact form for collaboration.
More offerings from AIShell Labs
AIShell Labs produces software, field manuals, and books at the intersection of AI and Unix.
AIShell-Gate — AI Execution Gateway for Unix
AIShell-Gate protects your production systems from AI misbehavior. Every command an AI proposes runs through a policy engine first — allowed or denied, risk-scored, and logged before a single byte reaches your infrastructure. Large language models are good at generating shell commands. They are also probabilistic. Unix execution is deterministic and irreversible. AIShell-Gate closes that gap. Default deny. Tamper-evident audit log. MCP integration for Claude Code and Cursor. Public beta — available by request.
Oyster Stew — AI in the Unix Shell
An operational safety manual for engineers who already live in the terminal. Not a productivity
tutorial. Seven chapters covering the core discipline: AI proposes, human reviews, Unix executes.
Includes working ai.sh wrappers for remote APIs and local LLMs, the pipe-to-review
pattern, failure modes, and the guardrails that belong outside the model. Includes a printable
safety checklist for onboarding staff to AI-assisted shell environments.
The Shape of Intent — Steering AI in Cognitive Collaboration
A rigorous framework for the cognitive work that precedes implementation. Hard material, taken seriously. The Shape of Intent is a framework for practitioners who have already felt that shift — who have worked with AI enough to sense that old habits do not fit the new medium, and who need the vocabulary, the daily disciplines, and the named reusable patterns that make working with AI reliable rather than intermittently inspired. Organised across five parts: Theory, Practice, Patterns, Application Domains, and Philosophy.
↑ Back to top