Skip to content

jhony91792-oss/devcontext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

170 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ฎ DevContext

Stars Forks License Tests Python

Give your AI assistant a 200 IQ boost โ€” feed it your entire codebase in 3 seconds.

Stop wasting 10-15 minutes every time you start a new AI session explaining your project. DevContext extracts structured, AI-ready context from any codebase so your favorite AI assistant already knows your project cold.

Install ยท Quick Start ยท Examples ยท Documentation


Why DevContext?

Every AI coding assistant fails the same way โ€” it doesn't know your project.

# You before DevContext:
"Here's my codebase, it's a REST API with auth and database..."

# With DevContext:
$ devcontext generate . | pbcopy  # Done. Paste into AI. Instant context.

You lose 10-15 minutes per session explaining your project to every new AI chat.
If you use AI assistants 5 times a day, that's 1 hour wasted daily.
DevContext gives that time back.


โœจ Features

  • ๐Ÿง  Universal context extraction โ€” Any language: Python, JS, TS, Go, Rust, Java, C++, and 20+ more
  • โšก Blazing fast โ€” Analyzes 10,000 files in under 30 seconds
  • ๐Ÿ”— Smart relationship mapping โ€” Knows which files import which
  • ๐Ÿ“ฆ Zero dependencies โ€” Single pip install. No external services.
  • ๐Ÿค– AI-native output โ€” JSON optimized for LLM consumption, or readable Markdown
  • ๐Ÿ”Œ Works everywhere โ€” CLI, GitHub Actions, CI/CD, Docker, anywhere

Installation

pip install devcontext

Or with Homebrew (coming soon):

brew install devcontext

Quick Start

# Generate context for any project
devcontext generate .

# Save to file
devcontext generate . -o context.json

# Get beautiful Markdown output
devcontext generate . -f md

# Show just the file tree
devcontext tree .

That's it. Paste the output into ChatGPT, Claude, Copilot, or any AI assistant.


Examples

Python Project

$ devcontext generate ./my-django-api

Output:

{
  "tool": "DevContext",
  "version": "0.1.0",
  "root": "./my-django-api",
  "summary": {
    "total_files": 47,
    "by_language": {"python": 32, "javascript": 12, "yaml": 3}
  },
  "structure": {
    "main.py": {"functions": ["app", "create_user", "authenticate"], "classes": ["APIRouter"]},
    "models/user.py": {"functions": ["User.save", "User.validate"], "classes": ["User", "Admin"]}
  }
}

JavaScript/TypeScript Project

$ devcontext generate ./my-nextjs-app

Go Project

$ devcontext generate ./my-go-service

How It Works

graph LR
    A[Your Codebase] --> B[DevContext Scanner]
    B --> C[Parser]
    C --> D[AI-Ready Context]
    D --> E[ChatGPT]
    D --> F[Claude]
    D --> G[Copilot]
Loading
  1. Scan โ€” Recursively walks your project, smart-filtering noise
  2. Parse โ€” Extracts functions, classes, imports, exports from each file
  3. Structure โ€” Builds relationship map of your codebase
  4. Output โ€” Formats as JSON (for AI) or Markdown (for humans)

Supported Languages

Language Functions Classes Imports
Python โœ… โœ… โœ…
JavaScript/TypeScript โœ… โœ… โœ…
Go โœ… โœ… โœ…
Rust โœ… โœ… โœ…
Java โœ… โœ… โœ…
C/C++ โœ… โœ… โœ…
Ruby โœ… โœ… โœ…
PHP โœ… โœ… โœ…
Swift โœ… โœ… โœ…
Kotlin โœ… โœ… โœ…
...and 15+ more

Use Cases

  • ๐Ÿค– AI Pair Programming โ€” Give any AI assistant instant project context
  • ๐Ÿ” Code Review โ€” Generate comprehensive code overviews for human or AI review
  • ๐Ÿ“š Documentation โ€” Auto-generate project structure docs
  • ๐Ÿ”Ž Onboarding โ€” New developers get up to speed instantly
  • โšก Debugging โ€” Paste context into AI to get faster, more accurate help

GitHub Actions Integration

- name: Generate Code Context
  run: |
    pip install devcontext
    devcontext generate . -o context.json
    echo "context=$(cat context.json)" >> $GITHUB_ENV
  
- name: Use with AI
  run: |
    # Your AI tool of choice gets ${{ env.context }}

Comparison

Feature DevContext copilot-cli codebase-map context7
Zero config โœ… โŒ โŒ โŒ
No API keys โœ… โŒ โŒ โŒ
Works offline โœ… โŒ โŒ โŒ
Any language โœ… โŒ โŒ โŒ
Open source โœ… โŒ โŒ โŒ
Free โœ… โŒ โŒ โŒ

Documentation


Contributing

Contributions welcome! See CONTRIBUTING.md for setup instructions.


License

MIT ยฉ jhony91792-oss


Star โญ if DevContext saved you time

About

๐Ÿ› ๏ธ DevContext - AI Context Generator for Codebases. One command = full project context for AI assistants. 3 sec instead of 15 min. Python, JS, TS, Go, Rust +50 languages. JSON/MD/HTML/Compact output.

Topics

Resources

License

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors