jarvish-1.0.1 is not a library.
Visit the last successful build:
jarvish-1.8.3
๐คต Jarvis Shell (jarvish)
๐ก About
"I want J.A.R.V.I.S. as my companion โ but inside my terminal."
Jarvish is a Next Generation AI Integrated Shell written in Rust, inspired by J.A.R.V.I.S. from Marvel's Iron Man. It natively embeds AI intelligence into your everyday shell experience โ no more copy-pasting errors into a browser. Just ask Jarvis.

โจ Features
๐ง AI-Powered Assistance
- ๐ฌ Talk to Jarvis in natural language โ right from your shell prompt
- ๐ When a command fails, Jarvis automatically investigates the error using stdout/stderr context
- ๐ ๏ธ Jarvis can read and write files, execute commands as an AI agent with tool-calling capabilities
๐ Fish-like UX
- ๐จ Real-time syntax highlighting as you type
- โก Auto-completion for commands (PATH binaries, builtins) and file paths
- ๐ History-based suggestions powered by
reedline
๐ฆ The Black Box
- ๐๏ธ Every command execution is persisted โ command, timestamp, working directory, exit code
- ๐พ stdout/stderr outputs are stored in a Git-like content-addressable blob storage (SHA-256 + zstd compression)
- ๐ Ask Jarvis about "last week's error" โ even after restarting the shell
๐ง Shell Fundamentals
- ๐ Pipelines (
cmd1 | cmd2 | cmd3) - ๐ Redirects (
>,>>,<) - ๐ Tilde & variable expansion (
~,$HOME,${VAR}) - ๐ Full PTY support for interactive programs (vim, top, etc.)
๐ฆ Install
Prerequisites
| Requirement | Details |
|---|---|
| ๐ฆ Rust | Stable toolchain (Edition 2021) |
| ๐ OpenAI API Key | Required for AI features |
| ๐ป OS | macOS / Linux |
| ๐ค NerdFont | Recommended for prompt icons (can be disabled via config) |
Install via Cargo
Build from Source
Setup
Set your OpenAI API key as an environment variable:
Configuration
Jarvish uses a TOML configuration file located at ~/.config/jarvish/config.toml.
A default config file is automatically generated on first launch.
[]
= "gpt-4o" # AI model to use
= 10 # Max agent loop rounds
[]
= "git" # Command aliases
= "ls -la"
[]
= "/usr/local/bin:$PATH" # Environment variables set on startup
[]
= true # Set to false if NerdFont is not installed
| Section | Description |
|---|---|
[ai] |
AI model name and agent loop limit |
[alias] |
Command aliases (also manageable via alias / unalias builtins) |
[export] |
Environment variables applied on startup (supports $VAR expansion) |
[prompt] |
Prompt display settings (nerd_font = false disables NerdFont icons) |
Tip: You can reload the config at runtime with the
sourcebuiltin command:
Run
๐๏ธ Architecture
Jarvish is composed of four core components:
graph TB
User(["User"]) --> A["Line Editor (reedline)"]
A --> B["Execution Engine"]
B --> B1["Builtin Commands (cd, cwd, exit)"]
B --> B2["External Commands (PTY + I/O Capture)"]
B --> D["AI Brain (OpenAI API)"]
B2 --> C["Black Box"]
D --> C
C --> C1[("history.db (SQLite)")]
C --> C2[("blobs/ (SHA-256 + zstd)")]
| Component | Description |
|---|---|
| ๐๏ธ Line Editor | REPL interface powered by reedline with syntax highlighting, completion, and history |
| โ๏ธ Execution Engine | Routes input to builtins or external commands; captures I/O via PTY teeing |
| ๐ฆ Black Box | Persists all execution history and outputs (SQLite index + content-addressable blob store) |
| ๐ง AI Brain | Classifies input as command vs. natural language; provides context-aware AI assistance via OpenAI |
๐ ๏ธ Tech Stack
| Category | Crate | Purpose |
|---|---|---|
| Line Editor | reedline |
Fish-like interactive line editing |
| Process | os_pipe, nix |
I/O capture, PTY management |
| Async | tokio |
Async runtime |
| Database | rusqlite |
SQLite for command history |
| Hashing | sha2 |
SHA-256 content hashing |
| Compression | zstd |
Blob compression |
| AI | async-openai |
OpenAI API client |
| Paths | directories |
XDG-compliant path resolution |
| Terminal | nu-ansi-term |
ANSI color styling |
| Logging | tracing |
Structured logging with daily rotation |
๐ฉโ๐ป Development
Git Hooks
Run Checks
CI Pipeline (GitHub Actions)
The CI runs on every push and PR to main:
| Job | Command |
|---|---|
| โ Check | cargo check --all-targets |
| ๐งช Test | cargo test --all-targets |
| ๐ Format | cargo fmt --all -- --check |
| ๐ Clippy | cargo clippy --all-targets -- -D warnings |