Describe your data.
Get the whole app.
Cadmus is a batteries-included web framework for Rust. Each model gets a database table, an admin site, a REST API with documentation, and migrations, with accounts and permissions built in.
cargo install cadmus-cli
$ cadmus new blog && cd blog
created blog
$ cadmus generate model Post title:string body:text published:bool
created src/models/post.rs
$ cargo run -- makemigrations
wrote src/migrations/m0001_initial.rs
+ table post
$ cargo run -- migrate
applied app.0001_initial
$ cargo run -- serve
listening on http://127.0.0.1:3000
# /admin the admin site
# /api the REST API, documented at /api/docs
One model
Write the model. The rest is generated.
A model is a plain SeaORM entity. Register it with a few options, and Cadmus serves it everywhere, under the same permissions.
- Admin pages to list, search, filter, add, edit and delete
- REST endpoints with filtering, sorting and paging
- API documentation in Swagger UI, ReDoc and OpenAPI
- Migrations that work on SQLite, PostgreSQL and MySQL
- Permissions: view, add, change, delete, per account and group
app.model::<book::Entity>(
ModelOptions::new()
.label("Books")
.list_display(["title", "author_id", "published"])
.search_fields(["title", "isbn"])
.list_filter(["author_id", "published"])
.readonly_fields(["created_at"])
.set_action("publish", "Mark as published", "published", "true"),
)
Batteries included
Everything a data-driven app needs, from the first command
Admin site
Lists, search, filters, bulk actions and forms. Responsive, light and dark, keyboard-friendly.
REST API
JSON endpoints for every model, with filtering, sorting, paging and clear errors.
Migrations
makemigrations writes the change, migrate applies it. Renames, data changes and rollbacks.
Accounts & permissions
Users, groups, staff and superusers, with view, add, change and delete per model.
Login methods
Passwords, two-factor codes, login links, and Google, Microsoft, GitHub, Facebook or any OIDC provider.
API keys
Long-lived, revocable keys for scripts and services, optionally read-only. Tokens for apps.
File uploads
To disk, S3, Azure or Google Cloud, with file fields on forms and resumable uploads.
Three databases
SQLite, PostgreSQL or MySQL, chosen by one address. Same behaviour on each.
Built for AI agents
Let your coding agent build on Cadmus
Two MCP servers: a hosted one that lets ChatGPT, Claude, Gemini or any MCP app search and read these docs, and a local one in the cadmus command that lets a coding agent create projects, add models and run migrations for you.
- Hosted docs server: add one address, nothing to install
- Docs as tools and resources: list, read and search
- Create projects and models, make and apply migrations
- Every new project has an
AGENTS.mdguide - llms.txt and llms-full.txt for tools that read the web
https://cadmus-mcp.cadmus-mcp.workers.dev/mcp
claude mcp add cadmus -- cadmus mcp
{
"mcpServers": {
"cadmus": { "command": "cadmus", "args": ["mcp"] }
}
}
Quick start
From nothing to an admin in four steps
- 1
Install
cargo install cadmus-cli - 2
Create a project
cadmus new blog && cd blog - 3
Describe your data
cadmus generate model Post title:string body:text cargo run -- makemigrations && cargo run -- migrate - 4
Run it
cargo run -- createsuperuser --username admin cargo run -- serve
Free and open source
MIT licensed. Named after Cadmus, the founder of Thebes, who sowed dragon's teeth and watched an army spring up ready-made.