sonnet-cli
The command-line interface library for sonnet-server applications.
Not a CLI application. It ships no console script and is not run directly. Consuming apps (lauro, sestina, coco-rag, ...) import it to build their own command-line interfaces -- each app owns its Typer application and its
[project.scripts]entry point. sonnet-cli provides the base app and the reusable command building blocks they assemble.
sonnet-cli depends on sonnet-server (concrete readiness checks, DI wiring)
and sonnet-core (ResourceSpec, CrudRepository, the readiness engine). It
is the CLI layer that sits above the server framework.
Install
pip install sonnet-cli
Contents
Terminal building blocks
typer + rich + the standard library.
| Component | What |
|---|---|
sonnet_cli.app |
The base Typer application (the db command group mounted) |
sonnet_cli.multiselect |
Arrow-key checkbox picker with a numbered fallback when stdin is not a TTY |
sonnet_cli.utils |
Shared rich console and path helpers |
Command-group factories
Pieces an app mounts into its own Typer app. These drive a sonnet-server application.
| Component | What |
|---|---|
sonnet_cli.resource_cli |
Uniform list / get / set for a ResourceSpec-backed resource (talks to CrudRepository directly, no HTTP server) |
sonnet_cli.commands.db |
Database check / upgrade, given the app's Alembic config |
sonnet_cli.checks |
Readiness-pipeline runner and builders |
Usage
A consuming app builds its own Typer application on top of sonnet_cli.app,
mounts the command groups it needs, and declares its own [project.scripts]
entry point. ResourceSpec is declared once (in sonnet_core) and consumed by
both sonnet_cli.resource_cli and sonnet-server's REST factory, so field policy
lives in one place across transports.
Why a separate package
The CLI was a pure leaf inside sonnet_server.cli -- nothing in the server
runtime imported it -- consumed by several services with an identical surface.
Extracting it:
- lets sonnet-server drop its
typer/richdependency and be a pure web/server library; - gives every sonnet-server app one shared CLI foundation instead of copies;
- makes the layering explicit (CLI on top of server + core).
It is a library, not a binary: there is no sonnet-cli command. A consuming app
is where a runnable CLI (and its [project.scripts]) lives.
Licence
Apache-2.0
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 sonnet_cli-0.2.0.tar.gz.
File metadata
- Download URL: sonnet_cli-0.2.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ae1c2a8e7db8ab995b8fef40b0dc7440eea23ae6f71551cc865124629a28bc3
|
|
| MD5 |
6a67bb65dcaa2e984d8d14bf89af388b
|
|
| BLAKE2b-256 |
0acc9fdd3ca3bcced687fba068b17338a2b414c1075b3bb3bae01d717f12a69a
|
Provenance
The following attestation bundles were made for sonnet_cli-0.2.0.tar.gz:
Publisher:
publish.yml on petrarca/sonnet-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonnet_cli-0.2.0.tar.gz -
Subject digest:
3ae1c2a8e7db8ab995b8fef40b0dc7440eea23ae6f71551cc865124629a28bc3 - Sigstore transparency entry: 2435226146
- Sigstore integration time:
-
Permalink:
petrarca/sonnet-server@3f8f7d8b7dd3a9141fe4038a7c455d5424bda69f -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/petrarca
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f8f7d8b7dd3a9141fe4038a7c455d5424bda69f -
Trigger Event:
push
-
Statement type:
File details
Details for the file sonnet_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sonnet_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51cd09215e925bc869972d999462513502247f0cd936183f0f001edf280d1804
|
|
| MD5 |
e180726a394d3511ba3582bfe1758b29
|
|
| BLAKE2b-256 |
4f5b7a0815556a4cb117504938279c10c45e564f09ea0db1fd5972efe1758be8
|
Provenance
The following attestation bundles were made for sonnet_cli-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on petrarca/sonnet-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonnet_cli-0.2.0-py3-none-any.whl -
Subject digest:
51cd09215e925bc869972d999462513502247f0cd936183f0f001edf280d1804 - Sigstore transparency entry: 2435227641
- Sigstore integration time:
-
Permalink:
petrarca/sonnet-server@3f8f7d8b7dd3a9141fe4038a7c455d5424bda69f -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/petrarca
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3f8f7d8b7dd3a9141fe4038a7c455d5424bda69f -
Trigger Event:
push
-
Statement type: