panza
The squire for your CLI — clap serve, bind, health, static.
In active development — expect breaking changes.
What it owns
| Piece | Behavior |
|---|---|
ServeArgs |
clap: --host (default 127.0.0.1), --port / -p (default 8787), --open |
ServeMeta |
service + version for health JSON |
run |
tokio + axum: bind, Ctrl-C shutdown, log listen URL |
GET /health |
{ "ok", "service", "version", "uptime_secs" } |
| Access log | info: METHOD path[?query] -> status on the full router |
StaticMount |
None / Dir / Embedded with SPA index.html fallback |
| Router merge | host supplies an axum::Router; panza merges it |
What it does not own
- Domain routes / DB access
- Frontend framework or shared UI
- Auth (warns if bind ≠ loopback)
Usage
use Parser;
use ;
async
For tests or custom bind loops, use serve_router instead of run.
License
MIT OR Apache-2.0