Skip to content

CLI (quadkit-cli)

The quadkit command line: project scaffolding, generators, a smart runner, and administrative commands for every stage of the application lifecycle. Contributor-based — other packages can register their own commands.

For day-to-day Quadkit developers: scaffold, generate, run, inspect.

PackageRole
quadkit-contractszero-dependency protocols, types, exception hierarchy
quadkitthe framework core — DI container, modules, config, logging, Result
quadkit-webASGI layer — controllers, routing, middleware, OpenAPI docs
quadkit-cliproject scaffolding and code generators
quadkit-testingin-process test beds, fakes, fixtures
Terminal window
uv add quadkit-cli
# or as a standalone tool:
uv tool install quadkit-cli

Requires Python >= 3.11.

There is no code to write — the product is the command line:

Terminal window
# Create a new project (template defaults to web-api); the package
# inside is my_api/ with app.py exposing create_app()
quadkit new project my-api
cd my-api
# Generate application code (list all generators: quadkit gen list)
quadkit gen provider MyProvider
quadkit gen controller Orders
# Serve the application; reload is on by default, pass --no-reload in prod
quadkit run my_api.app:create_app --host 0.0.0.0 --port 8000 --workers 4

Eleven generators ship today (quadkit gen list):

controller middleware graphql webhook websocket exception_filter
interceptor error resource provider test

Global options: --json for machine-readable output, --quiet, --debug, --no-color, and --config <path> to point at a specific application.yaml.

CommandPurpose
quadkit new project / module / packagescaffold projects, bounded contexts, and quadkit-* extensions
quadkit initinitialize Quadkit in an existing project
quadkit add <provider>add a provider to a project (e.g. database, auth)
quadkit run [target]smart runner — auto-detects create_app, sets profile
quadkit dev startproduction-server startup
quadkit gen <what>code generation (controllers, providers, middleware, tests, more — see quadkit gen list)
quadkit test / quadkit lintproject-level checks
quadkit db / quadkit eventsdatabase / event-schema management
quadkit config / quadkit inspect / quadkit shellconfiguration, runtime introspection, REPL
quadkit project / quadkit contrib / quadkit systemproject tasks, contributors, system info
quadkit versionframework and package versions

Per-distribution guide: quadkit-cli reference.

[dev] and [test] bundle tooling; [all] pulls everything.

The CLI reads application.yaml like any Quadkit application; its own section is cli (color), overridable via QK_CLI__*, e.g. QK_CLI__COLOR=false.

Commands report structured failures (use --json for machine-readable envelopes) and non-zero exit codes; --debug surfaces full tracebacks.

quadkit test runs the project suite; the CLI’s own behavior is covered by the public test set the release pipeline executes from the exported tree.

The CLI reads configuration and scaffolds code — it does not serve traffic. As with every distribution, keep the 0.x line pinned and review release notes on upgrade. Report vulnerabilities privately per SECURITY.md.

Version 0.0.3 in the 0.x series, released in lockstep with the other four distributions; APIs may change between minor versions until 1.0 — pin an exact version (quadkit-cli==0.0.4) or a tight range (>=0.0.4,<0.1). Full policy: stability and compatibility.

Apache-2.0 — see LICENSE. “Quadkit” and the Quadkit logo are trademarks of the project — see TRADEMARK.md.