Image 1 — Follow-up: django-orm-lens v0.8 — I shipped the 5 features from my earlier post's roadmap discussion
Image 2 — Follow-up: django-orm-lens v0.8 — I shipped the 5 features from my earlier post's roadmap discussion
Image 3 — Follow-up: django-orm-lens v0.8 — I shipped the 5 features from my earlier post's roadmap discussion
▲ 44 r/u_CartographerMuch5678+5 crossposts

Follow-up: django-orm-lens v0.8 — I shipped the 5 features from my earlier post's roadmap discussion

Follow-up to my earlier r/django post about django-orm-lens (the static-analysis MCP server + VS Code extension). Two things happened since:

1. Merged into awesome-mcp-servers (91k⭐ catalog by punkpeye). Also on the official MCP Registry. That's traction context for anyone who was on the fence about it being a maintained project.

2. Shipped v0.8 today — five community-requested features from Discussion #27. Each was researched against proven prior art (Atlas, Prisma, Sourcegraph, Knip, PyCharm, DataGrip, factory_boy, flake8-django, Roslyn, Ruff, Clippy) before I wrote a single line:

Inline QuickFixes — 16 rules with Ruff-style codes DOL001..DOL032. .count() > 0.exists(), missing on_delete, null=True on CharField, datetime.now()timezone.now(), N+1 loop heuristic, render(request, ..., locals()), Meta.fields = '__all__', and more. Per-rule severity + inline # django-orm-lens-disable-next-line suppression.

Factory generator — right-click any model → factory_boy scaffold with Faker providers keyed by field type. CharField(max_length) scales word-count buckets; DecimalField(N,D) computes left_digits=N-D; choices= maps to Iterator; M2M gets @post_generation. FK chains pull related factories transitively.

Time-Travel Schema Diff — pick two commits from git log, get a typed markdown diff for PR descriptions. Renames are first-class events, never Add+Drop. Blob-SHA LRU cache — commits that don't touch models.py share their parsed snapshot for free.

Impact Analysis — "what breaks if I remove this field?" Workspace-wide reference scan across models/serializers/forms/admin/views/templates/tests with Certain / Likely / Possibly confidence tags. Handles ORM string refs, filter(author__id=1) kwarg lookups, Meta.fields tuples, template variables — the string-typed surface Pyright can't reach.

Interactive Query Builder — right-click → snippet inserted at cursor. .filter(field=?) on an FK auto-appends .select_related; .annotate(post_count=Count('post_set')) honours related_name; .prefetch_related for M2M.

100/100 tests green (up from 4 when I posted last), 7 atomic commits, MIT license.

All 5 features are documented on the v0.8 release page.

Same install:

code --install-extension frowningdev.django-orm-lens
pip install --upgrade "django-orm-lens[mcp]"

What I'd love from you all:

▸ Codebases where the linter over-fires or under-fires — 16 rules is opinionated; want to hear noise vs signal ▸ Impact-analysis edge cases — the classifier admits it's guessing (Possibly tier), but if it's flat-out missing certain hits I want the pattern ▸ Which MCP tools your agent actually calls most — helps me prioritise v0.9

Thanks to everyone who commented on the last post — several of the features above came directly from that thread.

Fire away.

u/CartographerMuch5678 — 2 days ago
▲ 17 r/mcp

I shipped v0.8 of django-orm-lens — 16 inline QuickFixes, schema diff, impact analysis, query builder, factory_boy generator (VS Code + CLI + MCP)

django-orm-lens v0.8 shipped today. Static analysis over your models.py files — no DJANGO_SETTINGS_MODULE, no runserver, works with a broken venv. Three surfaces (VS Code, CLI, MCP server) share one parser.

What's new in v0.8

Every feature was researched against proven prior art before a single line was written — Atlas, Prisma, Sourcegraph, Knip, PyCharm, DataGrip, factory_boy, flake8-django, Roslyn, Ruff, Clippy.

Inline QuickFixes (16 rules) — Ruff-style codes DOL001..DOL032 with Clippy-style Applicability (safe/suggestion/unsafe gate auto-apply). Covers:

  • .count() > 0.exists()
  • .first() is Nonenot .exists()
  • null=True on CharField/TextField
  • Missing on_delete on FK
  • Missing __str__ on Model
  • datetime.now()timezone.now()
  • N+1 attribute-access-in-loop heuristic
  • render(request, ..., locals()) and Meta.fields = '__all__'

