Skip to main content

sonnet-cli

A library of terminal building blocks for Petrarca Labs backend services.

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 entry point. sonnet-cli only provides the reusable pieces.

Status: placeholder. This release claims the name and proves the release pipeline. The implementation follows -- see Planned scope below.

Install

pip install sonnet-cli

Planned scope

Reusable toolkit -- framework-agnostic

typer + rich + the standard library. No server concepts.

Component What
multiselect Arrow-key checkbox picker with a numbered fallback when stdin is not a TTY
console / utils Shared rich console and path helpers
model editing Edit a Pydantic model as an annotated YAML document in $EDITOR, validating on save and re-opening with the error -- the kubectl edit pattern

Command-group factories -- mounted by an app

Pieces an app adds to its own Typer app. These drive a sonnet-server application and depend on it accordingly.

Component What
resource_cli Uniform list / get / set for a ResourceSpec-backed resource
db commands Database init / check / upgrade, given the app's Alembic config
checks Readiness-pipeline runner and builders

Why a separate library

The code currently lives in sonnet_server.cli. It is a pure leaf -- nothing in sonnet_server imports it -- and it is consumed by several services, three of which use an identical surface. Extracting it:

  • lets a pure API consumer stop pulling typer and rich;
  • gives the toolkit a home that does not require a web framework;
  • makes the layering explicit rather than conventional.

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

sonnet_cli-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sonnet_cli-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file sonnet_cli-0.1.0.tar.gz.

File metadata

  • Download URL: sonnet_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sonnet_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 19fcd3805ad2312139d5c94a27379c872880fe2a480b560b8c10f4cbd4d374ca
MD5 60e6bc5b3ce71ee01058958cd963e2e2
BLAKE2b-256 83c2a33dd4bf7e5268f6fceab93fcc1cbc6f8b704e37bf74282abe91d1591928

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnet_cli-0.1.0.tar.gz:

Publisher: publish.yml on petrarca/sonnet-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sonnet_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sonnet_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sonnet_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94f1b542222cedac36cd6ab4efeb0ebca825a641c1e51bcd2ba16e8e184dcec0
MD5 2e69011c16f1cd949266e428cce37d55
BLAKE2b-256 a9cd1742985af0984e65999985845172ed52ac89dd226cdbccfbb4c6651f0f03

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnet_cli-0.1.0-py3-none-any.whl:

Publisher: publish.yml on petrarca/sonnet-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.1

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page