Skip to main content

DevObin

AI Engineering Context Compiler & Prompt Architect

PyPI version Python License Downloads

DevObin is a CLI tool that analyzes your software project and generates production-ready engineering prompts for AI coding agents (Claude, Codex, Cursor, GPT, etc.).

DevObin does NOT write code. It builds the perfect context so the AI writes the best code.


What It Does

You: "Add user authentication to my Django app"

DevObin scans your project → detects Django, REST API, PostgreSQL
    ↓
DevObin generates: authentication_prompt.md
    ↓
Give the file to Claude/Codex → they implement it perfectly

Key difference: DevObin reads YOUR actual codebase and produces prompts based on YOUR real architecture — not generic templates.


Installation

From PyPI (Recommended)

pip install devobin

From Source

git clone https://github.com/mobinhasanghasemi/devobin.git
cd devobin
pip install -e .

Requirements

  • Python 3.12+
  • An AI provider API key (OpenAI, Anthropic, Google, or Ollama)

Quick Start

# 1. Launch DevObin
devobin

# 2. Connect to your AI provider
/connect

# 3. Describe what you need
Build a React dashboard with dark mode

# 4. Get your prompt
# → dashboard_prompt.md is created
# → Give it to Claude, Codex, or Cursor

Features

Smart Project Analysis

Scans your workspace, detects technologies (80+ frameworks, languages, databases), and understands your architecture.

Knowledge Graph

Builds a structured model of your project with relationships between technologies, patterns, and domains.

Dynamic Context Selection

Unlike static prompt generators, DevObin selects only relevant sections based on your intent:

  • Bug fix → Security, Architecture, Tech Stack
  • New feature → Full context with Design System, Components
  • Performance → Optimization tips, Caching patterns

20 Prompt Sections

Each prompt includes structured sections:

Section Description
Read Project First Instructs AI to read code before writing
Role Defines AI's expertise level
Tech Stack Detected technologies
Constraints DO / DO NOT rules
Deliverables Expected output
Code Quality Standards and conventions
Accessibility WCAG AA compliance
SEO Meta tags, Open Graph
Performance Optimization requirements
Security Security rules
And 10 more... Architecture, Testing, Design System, etc.

Prompt Optimization

Optional optimization with three modes:

Mode Description Latency
none No optimization 0
quick Contradiction check + 1 mutation ~2s
full Contradiction + mutation + critique ~10s

Plugin System

Extend DevObin without modifying core code:

from devobin.plugins import Plugin
from devobin.tools import ToolDefinition, ToolResult

class MyPlugin(Plugin):
    name = "django-expert"
    version = "1.0.0"

    def register_tools(self):
        return [ToolDefinition(
            name="django-check",
            description="Check Django best practices",
            schema={},
            handler=lambda args: ToolResult(tool="django-check", content="OK"),
            permission="read",
        )]

Supported Providers

Provider Models
OpenAI GPT-4o, GPT-4, o1, o1-mini
Anthropic Claude Sonnet, Claude Haiku
Google Gemini Pro, Gemini Flash
Ollama Local models (Llama, Mistral, etc.)

Commands

Command Description
/connect Connect to AI provider
/model Select model
/project Set project directory
/memory Manage persistent memory
/export Export generated prompt
/run Execute shell command
/read Read a file
/ls List directory

Configuration

Via Commands

devobin
/connect        # Set up provider
/model gpt-4o   # Choose model

Via Config File

Edit ~/.config/devobin/settings.json:

{
  "provider": "openai",
  "model": "gpt-4o",
  "optimization_mode": "quick",
  "max_prompt_tokens": 8000,
  "memory_enabled": true
}

Environment Variables

export OPENAI_API_KEY="sk-..."
# or
export ANTHROPIC_API_KEY="sk-ant-..."

Architecture

User Input
    ↓
Scanner → Analyzer → Researcher
    ↓
Knowledge Graph
    ↓
Context Selector (intent + budget)
    ↓
Prompt Assembler (20 sections)
    ↓
Prompt Optimizer (optional)
    ↓
Final Prompt (.md)

Development

Setup

git clone https://github.com/mobinhasanghasemi/devobin.git
cd devobin
pip install -e ".[dev]"

Run Tests

pytest tests/ -v

Lint

ruff check devobin/

Project Structure

devobin/
├── runtime.py          # Main orchestrator
├── event_bus.py        # Event system
├── provider_router.py  # Smart provider routing
├── scanner/            # Workspace scanning
├── analyzer/           # Input analysis
├── researcher/         # Tech research
├── knowledge/          # Knowledge graph
├── context/            # Context selection
├── prompt/             # Assembly & optimization
├── tools/              # Tool system
├── plugins/            # Plugin system
├── config/             # Configuration
├── providers/          # LLM providers
├── cli/                # CLI interface
├── ui/                 # Textual UI
└── storage/            # Database

Links


License

MIT License — see LICENSE for details.


Author

Mobin Hasanghasemi

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devobin-2.0.0.tar.gz (97.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devobin-2.0.0-py3-none-any.whl (128.6 kB view details)

Uploaded Python 3

File details

Details for the file devobin-2.0.0.tar.gz.

File metadata

  • Download URL: devobin-2.0.0.tar.gz
  • Upload date:
  • Size: 97.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for devobin-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1dae8683127ca7708bcc5ed388ea581aa7173ded254f9cc04124a27126a2e376
MD5 bb514e45480847b138862a8d85231cb4
BLAKE2b-256 b376e9fe7de267a5fe45f164bda9a440669704b891584745a4b820305b01078f

See more details on using hashes here.

File details

Details for the file devobin-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: devobin-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 128.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for devobin-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19de830cf601e1df0bc0cb66641d6dc54ccfdb7a6b86e268c6574fc5de44c177
MD5 bd7358ab5b2e61f8e242e83de5fe8fa5
BLAKE2b-256 dfc6cd861d59866065388421a53f3c552ee01f1b8c17fe78e52ffdd25b0f1f1b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

1.1.0

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page