Skip to content

Commit 3cb8246

Browse files
committed
docs: rewrite README and add error detection UI showcase image
1 parent 9c58eeb commit 3cb8246

2 files changed

Lines changed: 105 additions & 46 deletions

File tree

README.md

Lines changed: 105 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,125 @@
1-
# GhostCoder 👻
1+
# 👻 GhostCoder
22

3-
An invisible coding partner that runs in the background, watches your terminal and IDE sessions, detects when you're stuck, and dispatches the right specialist agent to help without interrupting your flow.
3+
**The AI coding partner that doesn't trust itself.**
44

5-
## Core Concept
6-
GhostCoder does **NOT** have a sidebar or chat interface. It observes:
7-
- Terminal session (pre/post-commands, exit codes, stderr/stdout stack traces).
8-
- File system changes (modified files, contents, open buffers).
5+
![Inline hint](docs/detection.png)
96

10-
When it detects errors or complex tasks, it uses local LLMs to classify the situation and selects an appropriate specialist agent from your local Antigravity agency skills to show a concise, inline, dismissible hint.
7+
[![Tests](https://github.com/anujsingh-cse/GhostCoder/actions/workflows/ci.yml/badge.svg)](https://github.com/anujsingh-cse/GhostCoder/actions)
8+
[![PyPI](https://img.shields.io/pypi/v/ghostcoder)](https://pypi.org/project/ghostcoder/)
9+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1110

12-
## Architecture
11+
## Why GhostCoder?
1312

13+
| | Cursor | Copilot | GhostCoder |
14+
|--|--------|---------|------------|
15+
| UI | Sidebar chat | Inline completion | **No UI. Inline hints only** |
16+
| Trust | You trust the AI | You trust the AI | **AI challenges itself** |
17+
| Audit | None | None | **Full replay + explain** |
18+
| Safety | None | None | **Guardrails block dangerous** |
19+
| Cost | $20/mo | $10/mo | **Free, local, MIT** |
20+
| Hardware | Cloud | Cloud | **GTX 1650 4GB** |
21+
22+
## Three Features Nobody Else Has
23+
24+
### 🔍 Inline Hints
25+
Specialist agents watch your code and whisper fixes. No sidebar. No context switching.
26+
27+
When you run a command that fails, or write code with an obvious bug, GhostCoder classifies the error and routes it to the correct specialist agent (e.g., security engineer, database optimizer, frontend developer) to give you a dismissible inline hint.
28+
29+
### 🔁 Ghost Replay
30+
Every decision is recorded, explainable, and replayable.
31+
32+
If you want to understand why GhostCoder suggested a particular change or see a step-by-step trace of how an error was handled, you can inspect it or run a full replay.
33+
34+
```bash
35+
# Explain what happened in a specific session event
36+
ghostcoder explain --session 20260716-001 --event 0
37+
38+
# Generate a project automation report (weekly/monthly)
39+
ghostcoder report --period week
40+
41+
# Re-apply proposed fixes from a session
42+
ghostcoder replay --session 20260716-001
1443
```
15-
+-----------------------+
16-
| GhostCoder Daemon |
17-
| (Python) |
18-
+-----------+-----------+
19-
|
20-
+------------------------+------------------------+
21-
| | |
22-
[Unix Domain Socket] [Unix Domain Socket] [Unix Domain Socket]
23-
| | |
24-
v v v
25-
+--------------------+ +--------------------+ +--------------------+
26-
| Shell Plugin | | Neovim Plugin | | VS Code Extension |
27-
| (Bash/Zsh/Fish) | | (Lua) | | (TypeScript) |
28-
+--------------------+ +--------------------+ +--------------------+
44+
45+
### 🛡️ Ghost Skeptic & Safety Guardrails
46+
GhostCoder is the first coding assistant that validates its own output.
47+
48+
- **Ghost Skeptic**: Uses an adversarial classifier model to look for logic flaws and security issues (e.g. plaintext credentials) in every suggested fix. If a flaw is detected, it is either corrected or blocked.
49+
- **Safety Guardrail**: Automatically screens proposed code blocks for database-destructive operations (`DROP DATABASE`) or risky directory deletions (`rm -rf`) to keep your workspace safe.
50+
51+
---
52+
53+
## Hardware Compatibility & local LLMs
54+
55+
GhostCoder runs entirely on your local machine. It is designed to work efficiently even on lightweight GPUs (e.g., **NVIDIA GTX 1650 4GB VRAM**):
56+
1. **Qwen2.5-0.5B (1GB VRAM)**: Kept loaded in memory for fast situation classification.
57+
2. **Qwen2.5-Coder-1.5B (2GB VRAM)**: Loaded on-demand for code generation, and automatically unloaded after 30 seconds of idle time.
58+
3. **CPU Fallback**: Gracefully falls back to CPU execution if GPU memory headroom (default 500MB) is exceeded.
59+
60+
---
61+
62+
## Quick Start
63+
64+
### 1. Prerequisites
65+
Install [Ollama](https://ollama.com/) and pull the models:
66+
```bash
67+
ollama pull qwen2.5:0.5b
68+
ollama pull qwen2.5-coder:1.5b
2969
```
3070

31-
## Hardware Compatibility & LLMs
32-
GhostCoder is designed to run efficiently on low-end GPUs (e.g., **NVIDIA GTX 1650 4GB VRAM**):
33-
1. **Qwen2.5-0.5B (1GB VRAM)**: Kept loaded in memory for fast command and situation classification.
34-
2. **Qwen2.5-Coder-1.5B (2GB VRAM)**: Loaded on demand for code generation, and automatically unloaded after 30 seconds of idle time.
35-
3. **Fallback**: Auto-falls back to CPU inference (or Gemini API Free Tier) if GPU memory is constrained.
71+
### 2. Install GhostCoder
72+
Install the CLI and background daemon:
73+
```bash
74+
pip install ghostcoder
75+
```
76+
77+
### 3. Initialize Integrations
78+
Configure your shell and start the daemon:
79+
```bash
80+
ghostcoder init
81+
```
82+
This automatically appends source lines to your shell configuration (`.bashrc`, `.zshrc`, or `config.fish`) and launches the background daemon.
3683

3784
---
3885

39-
## Installation & Setup
86+
## Editor & IDE Setup
4087

41-
1. **Prerequisites**:
42-
- Install [Ollama](https://ollama.ai/) and start the daemon.
43-
- Pull the required models:
44-
```bash
45-
ollama pull qwen2.5:0.5b
46-
ollama pull qwen2.5-coder:1.5b
47-
```
88+
### Neovim
89+
Add the plugin folder to your runtimepath (e.g., using your package manager):
90+
```lua
91+
-- lazy.nvim configuration example
92+
{
93+
"anujsingh-cse/GhostCoder",
94+
config = function()
95+
-- Integration works automatically over the Unix Domain Socket
96+
end
97+
}
98+
```
4899

49-
2. **Install package**:
100+
### VS Code
101+
1. Open the `vscode` folder in this repository.
102+
2. Package the extension:
50103
```bash
51-
pip install -e .
104+
cd vscode
105+
npm install
106+
npm run compile
107+
npx vsce package
52108
```
109+
3. Install the generated `.vsix` file in VS Code.
53110

54-
3. **Initialize Plugins**:
55-
```bash
56-
ghostcoder init
57-
```
58-
This command detects your shell, registers shell hooks, and starts the daemon.
111+
---
112+
113+
## CLI Command Reference
114+
115+
- `ghostcoder start` - Start the background daemon.
116+
- `ghostcoder status` - Show active models, VRAM usage, and active integrations.
117+
- `ghostcoder logs` - Tail background daemon log output.
118+
- `ghostcoder stop` - Stop the daemon gracefully.
119+
- `ghostcoder skeptic --on|--off` - Enable or disable the skeptic validation agent.
59120

60121
---
61122

62-
## CLI Usage
123+
## License
63124

64-
- `ghostcoder status` - Show loaded models, VRAM usage, and active integrations.
65-
- `ghostcoder logs` - Tail daemon logs.
66-
- `ghostcoder stop` - Stop the background daemon gracefully.
125+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

docs/detection.png

524 KB
Loading

0 commit comments

Comments
 (0)