sonnet-cli
Typer and rich building blocks for the command-line side of a sonnet-server application: a base app, a database command group, a resource command factory and terminal widgets.
It is a library, not a binary. There is no [project.scripts] entry and no
sonnet-cli command; installing it puts nothing on your PATH. Your
application defines its own Typer app and its own entry point, and mounts these
pieces into it.
Version 0.2.0.
What it provides
sonnet_cli.commands.db-- adb check/db upgradegroup that runs against the application's own Alembic chain.sonnet_cli.resource_cli-- uniformlist/get/setcommands over aResourceSpec-backed resource, talking to the repository directly with no HTTP server involved.sonnet_cli.checks-- a readiness-pipeline runner and the database pipeline builders behind thedbcommands.sonnet_cli.multiselect-- an arrow-key checkbox picker with a numbered fallback when stdin is not a TTY.sonnet_cli.utils-- the shared rich console and path helpers that exit cleanly.sonnet_cli.app-- a ready-made base Typer app with thedbgroup mounted, for cases where you do not need your own callback.
python -m sonnet_cli db check exists so the commands can be exercised
in-tree during development. It is not an operator interface.
Install
uv add sonnet-cli
Depends on typer, rich, sonnet-server and
sonnet-core. Adding it to an application that
already depends on sonnet-server costs two terminal libraries and nothing
else. The only extra is dev.
Usage
Define your own Typer app, register your services in the callback, and mount the groups you want:
import typer
from sonnet_cli.commands import db
from sonnet_core.services.registry import get_service_registry
from example_server.services.di import register_all_services
app = typer.Typer(name="example-server-cli", no_args_is_help=True)
@app.callback()
def main_callback() -> None:
registry = get_service_registry()
register_all_services(registry)
app.add_typer(db.app, name="db")
Your [project.scripts] entry points at that app. The commands still need
settings loaded and services registered before they run -- that bootstrap is
your application's job, and the usage guides walk through it.
Documentation
- Usage --
docs/usage/index.md - Design --
docs/design/index.md - Workspace --
../../docs/README.md
License
Apache 2.0 -- see LICENSE.md.
Metadata
Release files for sonnet-cli 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sonnet_cli-0.2.1.tar.gz | 12.9 kB | With provenance | Details for sonnet_cli-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sonnet_cli-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for sonnet_cli-0.2.1-py3-none-any.whl |
Total release size: 26.9 kB
Release files / sonnet_cli-0.2.1.tar.gz
| Download URL | sonnet_cli-0.2.1.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
baac4dfd45ec78e0ed40f4058c6ad0e57170a4a62a1b605d8a5ae3cbe691a108
|
|
BLAKE2b-256 checksum How to use checksums |
f2002117ff9051d2d6dce415a733236c97c107613f5cfc54cf744cb47e4439c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency logRelease files / sonnet_cli-0.2.1-py3-none-any.whl
| Download URL | sonnet_cli-0.2.1-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
722bc27794ec592d6ac343ed23239704e4ffbad344f6f86ea9d34a5ed19e4cdc
|
|
BLAKE2b-256 checksum How to use checksums |
6f060f98ab3e6d2eedb829304d89ae963313eecf35f9078cd709db5a98e963b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency logSecurity for sonnet-cli 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sonnet_cli-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.