Plain
A web framework for building products with Python.
Install / Use
/learn @dropseed/PlainREADME
Plain
The full-stack Python framework designed for humans and agents.
Get started
mkdir my-app && cd my-app && claude "$(curl -sSf https://plainframework.com/start.md)"
Also works with Codex, Amp, OpenCode, or your agent of choice.
Why Plain?
Explicit, typed, and predictable. What's good for humans is good for agents.
Here's what Plain code looks like:
# app/users/models.py
from plain import postgres
from plain.postgres import types
from plain.passwords.models import PasswordField
@postgres.register_model
class User(postgres.Model):
email: str = types.EmailField()
password: str = PasswordField()
display_name: str = types.CharField(max_length=100)
is_admin: bool = types.BooleanField(default=False)
created_at: datetime = types.DateTimeField(auto_now_add=True)
query: postgres.QuerySet[User] = postgres.QuerySet()
model_options = postgres.Options(
constraints=[
postgres.UniqueConstraint(fields=["email"], name="unique_email"),
],
)
Views are class-based:
# app/users/views.py
from plain.views import DetailView
from .models import User
class UserDetail(DetailView):
template_name = "users/detail.html"
def get_object(self):
return User.query.get(pk=self.url_kwargs["pk"])
URLs use a Router class:
# app/users/urls.py
from plain.urls import Router, path
from . import views
class UsersRouter(Router):
namespace = "users"
urls = [
path("<int:pk>/", views.UserDetail),
]
Agent tooling
Plain projects include built-in tooling that agents use automatically.
Rules — Always-on guardrails stored in project rules files (e.g. .claude/rules/ for Claude Code). Short files (~50 lines) that prevent the most common mistakes.
Docs — Full framework documentation, accessible on demand from the command line:
plain docs models # full docs
plain docs models --section querying # one section
plain docs models --api # typed signatures only
plain docs --search "queryset" # search across all packages
Skills — End-to-end workflows triggered by slash commands:
/plain-install— add a new package and walk through setup/plain-upgrade— bump versions, read changelogs, apply breaking changes, run checks/plain-optimize— capture performance traces, identify slow queries and N+1 problems, apply fixes/plain-bug— collect context and submit a bug report as a GitHub issue
CLI
All commands run with uv run (e.g. uv run plain dev).
plain dev— start dev server with auto-reload and HTTPSplain fix— format and lint Python, CSS, and JS in one commandplain check— linting, preflight, migration, and test validationplain test— run tests (pytest)plain docs --api— public API surface, formatted for LLMs
Stack
Plain is opinionated. These are the technologies it's built on:
- Python: 3.13+
- Database: Postgres
- Templates: Jinja2
- Frontend: htmx, Tailwind CSS
- Python tooling: uv (packages), ruff (lint/format), ty (type checking) — all from Astral
- JavaScript tooling: oxc (lint/format), esbuild (bundling)
- Testing: pytest
Packages
30 first-party packages, one framework. All with built-in docs.
Foundation:
- plain — core framework
- plain.postgres — database ORM
- plain.auth — authentication
- plain.sessions — session storage
Backend:
- plain.api — REST APIs
- plain.jobs — background jobs
- plain.email — sending email
- plain.cache — caching layer
- plain.redirection — URL redirects
- plain.vendor — vendored dependencies
Frontend:
- plain.htmx — dynamic UI
- plain.tailwind — CSS framework
- plain.elements — HTML components
- plain.pages — static pages
- plain.esbuild — JS bundling
Development:
- plain.dev — local server
- plain.pytest — testing helpers
- plain.toolbar — debug toolbar
- plain.code — code formatting
- plain.portal — remote shell and file transfer
- plain.tunnel — dev tunneling
- plain.start — project starter
Production:
- plain.admin — database admin
- plain.observer — request tracing
- plain.flags — feature flags
- plain.scan — security scanning
- plain.pageviews — analytics
- plain.support — support tickets
Users:
- plain.passwords — password auth
- plain.oauth — social login
- plain.loginlink — magic links
About
Plain is a fork of Django, driven by ongoing development at PullApprove — with the freedom to reimagine it for the agentic era.
- Docs: https://plainframework.com/docs/
- Source: https://github.com/dropseed/plain
- Getting started: https://plainframework.com/start/
- License: BSD-3
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
110.9kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
351.8kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
