MCPcopy Index your code
hub / github.com/cot-rs/cot

github.com/cot-rs/cot @cot-cli-v0.6.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release cot-cli-v0.6.0 ↗ · + Follow
2,741 symbols 7,281 edges 206 files 217 documented · 8% updated todaycot-cli-v0.6.0 · 2026-03-19★ 1,01262 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Cot

Rust Build Status codecov crates.io Guide Documentation

Discord chat GitHub Sponsors Open Collective backers

Cot is an easy to use, modern, and fast web framework for Rust. It has been designed to be familiar if you've ever used Django, and easy to learn if you haven't. It's a batteries-included framework built on top of axum.

Features

  • Easy to use API — in many ways modeled after Django, Cot's API is designed to be easy to use and intuitive. Sensible defaults make it for easy rapid development, while the API is still empowering you when needed. The documentation is a first-class citizen in Cot, making it easy to find what you're looking for.
  • ORM integration — Cot comes with its own ORM, allowing you to interact with your database in a way that feels Rusty and intuitive. Rust types are the source of truth, and the ORM takes care of translating them to and from the database, as well as creating the migrations automatically.
  • Type safe — wherever possible, Cot uses Rust's type system to prevent common mistakes and bugs. Not only views are taking advantage of the Rust's type system, but also the ORM, the admin panel, and even the templates. All that to catch errors as early as possible.
  • Admin panel — Cot comes with an admin panel out of the box, allowing you to manage your app's data with ease. Adding new models to the admin panel is stupidly simple, making it a great tool not only for rapid development and debugging, but with its customization options, also for production use.
  • Secure by default — security should be opt-out, not opt-in. Cot takes care of making your web apps secure by default, defending it against common modern web vulnerabilities. You can focus on building your app, not securing it.

Getting Started

Packaging status

To get started with Cot, you need to have Rust installed. If you don't have it yet, you can install it by following the instructions on the official Rust website.

Then, you need to install cot-cli by running:

cargo install cot-cli

After that, you can create a new project by running:

cot new my_project

This will create a new project in the my_project directory. You can then navigate to the project directory and run the following command to start the development server:

cargo run

We recommend you to read the official guide to learn more about Cot and how to use it.

Got interested or have questions? Join our Discord server — we'd love to hear from you!

cot-cli packages

If you prefer to use your operating system's package manager to manage the cot-cli package, you can find it in the repositories listed in the “Packaging status” badge on the right. Note that most of these packages are maintained by the community, so you should always check what exactly is included in the package. Moreover, the version in the package manager might not be the latest one, so we recommend just using the official package which can be installed with cargo install cot-cli.

Development

If you want to contribute to Cot, please read the contributing guide. It will guide you through the process of setting up your development environment and making contributions.

Thanks in advance for your contributions — every contribution is appreciated!

Guide

The guide served at the official website is built from the Markdown files located in the docs directory. See the docs/README.md file for more information about the guide and how to build the website locally.

Star History

Star History Chart

Sponsorship

Cot is an independent, open-source project. If you find it useful, please consider sponsoring its development — your support helps us dedicate more time to building and maintaining the framework.

A huge thank you to all our existing sponsors — your generosity makes this project possible!

Contributors

Made with contrib.rocks.

License

Cot is licensed under either of the following, at your option:

  • Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
  • MIT License (LICENSE-MIT or https://opensource.org/licenses/MIT)

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Cot by you shall be dual licensed under the MIT License and Apache License, Version 2.0, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

PrimaryKey (Interface)
A marker trait that denotes that a type can be used as a primary key in a database. [6 implementers]
cot/src/db.rs
FromRequestHead (Interface)
extractors. [17 implementers]
cot-core/src/request/extractors.rs
Repr (Interface)
(no doc) [3 implementers]
cot-cli/src/migration_generator.rs
DatabaseField (Interface)
A trait denoting that some type can be used as a field in a database. [9 implementers]
cot/src/db.rs
IntoResponse (Interface)
Trait for generating responses. Types that implement `IntoResponse` can be returned from handlers. # Implementing `Into [26 …
cot-core/src/response/into_response.rs
FromDbValue (Interface)
A trait for converting a database value to a Rust value. [15 implementers]
cot/src/db.rs
RequestHandler (Interface)
(no doc) [8 implementers]
cot-core/src/handler.rs
ToDbValue (Interface)
A trait for converting a Rust value to a database value. [11 implementers]
cot/src/db.rs

Core symbols most depended-on inside this repo

unwrap
called by 519
cot/src/db.rs
clone
called by 274
cot/src/db/query.rs
unwrap
called by 256
cot/src/db/relations.rs
to_string
called by 200
cot/src/form/fields/select.rs
expect
called by 190
cot/src/db.rs
path
called by 75
cot/src/middleware.rs
attr
called by 73
cot-core/src/html.rs
iter
called by 67
cot-core/src/request.rs

Shape

Function 1,095
Method 1,032
Class 442
Enum 114
Interface 58

Languages

Rust100%

Modules by API surface

cot/src/project.rs106 symbols
cot-cli/src/migration_generator.rs98 symbols
cot/src/db.rs84 symbols
cot/src/config.rs84 symbols
cot/src/db/migrations.rs79 symbols
cot/src/auth.rs67 symbols
cot/src/router.rs65 symbols
cot/src/form/fields/chrono.rs59 symbols
cot/src/test.rs58 symbols
cot-codegen/src/expr.rs58 symbols
cot/src/db/query.rs54 symbols
cot-core/src/request/path_params_deserializer.rs53 symbols

Datastores touched

(mysql)Database · 1 repos
dbnameDatabase · 1 repos
dbnameDatabase · 1 repos
invalidDatabase · 1 repos

For agents

$ claude mcp add cot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact