https://github.com/s41r4j/aish
AiSH - Artificially Intelligent Shell (v0.2-beta)
https://github.com/s41r4j/aish
ai artificial-intelligence automation linux linux-shell shell unix unix-shell windows-command-line windows-powershell windwos
Last synced: about 1 month ago
JSON representation
AiSH - Artificially Intelligent Shell (v0.2-beta)
- Host: GitHub
- URL: https://github.com/s41r4j/aish
- Owner: s41r4j
- License: mit
- Created: 2025-03-21T18:47:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-11T17:17:33.000Z (about 1 year ago)
- Last Synced: 2025-07-04T11:49:00.164Z (11 months ago)
- Topics: ai, artificial-intelligence, automation, linux, linux-shell, shell, unix, unix-shell, windows-command-line, windows-powershell, windwos
- Language: Python
- Homepage:
- Size: 2.76 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AiSH: _Artificially Intelligent Shell_

**AiSH** (Artificially Intelligent Shell) is an autonomous, AI-driven shell assistant that interprets user input, generates shell commands, and executes them on your real machine. It supports both online (cloud LLMs) and offline (Ollama) modes, with robust error handling, command history, and dynamic configuration.
> Beta Version 0.2
## Features
- **AI-Powered Command Generation:** Converts natural language into shell commands using LLMs (Groq, Gemini, OpenRouter, Ollama).
- **Autonomous Task Processing:** Breaks down complex tasks into step-by-step shell commands and executes them.
- **Error Correction:** Uses AI to analyze and retry failed commands.
- **Interactive Shell:** Enhanced prompt with auto-completion, history, and customizable themes.
- **Secure API Key Storage:** API keys are encrypted using Fernet.
- **Cross-Platform:** Works on Linux, macOS, and Windows.
## Getting Started
### 1. Install Requirements
```sh
pip install -r requirements.txt
```
### 2. Configure API Keys
- On first run, `.aishrc` is created in your home directory.
- It is recommended to add your API keys and preferred models using the commands:
- `/config api edit key `
- `/config api edit model `
- You can also add them directly in `.aishrc`, but above method is preferred.
> API keys are securely encrypted automatically.
### 3. Run AiSH
```sh
python src/aish.py
```
## Usage
### Shell Commands
- Enter natural language requests (e.g., `list files in home directory`).
- Use `/help` for a list of commands.
### Special Commands
| Command | Description |
|------------------------|----------------------------------------------|
| `/help` or `/h` | Show help |
| `/verbose` or `/v` | Toggle verbose mode |
| `/config` or `/c` | Configure APIs, history, etc. |
| `/prompt [theme]` | Change prompt theme (default, pwd, mood) |
| `/exit` or `/e` | Exit AiSH |
| `!` | Execute raw shell command |
### Configuration
- Use `/config api current ` to set the active AI provider.
- Use `/config api edit key ` to update API keys.
- Use `/config api edit model ` to update models.
- Use `/config prev_cmds ` to set command history length in prompts.
## Security
- API keys are securely stored and never saved in plaintext.
- Your sensitive configuration remains protected at all times.
## Example Tasks
- `list files and folders`
- `write hello world python program`
- `how much disk space is left?`
- `is docker running?`
## Troubleshooting
- If you see errors about missing API keys, edit `.aishrc` and add your keys.
- For offline mode, ensure Ollama is running and the model is set in `.aishrc`.
For more details, see the code in the [src/](../src) directory.