AI Engineering Context Compiler and Prompt Architect CLI — reads your code, builds the perfect prompt
Project description
DevObin AI
AI Engineering Context Compiler & Prompt Architect
DevObin is a CLI-based prompt engineering system that autonomously reads your project code and produces customized engineering prompts for AI coding agents. It does NOT write code — it crafts the perfect prompt so Codex, Claude, Cursor, or any AI agent builds exactly what you need.
What DevObin Does
You: "Add caching to my provider calls"
│
▼
DevObin scans your project → reads your actual code → understands your architecture
│
▼
DevObin writes: caching_feature_prompt.md (in your directory)
│
▼
Give the file to Codex/Claude/Cursor → they implement it perfectly
Key difference: DevObin reads YOUR code and produces a prompt based on YOUR actual architecture — not a generic template.
Installation
pip install devobin
Or from source:
git clone https://github.com/mobinhasanghasemi/devobin.git
cd devobin
pip install -e .
Quick Start
1. Launch DevObin
cd your-project/
devobin
2. Connect an AI Provider
> /connect
| Provider | Key Format | Example Model |
|---|---|---|
| OpenAI | sk-... |
gpt-4o |
| Anthropic | sk-ant-... |
claude-sonnet-4-20250514 |
AIza... |
gemini-2.0-flash |
|
| Ollama | (no key) | llama3 |
3. Describe What You Want
> Add a caching layer to the provider calls
4. DevObin Does Everything
- Scans your workspace automatically
- Asks permission to read your files
- Reads every important source file
- Understands your real architecture
- Writes the prompt file to your directory
- Tells you "Created: caching_prompt.md"
You never type /export. DevObin creates the file itself.
5. Give the File to a Coding Agent
# The file is in your current directory
cat caching_prompt.md
# Give it to Codex, Claude, Cursor, or any AI agent
How It Works
Agent System
DevObin has an autonomous agent that explores your codebase using tools:
| Tool | What It Does |
|---|---|
[TOOL:glob:**/*.py] |
Find files by pattern |
[TOOL:grep:regex] |
Search file contents |
[TOOL:read:path] |
Read a file completely |
[TOOL:ls:path] |
List directory contents |
[TOOL:write:name.md] |
Create the prompt file |
The agent runs up to 10 rounds of tool calls to thoroughly understand your project before producing the prompt.
Permission System
Before reading your files, DevObin asks permission:
┌─ File Access Permission ─────────────┐
│ DevObin found 44 files. │
│ Allow file access? │
│ │
│ [Yes — Read All Files] │
│ [Ask Before Each File] │
│ [No — Skip File Reading] │
└────────────────────────────────────┘
Grounding Check
After generating the prompt, DevObin verifies it doesn't hallucinate technologies:
- If your project has NO database → prompt won't mention PostgreSQL
- If your project has NO Dockerfile → prompt won't mention Docker
- If your project has NO frontend → prompt won't mention React
If hallucinations are detected, DevObin automatically rewrites the prompt.
Session-Based History
Each chat conversation is stored separately:
.devobin/projects/myproject/sessions/
├── 2026-07-14T10-30-00.json
├── 2026-07-14T11-15-00.json
└── 2026-07-14T14-00-00.json
Use /history to browse past sessions.
Commands
Chat Commands
| Command | Description |
|---|---|
/connect |
Set up an AI provider |
/model <name> |
Switch model |
/project create <name> |
Create project |
/project switch <name> |
Switch project |
/project list |
List projects |
/scan |
Re-scan workspace |
/history |
View past sessions |
/memory |
View saved memories |
/export [name] |
Manual export (rarely needed) |
/settings |
Show settings |
/clear |
Clear current chat |
/help |
Command palette |
Shell Commands
| Command | Description |
|---|---|
/run <cmd> |
Execute shell command |
/read <file> |
Read file |
/ls [path] |
List directory |
/git <args> |
Git commands |
/pip <args> |
Pip commands |
/python <args> |
Run Python |
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+K |
Command palette |
Ctrl+L |
Clear chat |
Ctrl+Q |
Quit |
/ alone |
Command palette |
Example Session
$ cd my-python-project
$ devobin
> /connect
[Select: openai, enter API key, select gpt-4o]
> بچین کدها رو و یه پرامپت مهندسی شده بساز
[Scanning workspace... 44 files found]
[Permission: Read All Files]
[Reading files... (round 1)]
[Reading files... (round 2)]
[Reading files... (round 3)]
[Creating prompt file... (round 4)]
Created: my_feature_prompt.md
> یه caching اضافه کن
[Reading files... (round 1)]
[Reading existing prompt... (round 2)]
[Updating prompt file... (round 3)]
Updated: my_feature_prompt.md
Architecture
devobin/
├── main.py # Typer CLI entry
├── app.py # Textual TUI app
├── core/
│ ├── scanner.py # Workspace scanner
│ ├── tools.py # Agent tools (glob/grep/read/ls/write)
│ ├── validator.py # Output + grounding validation
│ ├── prompt_builder.py # Template-based prompts (fallback)
│ ├── analyzer.py # Tech detection
│ ├── researcher.py # Knowledge base
│ ├── memory.py # Cross-session memory
│ ├── optimizer.py # Token compression
│ └── executor.py # Shell & file ops
├── providers/
│ ├── __init__.py # Provider registry
│ ├── openai_provider.py
│ ├── anthropic_provider.py
│ ├── google_provider.py
│ └── ollama_provider.py
├── ui/
│ ├── chat_screen.py # Main screen + agent loop
│ ├── export_modal.py # Export dialog
│ ├── ask_modal.py # Question dialog
│ ├── permission_modal.py # Permission dialog
│ ├── history_modal.py # Session history
│ └── command_palette.py
├── config/
│ └── settings.py # Config + local_data_dir()
└── storage/
└── database.py # .devobin/ + sessions
Configuration
Platform Config (providers, settings)
| Platform | Location |
|---|---|
| Windows | %APPDATA%/devobin/ |
| Linux | ~/.config/devobin/ |
| macOS | ~/Library/Application Support/devobin/ |
Project Data (history, memory)
Stored in .devobin/ inside your project directory:
your-project/
├── .devobin/
│ └── projects/
│ └── myproject/
│ ├── memory.json
│ ├── meta.json
│ └── sessions/
│ ├── 2026-07-14T10-30-00.json
│ └── 2026-07-14T11-15-00.json
├── src/
│ └── ...
└── caching_prompt.md ← DevObin created this
Security
- API keys stored locally, never sent anywhere except the provider
- Tool
writeonly allows.mdfiles (no code execution) - Directory traversal blocked
- File access requires explicit user permission
- Grounding check prevents hallucinated technology suggestions
Dependencies
- Python ≥ 3.12
- Typer (CLI)
- Textual (TUI)
- Rich (rendering)
- openai / anthropic / google-genai (AI providers)
- httpx (HTTP client)
- platformdirs (config paths)
- arabic-reshaper + python-bidi (RTL support)
License
MIT License
Author
Mobin Hasanghasemi
- Website: devobin.ir
- Instagram: @devobin
- GitHub: github.com/mobinhasanghasemi
- Email: mobin.hasanghasemi.m@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devobin-1.1.0.tar.gz.
File metadata
- Download URL: devobin-1.1.0.tar.gz
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f72809fadadc7a3558dab59f168c46971143a142826f2336a69952229b7a2ba
|
|
| MD5 |
b17692667aaa565ed60f7a181fcda90b
|
|
| BLAKE2b-256 |
8d70399569d93cb226178eed613f637fb856f8592a3cd89c12ae002aad6c396a
|
File details
Details for the file devobin-1.1.0-py3-none-any.whl.
File metadata
- Download URL: devobin-1.1.0-py3-none-any.whl
- Upload date:
- Size: 85.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e566fe8265773bcab5313a35a070ce13565c0a64067f12c821edafacc401184b
|
|
| MD5 |
d0da2e37f99e004a1fc45a415abe5a68
|
|
| BLAKE2b-256 |
823c323437170db0236b42f8563d1a07cc241416ae7369b227591d297aff09ac
|