charter

module
v0.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: MIT

README

charter

check latest release

Contract-first APIs on Cloudflare Workers, with Huma in Go or oRPC in TypeScript. Write the contract once and get the server, the OpenAPI and AsyncAPI specs, typed SDKs in any language (Fern), a CLI, an MCP endpoint and real-time streams: generated from that contract, and tested.

mise x go node github:joeblew999/charter -- charter new -name billing-api -module github.com/you/billing-api   # -lang ts: oRPC
cd billing-api && mise install && mise run setup && mise run check   # a working API, checked locally
mise run deploy                                                       # on Cloudflare

Needs mise and git, on macOS, Linux or Windows: mise fetches the charter tool (a release binary), Go and Node. Then: Getting started.

A repo with no API takes the docs site, the repo settings, the rules, the issue forms and the upstream tracking with charter adopt: Any repo.

What you get

  • The contract is the source. Change it, run mise run spec, and everything downstream follows. A stale spec fails the check.
  • Huma on Workers at TypeScript's cost, through workers-go and TinyGo: measured side by side (performance).
  • SDKs and a CLI for other developers, from the specs. A tagged release publishes them.
  • Real-time that loses nothing: SSE and WebSocket feeds that survive redeploys and dropped connections, proven by a soak test.
  • MCP: every operation that answers once is a tool for agents.
  • One way to run everything: mise run <task>, the same locally, on GitHub and in every project.

What is in this repository

Folder What it is
go/ The Go library a project imports
examples/ The notes API as a complete project, in Go (what charter new copies) and in TypeScript
conformance/ Every Fern feature end to end (OAuth, idempotency, uploads, webhooks, pagination, typed WebSockets), in Go and in TypeScript: the proof that the generated SDKs work
cmd/charter/ The tool behind every task
docs/ Everything else: start here, rendered at https://joeblew999.github.io/charter/

To help: How to help. License: MIT.

Directories

Path Synopsis
cmd
charter command
Command charter is what the mise tasks of a project run: every task in a project's mise.toml is one line, and anything that needs more than one line is a command here.
Command charter is what the mise tasks of a project run: every task in a project's mise.toml is one line, and anything that needs more than one line is a command here.
example module
sdk/go module
examples
notes module
notes-go module
notes/sdk/go module
go module
lib module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL