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.3.tar.gz (63.0 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.3-py3-none-win_amd64.whl (907.0 kB view details)

Uploaded Python 3Windows x86-64

crozier-0.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

crozier-0.0.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (961.2 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

crozier-0.0.3-py3-none-macosx_11_0_arm64.whl (892.6 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

crozier-0.0.3-py3-none-macosx_10_12_x86_64.whl (992.8 kB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: crozier-0.0.3.tar.gz
  • Upload date:
  • Size: 63.0 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.3.tar.gz
Algorithm Hash digest
SHA256 4460d14b0a77849d7e36300ab1deca2ae4d5eab49c164977a2873b958aebba96
MD5 002d15f2cad2ee46e030a9f628823022
BLAKE2b-256 d2e11925d814bafebe5ddf630713a9341645f4280ff0d3a8a86829c7fd126e04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crozier-0.0.3-py3-none-win_amd64.whl
  • Upload date:
  • Size: 907.0 kB
  • 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.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 79569377d5d79c3dca65231d6110af31b485fadd02642f05abc43432df2b81d1
MD5 d36c1aa5a5e1ae11c6ef6f384d189253
BLAKE2b-256 4b4d5c68f2517b356580ce8b490f9c910a34c520fd77b98daa575c8a07745245

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crozier-0.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60f1f6b9234a42895fea74f955adc1d444bda4ec7eb14345bde04612fa103c86
MD5 dda96151bcf197254343bdffbf85cfbb
BLAKE2b-256 a332ff48a4b5103f267b08b57dad48b300c1a7e127e90aea70a9f6892496b253

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crozier-0.0.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fa39ceeeb2539e58aaef4bc9810921140104bd8d6545bb9afcab53961093eb2c
MD5 5a422110cfc6840c3c5ce1344a01b40d
BLAKE2b-256 41d8d3557ad1db302c8db83cebf2fd85486f5370a7d6350fe7a58c4a2e92ff8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crozier-0.0.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c368782dd740aaa3e34d27deeafd7d016a06cd2826c2c5363c2d40481b8d6bb
MD5 85ae743b248a72a7a13d7346659907f9
BLAKE2b-256 151140674dc48befc42847aa5f1b3d0933b0d20976518f15c3169f2378cfbcc9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crozier-0.0.3-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 07c7ed6fa79a812e98c338827f2b74cd455f310312d7afcf564306e19ad4b83d
MD5 79240d981342d024dd2f9b8a506c17a7
BLAKE2b-256 a865f1ebc07ae385fb69d77a53c92a4b444ce0496b27245badd79b000f2c8f4b

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