Per-rule severity overrides: djangoOrmLens.rules = { "DOL007": "off", "DOL013": "error" }. Suppress inline: # django-orm-lens-disable-next-line DOL007.

Factory generator — right-click any model → factory_boy DjangoModelFactory scaffold with Faker providers keyed by field type. CharField(max_length) scales word-count buckets; DecimalField(N,D) computes left_digits=N-D; choices= maps to Iterator; M2M gets @post_generation. FK chains pull related factories transitively.

Time-Travel Schema Diff — pick two commits from git log, get a typed markdown diff (Add/Drop/Rename/Modify events) ready to paste into a PR description. Renames are first-class events, never Add+Drop.

Impact Analysis — "what breaks if I remove this field?" Workspace-wide reference scan across every Django layer (models, serializers, forms, admin, views, urls, templates, tests, migrations) with Certain / Likely / Possibly confidence tags on every finding. Handles ORM string refs, kwarg lookups (filter(author__id=1)), Meta.fields tuples, and template variables — the string-typed surface Pyright can't reach.

Interactive Query Builder — right-click a field or model → pick a template → snippet inserted at cursor (with tab-stops) or in a fresh untitled buffer. .filter(field=?) on an FK auto-appends .select_related(...); .annotate(post_count=Count('post_set')) honours related_name; .prefetch_related for M2M.

Also in this release: sidebar UX overhaul (stable TreeItem.id, MarkdownString tooltips with clickable command: deep-links, activity-bar badge, FileDecorationProvider badges), 100/100 tests up from 4 at start of dev.

Install

code --install-extension frowningdev.django-orm-lens
codium --install-extension frowningdev.django-orm-lens
pip install --upgrade "django-orm-lens[mcp]"

Full release notes: https://github.com/FROWNINGdev/django-orm-lens/releases/tag/v0.8.0

Why static-only

Point it at any Django project without setup — no settings module, no dependencies except our parser. Runs in CI or on the plane.

Trade-off: custom get_queryset overrides, dynamic model classes are invisible. But 95% of what you actually want to see lives in `mo

u/CartographerMuch5678 — 3 days ago
▲ 258 r/LookWhatTheyBuilt+6 crossposts

I built a static analyzer for Django models — sidebar tree, ER diagram, MCP server (no DB, no boot)

Been building django-orm-lens for the past couple weeks and it's at a spot where I'd love Django-people's eyes on it.

What it does

Three surfaces, one static parser (ast module — no Django import, no DB, no credentials):

  1. VS Code extension — sidebar tree with apps/models/fields/Meta, interactive React Flow ER diagram, hover cards on FK/O2O/M2M
  2. Python CLIpip install django-orm-lens — pipe-friendly JSON output for shells and CI
  3. MCP server — 9 read-only tools for Cursor / Claude Desktop / Aider (find_relations, cascade_preview, suggest_indexes, signal_graph, describe_migration_dependency, etc.)

Regression-tested against 63 real models from Zulip, Saleor, Wagtail, and django-CMS — not synthetic examples.

Why static-only

You can point it at any Django project without setup:

  • No DJANGO_SETTINGS_MODULE
  • No installed dependencies except our parser
  • Runs in CI or on the plane

Trade-off: things that require runtime (custom get_queryset overrides, dynamic model classes) are invisible. But 95% of what you actually want to see is in models.py and signals.py — that's parseable.

What I'd love

  • Screenshots of what breaks on your codebase — the 8 open good-first-issues cover known edges but your codebase probably has an edge case I haven't seen
  • Feedback on which MCP tools would be most useful for AI coding agents — I'm about to add detect_n_plus_one and migration_risk_report in v0.6, want to prioritize based on what devs actually pain-point on
  • Contributions welcome — MIT, translations (RU/ZH/ES issues open) count as first-class contributions via the all-contributors bot

Not selling anything, no plans to monetize while it's small — just want it to be genuinely useful for the Django community.

Fire away.

u/CartographerMuch5678 — 4 days ago