Compose production Hayate projects for ASGI and Cloudflare Workers
Project description
create-hayate
Composable, production-oriented project scaffolding for hayate.
The golden path creates one application core with API routes, OpenAPI/Scalar, MCP 2025-11-25, checked SQL, Cloudflare Access identity, SQLite on ASGI, and D1 on Cloudflare Workers:
uvx create-hayate my-app --template workers --preset production
cd my-app
uv run pytest
uv run python manage_workers.py d1 migrations apply DB --local
uv run python manage_workers.py dev
The generated README keeps the scaffold-to-start path under ten documented minutes and includes a fail-closed production checklist.
Runtimes
| Template | Runtime | Default composition |
|---|---|---|
api (default) |
ASGI | Tested TODO API |
workers |
ASGI and Cloudflare Python Workers | The same tested API |
mcp |
ASGI and Workers | workers + the MCP component |
mcp remains a compatibility shortcut. It is not a copied template.
Features
Compose features explicitly instead of choosing from a template matrix:
uvx create-hayate my-app \
--template workers \
--with openapi,mcp,sql \
--auth cloudflare-access
| Feature | Generated boundary |
|---|---|
openapi |
OpenAPI 3.1.1, hardened Scalar, pinned TypeScript export |
mcp |
MCP 2025-11-25 tools sharing request identity and storage |
sql |
Migration-checked hayate-sql; SQLite on ASGI and D1 on Workers |
--auth cloudflare-access |
Local explicit identity; production RS256/JWKS verification |
All 40 supported runtime/feature/auth/entrypoint combinations, plus both production entrypoints, are generated, dependency resolved, and imported in CI. Invalid combinations fail before the destination directory is written; for example, Cloudflare Access production verification requires the Workers runtime.
Production preset
--preset production is the reviewed composition of:
openapi,mcp,sql;- Cloudflare Access identity;
- exact-origin CORS;
- secure response headers and a 1 MiB request-body ceiling;
- a Cloudflare native rate-limit binding;
- D1 migration and deployment configuration;
- explicit secret, identity, CORS, abuse, observability, migration, and rollout
checks in
PRODUCTION.md.
Local CI drives the generated preset over both real ASGI HTTP and real workerd. The workerd path applies a real D1 migration, writes through the HTTP API, and reads the same authenticated data through MCP.
Design
- Zero-dependency CLI. Generation uses only the standard library and bundled, versioned components; it performs no network fetch.
- Small composition surface. One base app, one Workers runtime overlay, three feature components, and explicit auth/production components replace copied full-template combinations.
- Portable application core.
src/app.pydoes not change between ASGI and Workers. Runtime resources enter through the Hayate request context. - Feature-complete Workers default.
WorkerEntrypointremains the default. HTTP-only services can explicitly request--workers-entrypoint global. - Evidence over claims. CI runs unit tests, every dependency composition, real ASGI, real workerd, D1 migrations, MCP, workflow audit, and dependency audit.
The internal design memo (Japanese, per project convention) is DESIGN.md; release history is in CHANGELOG.md.
Status: alpha (0.4.x). Generated projects pin released compatibility lines. Public APIs may still move before 1.0.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file create_hayate-0.4.0.tar.gz.
File metadata
- Download URL: create_hayate-0.4.0.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
add02fa9c6cd5a805a2086264177653594124f006c0a14e207b15d257dab9a6f
|
|
| MD5 |
ee6f5973825570a2e03cd6cddf372b66
|
|
| BLAKE2b-256 |
cc4abbfcb386f535d1feb06d5eed4109f55ed921aefcb61827783cfa68d810d0
|
Provenance
The following attestation bundles were made for create_hayate-0.4.0.tar.gz:
Publisher:
release.yml on hayatepy/create-hayate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
create_hayate-0.4.0.tar.gz -
Subject digest:
add02fa9c6cd5a805a2086264177653594124f006c0a14e207b15d257dab9a6f - Sigstore transparency entry: 2256130125
- Sigstore integration time:
-
Permalink:
hayatepy/create-hayate@0e0831b2df9d551452e996280ecdc99dfd4d3ccd -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/hayatepy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0e0831b2df9d551452e996280ecdc99dfd4d3ccd -
Trigger Event:
push
-
Statement type:
File details
Details for the file create_hayate-0.4.0-py3-none-any.whl.
File metadata
- Download URL: create_hayate-0.4.0-py3-none-any.whl
- Upload date:
- Size: 41.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81987f6fab77096b5317bcd576984a691074ff25d5cd1e321fe7a3bce11c3765
|
|
| MD5 |
7b744a5a20937599fad2fd9ed768200e
|
|
| BLAKE2b-256 |
3554ef7de3f9274440d9b070269eba233a13a6c953b22d508492eaa97952b731
|
Provenance
The following attestation bundles were made for create_hayate-0.4.0-py3-none-any.whl:
Publisher:
release.yml on hayatepy/create-hayate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
create_hayate-0.4.0-py3-none-any.whl -
Subject digest:
81987f6fab77096b5317bcd576984a691074ff25d5cd1e321fe7a3bce11c3765 - Sigstore transparency entry: 2256130133
- Sigstore integration time:
-
Permalink:
hayatepy/create-hayate@0e0831b2df9d551452e996280ecdc99dfd4d3ccd -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/hayatepy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0e0831b2df9d551452e996280ecdc99dfd4d3ccd -
Trigger Event:
push
-
Statement type: