Skip to main content

Ultra-fast OpenAPI-to-SDK code generator that matches Fern's output, byte for byte.

Project description

crozier

An ultra-fast, memory-efficient OpenAPI-to-SDK code generator written in Rust + minijinja. crozier reproduces Fern's generated SDKs byte-for-byte (with generator-identifying comments aside), driven by nothing but an OpenAPI document and a couple of naming flags — no per-project config, no generators written in the target language.

Python is the only target today; more will follow.

Status: early. crozier generates the Python type layer (pydantic models, enums, unions/aliases) plus version.py/py.typed, and byte-matches Fern's output for those files. See docs/matching.md for exactly what is matched and the roadmap.

Install

From PyPI (fastest — a prebuilt binary, no Rust toolchain): crozier ships as platform wheels that wrap the compiled binary and expose it as a console script, so any Python installer puts it on your PATH in seconds:

pip install crozier      # or: pipx install crozier
uvx crozier --help       # run once without installing

Platforms without a prebuilt wheel fall back to the source distribution, which builds from Rust (a toolchain is needed there).

From crates.io:

cargo install crozier --locked

From the install script (prebuilt binary from GitHub Releases, verified):

curl -fsSL https://raw.githubusercontent.com/nickderobertis/crozier/main/scripts/install.sh | sh

It detects your platform, downloads the matching archive, and verifies it against a trust root independent of where it was downloaded — a Sigstore build-provenance attestation when a verifier (cosign, pip install sigstore, or gh) is present, else the canonical SHA-256 checksum. Pin a version or install location with sh -s -- --version v0.1.0 --to ~/.local/bin.

From source (latest main):

cargo install --git https://github.com/nickderobertis/crozier --locked

From a release archive (manual): each release publishes per-platform archives named crozier-<tag>-<target>.tar.gz with a matching .sha256 and a .sigstore.json provenance bundle, for targets x86_64/aarch64 Linux, x86_64/aarch64 macOS, and x86_64 Windows. Download the archive for your platform from the Releases page, verify the checksum (or the attestation), and put the crozier binary on your PATH.

Usage

crozier generate \
  --spec path/to/openapi.yml \
  --output ./generated \
  --package-name my_api \
  --project-name my-api
  • --spec — the OpenAPI 3.x document (.yml, .yaml, or .json).
  • --output — directory to write the SDK into.
  • --package-name — the Python import package (the directory under src/). Defaults to a snake_case of the API title.
  • --project-name — the distribution name recorded in version.py. Defaults to the package name.

crozier exits 0 on success (with a one-line summary on stderr) and 1 on any error, printing the exact problem and a suggested fix.

Development

The command surface is a small set of just recipes:

just bootstrap   # set up from a clean clone (toolchain + dev tools)
just check       # full gate: fmt, clippy -D warnings, tests + e2e + coverage, deny, machete, doc
just test        # fast tests with coverage enforced (95%)
just test-e2e    # drive the compiled binary and byte-compare against fixtures
just format      # rustfmt in place
just upgrade     # cargo update, then re-run the gate

See AGENTS.md for the durable contributor guide and docs/matching.md for the byte-matching strategy.

License and attribution

crozier is licensed under Apache-2.0. It is an independent, clean-room implementation — it reproduces Fern's generated output format (the project's explicit goal) and does not copy Fern's generator source.

The test fixtures under tests/fixtures/ are Fern's own output and OpenAPI test specs, used under Apache-2.0 with attribution and a statement of changes; see NOTICE and licenses/fern-APACHE-2.0.txt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crozier-0.0.7.tar.gz (95.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

crozier-0.0.7-py3-none-win_amd64.whl (1.0 MB view details)

Uploaded Python 3Windows x86-64

crozier-0.0.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

crozier-0.0.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

crozier-0.0.7-py3-none-macosx_11_0_arm64.whl (986.5 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

crozier-0.0.7-py3-none-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file crozier-0.0.7.tar.gz.

File metadata

  • Download URL: crozier-0.0.7.tar.gz
  • Upload date:
  • Size: 95.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crozier-0.0.7.tar.gz
Algorithm Hash digest
SHA256 be6e7dba5adaafec90844aed08f1edb406e84d6e26d9d9d823f5575ae5ce8879
MD5 60e1560c6fd7ddbe73f5fade9168b330
BLAKE2b-256 34fd1882e96a56d5d365743477977cf841c41e2d28567ee321652dd63eab544c

See more details on using hashes here.

File details

Details for the file crozier-0.0.7-py3-none-win_amd64.whl.

File metadata

  • Download URL: crozier-0.0.7-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for crozier-0.0.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 893012eb2357b0a617852194b5282c027e2b099744bd25a35436a9b5b6b8a01f
MD5 9fea4c2d0a263293bac4e3eb40e2b607
BLAKE2b-256 7054b08780d1d5b19eca17c942ddcff26a9bc829d44fb71b33588dc4b17afdba

See more details on using hashes here.

File details

Details for the file crozier-0.0.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for crozier-0.0.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d89a07fde1f0907ac540b1495f27a1d358fd5df32c23a67944b2a37032307be5
MD5 7a0b7f05e67133d8cd36fe2f2d5d25af
BLAKE2b-256 30488e5e436824f31da63806559041954d4c4b0c1c81ac386ef8e5b10596051c

See more details on using hashes here.

File details

Details for the file crozier-0.0.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for crozier-0.0.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 86060d54107b4235988de9cc12d7db43a4ecc818d2953d488ca8e6a76f2261d3
MD5 05503ba793146154baa6d8be831dd171
BLAKE2b-256 07f57cba3f3ab2e3732e40e1ae9c002cb4f87fe507c2c35a14eab0b19803fefd

See more details on using hashes here.

File details

Details for the file crozier-0.0.7-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for crozier-0.0.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6f62ce82913589e9c474b1a1da71b636015f8dc21b280a2c14b3c4d4f1fa2b62
MD5 65c0cb0548fe40c40f040732b92c01dc
BLAKE2b-256 c07af9caff4c15bf28932c1f24df75510c804c438b1915e522c11fac04746f48

See more details on using hashes here.

File details

Details for the file crozier-0.0.7-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for crozier-0.0.7-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e2f4197b56104de3b71b00d2bfb7f2d2a44a618a8e947767fdaa1e4d5d6499d8
MD5 3b5c1a21f913379b84069d5efe9d8a40
BLAKE2b-256 71216c82132143e2f9ad6a9241eb59386eade87a287f6be0aea9658ed4b8463e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page