Vibecode
Vibecode is a terminal-native AI coding agent powered by local LLMs through Ollama.
It can read your project, propose edits with diffs, create new files intelligently, and even run Ruby code it writes β all with your approval.
Think of it as:
A local, open-source, Codex-style coding assistant that lives in your terminal.
No cloud. No API keys. No data leaving your machine.
β¨ Features
- π§ Uses local coding models via Ollama
- π Understands your current project directory
- βοΈ Proposes file edits with colorized diffs
- π Creates smartly named new files (no fake
path/to/file.rb) - βΆοΈ Runs Ruby files automatically when appropriate
- π Requires approval before writing files
- πΏ Git integration only when you ask for it
- π Switch models anytime
π§° Requirements
You need:
- Ruby 3.0+
- Git
- Ollama
Install Ollama:
π https://ollama.com/download
Start the Ollama server:
ollama serveπ Install from RubyGems
gem install vibecodeVerify:
vibecode -doctorYou should see:
Ollama installed OK
Ollama server running OK
Git installed OK
π€ Managing Models
List installed models:
vibecode -listSwitch models (auto-pulls if missing):
vibecode -use qwen2.5-coder:7bManually pull a model:
vibecode -pull deepseek-coder:6.7bYour active model is stored in:
~/.vibecode/config.json
π¬ Starting an AI Coding Session
From any project directory:
vibecodeYouβll see:
Vibecode Agent using model: ...
vibecode>
Now you can type natural coding requests.
Example:
create a ruby method greet that prints hello world
Vibecode will:
- Show a plan
- Show a diff preview
- Ask for approval
- Create a properly named file like
hello_world.rb - Run the Ruby file automatically
- Show the output
π§ How Vibecode Works
The AI responds using a structured format that Vibecode turns into actions.
Reading files
If the AI needs to see a file, Vibecode loads it and sends the contents back.
Creating new files
If the AI wants to edit a file that doesnβt exist, Vibecode generates a smart filename automatically.
Editing files
You always see a diff before anything is written.
Running Ruby
If the file contains top-level execution, Vibecode runs:
ruby filename.rbβ¦and shows the output to both you and the AI.
Git
Vibecode will never run git unless your prompt contains the word git.
π Safety Model
| Action | Requires Approval |
|---|---|
| Reading files | β |
| Writing files | β |
| Running Ruby | Automatic (only when appropriate) |
| Running Git | Only if you ask |
Vibecode cannot access files outside the current directory.
π§ͺ Example Session
vibecode> create a ruby method greet that prints hello world
Output:
Proposed edit for hello_world.rb
+def greet
+ puts "hello world"
+end
Vibecode plans to:
- create file hello_world.rb
- run ruby hello_world.rb
Proceed? (Y/n)
After approval:
hello world
π Internal Architecture
| Component | Responsibility |
|---|---|
| CLI | Command handling + session |
| OllamaClient | Talks to Ollama HTTP API |
| Agent | Planning, parsing, execution flow |
| Workspace | Safe file system + Ruby execution |
| Git | Safe Git command wrapper |
β€οΈ Philosophy
Vibecode is:
- Local-first
- Developer-controlled
- Human-in-the-loop
- Transparent
- Offline-capable
You stay in charge. The AI assists.
π§ Roadmap
Future improvements:
- Streaming model responses
- Session memory
- Auto-approve mode
- Test runner integration
- Linter / formatter mode
π License
MIT License