AiSH

image

AiSH is a cross-platform intelligent terminal app designed to make shell usage faster, safer, and more adaptive.

AiSH is not just a shell plugin and it is not a chatbot CLI. It is a standalone terminal application that runs real shells inside its own interface and adds a smart input layer on top.

AiSH = terminal app + real shell runtime + smart completion layer

Core Idea

AiSH works like a normal terminal first. Users can run their usual shells, while AiSH provides optional command completion, history-based suggestions, and local AI-generated command help.

Supported shell targets:

Windows: PowerShell, cmd, Git Bash
macOS:   Zsh, Bash
Linux:   Bash, Zsh, Fish

AiSH owns the terminal UI, suggestion rendering, ghost text, dropdowns, shortcuts, command cards, and AI mode. Actual commands still execute through the user-selected shell.

Modes

1. Normal Mode

Plain terminal behavior.

No prediction
No AI generation
No smart completion
Just type and run commands normally

2. History Mode

Suggests commands based on local usage patterns.

AiSH can use:

- recent commands
- frequent commands
- current working directory
- project type
- successful command patterns
- current typed prefix

Example:

User types: npm
AiSH suggests: npm run dev

3. AI Mode

Generates command suggestions from user intent and local context.

Example:

User types: find process using port 3000
AiSH suggests: netstat -ano | findstr :3000

AI Mode should be opt-in or shortcut-triggered, not constantly running on every keystroke.

Suggested Shortcuts

Ctrl + 1         Normal Mode
Ctrl + 2         History Mode
Ctrl + 3         AI Mode
Ctrl + Shift + M Cycle modes
Tab              Accept suggestion
Right Arrow      Accept ghost suggestion
Ctrl + Space     Open suggestions / ask AI
Esc              Dismiss suggestion
Alt + Enter      Explain selected command

Product Architecture

User types in AiSH terminal
        ↓
AiSH input layer captures current line
        ↓
Mode router
        ↓
Normal Mode  → pass through only
History Mode → local history scorer
AI Mode      → local model + project context
        ↓
Suggestion UI
        ↓
User accepts suggestion
        ↓
Command is sent to the real shell

Technical Direction

Recommended stack:

Desktop app:      Tauri + React
Terminal UI:      xterm.js
Native backend:   Rust
Windows shell:    ConPTY
macOS/Linux PTY:  Unix PTY
Local storage:    SQLite
Model runtime:    ONNX Runtime first, optional GGUF later

Recommended repo shape:

aish/
├── apps/
│   └── desktop/
├── crates/
│   ├── aish-core/
│   ├── aish-pty/
│   ├── aish-history/
│   ├── aish-completion/
│   ├── aish-ai/
│   └── aish-context/
├── models/
├── docs/
└── README.md

First Release Scope

The first version should focus on:

- standalone terminal app
- running real shells inside AiSH
- mode switching
- command history storage
- history-based ghost suggestions
- dropdown suggestions
- project-aware completions for npm, git, docker, make, cargo, and python
- safety checks for dangerous AI-generated commands

The first version does not need a full generative model. A deterministic completion engine plus a lightweight ranker is the safer path.

Safety Rules

AiSH should not silently suggest destructive commands.

Examples of high-risk commands:

rm -rf
del /s /q
git reset --hard
docker system prune
kubectl delete
npm publish
chmod -R 777

For risky commands, AiSH should require extra confirmation, show a warning, or avoid suggesting the command entirely.

Project Status

This repository has been reset for the new AiSH direction.

Old direction:

Python CLI that uses cloud/offline LLMs to generate and execute commands

New direction:

Cross-platform standalone terminal app with Normal, History, and AI modes
S
Description
GitHub account backup: https://github.com/s41r4j/aish | Snapshot: 2026-11-06
Readme
39 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 88%
Shell 6.6%
PowerShell 3.6%
Dockerfile 1.8%