Cadmus
v0.1.2 on crates.io

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

~/code

$ 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

localhost:3000/admin/book

The Cadmus admin site: a list of books with search, filters by author and date, and bulk actions

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
src/models/mod.rs
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"),
)

Built for AI agents

Let your coding agent build on Cadmus

The cadmus command includes an MCP server. Connect Claude Code, Cursor, VS Code or any MCP client, and your agent can read these docs, create projects, add models and run migrations.

  • Docs as tools and resources: list, read and search
  • Create projects and models, make and apply migrations
  • Every new project has an AGENTS.md guide
  • llms.txt and llms-full.txt for tools that read the web
Connect your agent
Claude Code
claude mcp add cadmus -- cadmus mcp
Cursor, Claude Desktop
{
  "mcpServers": {
    "cadmus": { "command": "cadmus", "args": ["mcp"] }
  }
}

Quick start

From nothing to an admin in four steps

  1. 1

    Install

    cargo install cadmus-cli
  2. 2

    Create a project

    cadmus new blog && cd blog
  3. 3

    Describe your data

    cadmus generate model Post title:string body:text
    cargo run -- makemigrations && cargo run -- migrate
  4. 4

    Run it

    cargo run -- createsuperuser --username admin
    cargo run -- serve

Read the guide

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.