MCPcopy Index your code
hub / github.com/bens-schreiber/cloesce

github.com/bens-schreiber/cloesce @v0.5.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.2 ↗ · + Follow
932 symbols 2,950 edges 117 files 152 documented · 16% updated 16d agov0.5.2 · 2026-06-22★ 3710 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cloesce (alpha, v0.5.0)

[!WARNING] Cloesce is under active development, expanding its feature set as it pushes toward full Cloudflare support across any language. The syntax and features described here are subject to change as the project evolves.

Cloesce is a schema language that describes a full stack application built on Cloudflare's edge ecosystem. From one language, generate an entire application with support for:

Feature Support
ORM
RPC stubs
Infrastructure as Code
SQL Migrations
Middleware
Runtime Type Validation

How Easy can Full Stack Development Be?

kv Namespace {
    settings(id: int) -> json {
        "user/settings/{id}"
    }
}

r2 Bucket {
    avatar(id: int) {
        "user/avatars/{id}.png"
    }
}

d1 { Db }

[crud get, save, list]
model User for Db {
    primary {
        id: int
    }

    column {
        name: string
    }

    nav Posts::id {
        posts
    }

    kv Namespace::settings(id) {
        settings
    }

    r2 Bucket::avatar(id) {
        avatar
    }
}

api User {
    get helloWorld(self) -> User
}

Documentation

See the Cloesce Docs for more information on getting started, language features, architecture, and roadmap.

Utilize an LLM to interact with the docs in a conversational way:

curl https://cloesce.pages.dev/llms-full.txt -o llms-full.txt

VS Code Extension

A basic language highlighting extension for Cloesce is available in the VS Code marketplace. In the future, this extension will also include a full LSP server.

More editor integrations are planned for the future (and you can always contribute your own!). If you're interested in contributing an editor extension, reach out in the Discord server.

Contributing

Contributions are welcome at all levels. Join our Discord to discuss ideas, report issues, or get help getting started. Create an issue on GitHub if you find a bug or have a feature request.

Coalesce

Check out Coalesce, an accelerated web app framework for Vue.js and Entity Framework by IntelliTect. Cloesce takes much of its inspiration from Coalesce (Cloesce = Cloudflare + Coalesce).

Building, Formatting, Testing

Prerequisites

Before building, ensure you have the required dependencies installed:

Required:

Optional:

  • pandoc (for documentation) - brew install pandoc
  • mdbook (for documentation) - cargo install mdbook

Run make check-deps to verify your setup.

Build Commands

All relevant commands can be found in the Makefile in the project root. Run make all to build, format and test all packages.

Extension points exported contracts — how you extend this code

ToDoc (Interface)
(no doc) [25 implementers]
src/compiler/frontend/src/formatter/mod.rs
R2Repository (Interface)
(no doc) [5 implementers]
src/runtime/ts/src/router/orm.ts
Env (Interface)
(no doc)
examples/reddit/tests/setup.ts
Window (Interface)
(no doc)
examples/weather/src/web/index.ts
DisplayError (Interface)
(no doc) [3 implementers]
src/compiler/frontend/src/err/mod.rs
KvRepository (Interface)
(no doc) [4 implementers]
src/runtime/ts/src/router/orm.ts
ProvidedContext (Interface)
(no doc)
examples/weather/tests/setup.ts
MigrationsIntent (Interface)
(no doc) [3 implementers]
src/compiler/migrations/src/lib.rs

Core symbols most depended-on inside this repo

unwrap
called by 241
src/runtime/ts/src/common.ts
map
called by 231
src/runtime/ts/src/router/wasm.ts
then
called by 230
src/compiler/frontend/src/formatter/doc.rs
push
called by 189
src/compiler/semantic/src/err.rs
get
called by 137
src/runtime/ts/src/router/orm.ts
expectHttpResult
called by 105
tests/e2e/src/setup.ts
src_to_idl
called by 56
src/compiler/compiler-test/src/lib.rs
lex_and_ast
called by 55
src/compiler/compiler-test/src/lib.rs

Shape

Function 428
Method 286
Class 154
Interface 34
Enum 30

Languages

Rust64%
TypeScript36%

Modules by API surface

src/runtime/ts/src/router/orm.ts59 symbols
src/compiler/idl/src/lib.rs52 symbols
src/compiler/semantic/tests/analysis_tests.rs43 symbols
src/compiler/frontend/src/lib.rs42 symbols
src/runtime/ts/src/router/router.ts32 symbols
src/compiler/cli/bin/cloesce.rs30 symbols
src/compiler/orm/tests/validate_tests.rs27 symbols
src/runtime/ts/tests/builder.ts25 symbols
src/compiler/orm/src/upsert.rs25 symbols
src/runtime/ts/src/common.ts22 symbols
src/runtime/ts/src/cidl.ts22 symbols
src/compiler/frontend/src/formatter/mod.rs22 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page