.---.
/ \
| () () | G H O S T O S v 2 . 0
\ - / The Offline Desktop AI Companion & GhostCode Studio
/`---'\
/ \ [ 100% Private โข GhostCode Autonomous IDE โข ChatGPT Studio โข <35MB RAM ]
(_/^\_/\_/^)
๐ Language Select / ะัะฑะพั ัะทัะบะฐ / ะขัะปะดั ัะฐาฃะดะฐั / ่ฏญ่จ้ๆฉ:
English โข
ะ ัััะบะธะน โข
าะฐะทะฐาัะฐ โข
็ฎไฝไธญๆ โข
Espaรฑol โข
Deutsch โข
Franรงais โข
ๆฅๆฌ่ช โข
Portuguรชs
A unified, ultra-lightweight desktop AI companion that runs effortlessly on low-spec laptops and base Apple Silicon Macs (4GBโ8GB RAM) without Out-Of-Memory (OOM) crashes.
Quickstart โข Features โข Comparison โข Architecture โข CLI Cheatsheet โข Privacy Pledge
Running local AI today is frustrating and bloated:
- Electron RAM Bloat: Most local AI desktop apps (LM Studio, Jan, AnythingLLM) burn 800MBโ1.2GB of RAM on the UI alone before a single neural weight is loaded into memory.
- The Multi-Model OOM Trap: Trying to run an LLM (3GB) + Vision model (2GB) + Whisper (1GB) simultaneously crashes any device with 4GBโ8GB RAM.
- Overcomplicated RAG Stacks: Document chat tools force users to install Docker containers, heavy vector databases (Chroma/Qdrant), and gigabytes of bloated Python dependencies.
GhostOS solves this from first principles:
- Casper Companion Pet & HUD: Rendered via native system web engines (WebKit on macOS, Edge WebView2 on Windows, WebKitGTK on Linux) consuming just ~35MB RAM.
- Dynamic VRAM Juggler: Dynamically hot-swaps between LLM, Vision, and Whisper on demand in <150ms. Peak VRAM never exceeds 3.5GB.
- Zero-DB RAG: Drop files onto Casper โ indexed in milliseconds using pure SQLite FTS5 with zero external database dependencies.
- 100% Local & Private: Zero telemetries, zero cloud fallbacks. Fully functional air-gapped with Wi-Fi switched off.
- Autonomous Software Engineering Loop: Offline alternative to Claude Code and Cursor. Formulates plans, inspects repositories, reads and edits files with Unified Diffs, runs safe terminal commands, and inspects Git history.
- Instant Production Scaffolding: Generate full projects in seconds:
FastAPI: High-performance asynchronous API with Pydantic validation, CORS middleware, and unit tests (TestClient).Telegram Bot: Modern asyncpython-telegram-botapplication with handlers and clean architecture.HTML / React Landing: Elegant, high-converting glassmorphism landing page.Python CLI Tool: Structured command-line utility with argument parser and test suite.
- ChatGPT & Cursor Split Desktop Studio (
ghost studio):- Collapsible Left Sidebar: Session and project history ("Today", "Yesterday", "Projects"), instant mode switcher (
Ghost Chatfor general conversational AI,GhostCodefor autonomous engineering,Zero-DB RAG,OS Tools,VRAM Juggler), active workspace badge, and model indicator. - Agent Execution Stream: Left pane streaming the autonomous agent's thought process, tool calls, and execution steps.
- Interactive Canvas: Right pane equipped with Project Files Explorer (1-click to open any file), Live Code Editor (with instant Save to disk), Unified Diff Viewer (colored additions and deletions), and Interactive Workspace Terminal (
zsh).
- Collapsible Left Sidebar: Session and project history ("Today", "Yesterday", "Projects"), instant mode switcher (
- Seamless Mode Switching: Switch from full Studio view back to Casper desktop pet with 1 click (
โ ะ ะฟะธัะพะผัะฐbutton) or launch directly from terminal viaghost studioorghost code "task".
- A quiet, translucent porcelain ghost that floats gently over your workspace.
- "Casper Eats Files": Drag & drop any PDF, code repository, notes, or spreadsheet directly onto Casper. Casper opens his mouth, swallows the file, and indexes it into your local knowledge base instantly (+15 XP!).
- Visual Moods & Reactive States:
- ๐ค
Idle: Weightless floating animation, 0% CPU footprint. - ๐ฎ
Thinking: Ethereal sapphire aura, streaming local neural tokens. - ๐ง
Listening: Casper wears glowing headphones, capturing offline meetings. - ๐
Eating: Document suction animation with real-time XP gain. โ ๏ธ Alarm: Visual security warning when a dangerous shell command is detected.
- ๐ค
- Single-click for quick phrases & interactions; double-click or press
Cmd+Shift+Space/Ctrl+Shift+Spaceto morph into the Spotlight HUD.
- Highlight text anywhere (Word, Telegram, browser, IDE, terminal)
$\rightarrow$ press hotkey$\rightarrow$ transform instantly:- โจ
polish: Professional, crisp, and concise rewrite. - ๐ค
polite: Diplomatic, respectful business tone. - ๐
grammar: Fixes spelling and grammar mistakes with zero conversational fluff. - ๐ฏ
summarize: Distills text down to 2-3 key takeaways. - ๐
translate: Instant translation into English, Russian, Kazakh, Chinese, etc. - ๐ ๏ธ
code_fix: Automatically diagnoses and fixes bugs in code snippets.
- โจ
- Use from CLI:
ghost write --mode polite "draft message"or rewrite clipboard in 1 click!
- Local SQLite knowledge graph that permanently stores personal context across restarts.
- Casper automatically remembers your developer stack, favorite languages, and active projects.
- Injects personal context into queries with 0 KB extra VRAM and 0% background CPU footprint.
- CLI:
ghost vault list,ghost vault remember tech_stack "Python, Rust, Apple Silicon".
- Deep safety inspection for shell commands before execution.
- Intercepts and blocks destructive operations (
rm -rf /,mkfs, rawdd,DROP DATABASE,format C:). - Explains risks in plain human language and suggests safe alternatives before running.
- Interactive audit:
ghost sandbox "rm -rf /".
- Analyzes daily workspace file modifications, git diffs, and session commits.
- Generates ready-to-share Daily Standup reports for Slack / Telegram ("What I accomplished", "What I'm working on", "Blockers").
- Automatically crafts semantic Conventional Commits (
feat(...),fix(...),refactor(...)). - CLI:
ghost standup.
- 100% private offline secretary for Zoom, Google Meet, and voice notes.
- Generates structured markdown meeting minutes with Executive Overview, Key Decisions, and Action Items with Deadlines.
- Whisper model hot-swaps in only for the 5-second transcription window and immediately frees VRAM.
- Dynamically monitors battery state and system RAM pressure:
- ๐ ECO Mode: Triggers on battery or RAM > 82%. Context capped at 1024 tokens, 2 CPU threads, 60s auto-sleep, 30 FPS pet.
- โ๏ธ Balanced Mode: Context 2048 tokens, 4 threads, 180s auto-sleep.
- โก Performance Beast: On AC power and free RAM > 50%. Context 4096 tokens, full GPU acceleration.
- Gamified companion that grows with your work:
- Gain XP for feeding files (+25 XP), running commands (+25 XP), asking questions (+10 XP).
- Unlocks evolutions and visual accessories (Cyberpunk Visor, Magic Spellbook, Golden Crown).
- Launch Casper in distinct aesthetic themes designed for dark mode and modern workstations:
- ๐
glass: Default translucent Apple porcelain moonlight aesthetic. - โก
cyberpunk: Vibrant neon cyan body with radioactive magenta aura. - ๐
gold: Radiant royal gold aura and drop-shadows. - ๐ข
matrix: Terminal hacker phosphor-green glow.
- ๐
- CLI:
ghost pet --skin cyberpunkor switch with 1 click from the Menu Bar!
- Drag & drop any code file (
.py,.js,.ts,.json), log, or PDF directly onto Casper. - Triggers interactive chewing wobble animation (
@keyframes ghostChewWobble) and cheerful thought bubbles. - Ingests files into Zero-DB RAG without opening complex upload modals.
- Lightweight native
NSStatusBarmenu bar icon living right in your macOS status bar (ghost barorghost pet --tray). - 1-click Casper toggle, wardrobe skin switcher, model selector, and instant VRAM flush with 0 KB background bloat.
- Fast, centered floating command bar (
ghost spot) for instant distraction-free questions and terminal autopilot commands. PressEscto instantly dismiss.
- Scans local Ollama backends, detects downloaded models with footprints in GB, identifies hardware tier (Apple Silicon Metal MPS, NVIDIA CUDA, or CPU), and suggests lightweight models for 4GBโ8GB RAM setups (
ghost models).
- Unified 4-Tab Navigation: Consolidated 9 cluttered tabs into 4 streamlined workspaces:
๐ฌ Chat,๐ Knowledge (RAG),๐ ๏ธ OS Tools(with sub-tools: OS Agent, Screen Peek, Clipboard Inspector, Safe Terminal Autopilot, Standup Journal), and๐ง VRAM. - Live Wardrobe Skin Switcher: Toggle between Glass, Cyberpunk, Gold, and Matrix themes directly from the header dropdown with instant persistence.
- Quick Action Suggestion Chips: 1-tap chips (
๐ What can you do?,๐ค๏ธ Weather in Almaty,๐ Open Downloads,๐ธ Screen Peek,๐ Inspect Clipboard) for instant productivity. - Syntax Code Blocks with 1-Click Copy: Beautiful dark syntax blocks featuring language badges and 1-click clipboard copy buttons.
- Universal Fullscreen Drag-and-Drop: Drag any file onto Casper or anywhere onto the HUD dropzone to train local Zero-DB RAG in milliseconds (+25 XP!).
- Native Apple Retina Dock Icon: Bundles official Apple Retina
.icnsartwork into macOS Dock, Application switcher, and/Applications/GhostOS.app.
| Feature | GhostOS ๐ป | Jan.ai / LM Studio | Ollama | AnythingLLM |
|---|---|---|---|---|
| GUI Memory Footprint | ~35 MB (Native Engine) | ~850 MB (Electron) | None (CLI only) | ~1.1 GB (Electron + DB) |
| Autonomous Coding Agent (GhostCode) | Yes (Built-in v2.0) | โ No | โ No | โ No |
| ChatGPT / Cursor Split Studio | Yes (1120x740) | โ No | โ No | โ No |
| Desktop Pet Companion | Yes (Casper RPG) | โ No | โ No | โ No |
| Drag & Drop RAG Ingestion | Yes (Drop onto Pet) | โ Manual upload | โ Manual import | โ Manual upload |
| Dynamic VRAM Swapping | Yes (VRAM Juggler) | โ OOM on low VRAM | โ Manual CLI | โ OOM on low VRAM |
| KV-Cache Disk Freezer | Yes (0 MB idle VRAM) | โ No | โ No | โ No |
| Context Vacuum (Pruning) | Yes (Saves 40-60%) | โ No | โ No | โ No |
| Adaptive Battery Profiles | Yes (Chameleon Mode) | โ No | โ No | โ No |
| Inline AI Ghostwriter | Yes (Any desktop app) | โ No | โ No | โ No |
| Terminal Sandbox Lens | Yes (Safety protection) | โ No | โ No | โ No |
| Daily Standup / Commit Crafter | Yes (Built-in) | โ No | โ No | โ No |
| External DB Requirement | Zero (SQLite FTS5) | Varies | None | Requires Vector DB / Chroma |
| Cross-Platform (macOS/Win/Linux) | Yes | Yes | Yes | Yes |
| Works 100% Offline | Yes | Yes | Yes | Mostly |
macOS & Linux (One-line terminal installer):
curl -fsSL https://raw.githubusercontent.com/GhostOS-ai/GhostOS/main/install.sh | bash(On macOS, this automatically sets up /Applications/GhostOS.app with Casper's native Retina icon in Launchpad and Spotlight).
Or install via Python pip:
pip install --upgrade ghostos-aighost petOr on macOS: launch GhostOS directly from Spotlight (Cmd + Space), Launchpad, or double-click /Applications/GhostOS.app!
# Launch ChatGPT & GhostCode Split Studio (1120x740)
ghost studio
# Autonomous Software Engineering Task via GhostCode CLI
ghost code "create a fastapi project named my_service"
ghost code "run tests and fix any failing assertions"
# Instant question with zero setup
ghost "Why does Python raise RecursionError and how to fix it?"
# Launch Casper Desktop Pet (with wardrobe skins & native menu bar)
ghost pet --skin cyberpunk --tray
# Launch centered Spotlight HUD
ghost spot
# Launch native macOS Menu Bar controller
ghost bar
# Inspect local models & hardware acceleration
ghost models
# Feed a document or source directory to Casper (Zero-DB RAG)
ghost eat ~/Documents/my_notes.txt
ghost eat ./src/
# Inline AI Ghostwriter (rewrites clipboard or given text)
ghost write --mode polite "can you fix this asap"
ghost write --mode grammar
# Long-term Memory Vault
ghost vault remember tech_stack "Python, Rust, Apple Silicon"
ghost vault list
# Daily Standup Report & Semantic Commit Crafter
ghost standup
# Terminal Sandbox Safety Lens
ghost sandbox "rm -rf /"
# Search indexed knowledge
ghost rag search "database migration"
# Inspect current active screen
ghost screen
# Generate and safely run a terminal task
ghost exec "find all files larger than 100MB"
# Check VRAM Juggler memory diagnostics
ghost status| Shortcut | Action |
|---|---|
Cmd + Shift + Space / Ctrl + Shift + Space |
Toggle Spotlight HUD |
Click Ghost |
Talk with Casper / Pet reaction |
Double Click Ghost |
Open Quick Command HUD |
Escape |
Minimize back to Floating Casper |
Enter |
Submit query |
Drag & Drop File |
Feed document to Casper (Instant RAG) |
flowchart TD
User([User Desktop]) -->|Drag & Drop File / Click| Pet["๐ป Casper Floating Pet (Native Engine)"]
User -->|Hotkey Cmd+Shift+Space| HUD["๐ฎ Spotlight HUD / Command Bar"]
User -->|Terminal CLI| CLI["๐ป ghost CLI (rich)"]
Pet --> Bridge["Python <-> JS Bridge API"]
HUD --> Bridge
CLI --> Core["GhostOS Core Engine"]
Bridge --> Core
subgraph MemoryManagement ["๐ง VRAM Juggler & Memory Chameleon"]
Core --> Juggler["Memory Juggler Dispatcher"]
Juggler -->|Hot-Swap <= 3.5GB| M1["Qwen 2.5 / Llama 3.2 (LLM)"]
Juggler -->|Hot-Swap <= 2.0GB| M2["Moondream2 / MiniCPM (Vision)"]
Juggler -->|Hot-Swap <= 0.6GB| M3["Whisper (Voice Copilot)"]
end
subgraph Storage ["๐ Zero-DB Storage & Vault"]
Core --> RAG["SQLite FTS5 Knowledge Base"]
Core --> Vault["๐ง Memory Vault (Long-Term Facts)"]
RAG --> Docs[("Local Notes / Code / PDFs")]
end
subgraph OSIntegration ["โก System Integration"]
Core --> Screen["Silent Screen Inspector"]
Core --> Pilot["Safe Terminal Autopilot"]
Core --> Lens["๐ก๏ธ Sandbox Lens"]
Core --> Writer["โ๏ธ Ghostwriter Engine"]
end
GhostOS is engineered with privacy as a foundational constraint:
- Zero Telemetry: No analytics, no phone-home pings, no user tracking.
- Zero Cloud Fallbacks: Every neural calculation runs locally on your device's CPU/GPU.
- Air-Gapped Ready: Works with your Wi-Fi completely disabled.
Contributions are warmly welcomed! Feel free to submit issues, pull requests, or custom Casper skins.
# Run full unit test suite (44+ tests)
python3 -m unittest discover tests- Author: KIB.best
- Email: GhostOS@kib.best
- License: MIT License ยฉ 2026 KIB.best. Free for personal and commercial use.