Skip to main content

rn-forge-cli

Documentation · Changelog · Source · All pykit packages

The shared command-line layer for rn-forge-* applications: the Typer application class, the standard option set and the error-to-exit-code mapping.

Where rn-forge-commons is runtime-neutral — safe in a web server, a worker or a container — this package is the command-line shape. An ordinary batch application wants it just as much as a developer tool does, which is why it is separate from rn-forge-tooling, the package that owns files, installs and rendering. It owns:

  • app — CliApp, a typer.Typer subclass wiring the standard options into logging and the console; ExitCode; and run, which applies the mapping to any Typer app. Calling a CliApp returns an exit code, so [project.scripts] points straight at the app object.
  • options — --log-level, --log-file, --quiet, --json, --dry-run, --yes, --set, CliOptions and parse_overrides.
  • surface — CliSurface/CommandSurface, the records behind a [cli] table in a config file, from which CliApp.from_config builds the app. Validated on load: a wrong type names the offending key.

Console output is not here — AppConsole lives in rn-forge-commons, because it is a property of the process rather than of the command-line parser, and rn_forge.django may not import this package to reach one. This package drives it: --quiet/--json set its mode.

rn_forge.cli may import rn_forge.commons. It must never import rn_forge.tooling, and rn_forge.commons must never import either — .importlinter proves all three.

Installation

Require the package by version range:

dependencies = ["rn-forge-cli>=0.1,<0.2"]

No extra is needed to run a command line. The testing extra installs assertpy and pytest.

Usage

from rn_forge.cli import CliApp
from rn_forge.commons import console

app = CliApp("golden-app", "Do the thing.")


@app.command()
def greet(name: str) -> None:
    """Greet someone."""
    console.success("Hello, {}", name)
[project.scripts]
golden-app = "golden_app.cli:app"

There is no main(): a generated console script is sys.exit(app()), and CliApp.__call__ returns the mapped exit code.

Or declare the commands in a [cli] table and build the app from it:

app = CliApp.from_config("cli.toml")

Errors

An AppException exits 1 as one line; a bad command line exits 2; Ctrl-C exits 130; any other exception exits 1 with its traceback logged. A command that raises typer.Exit(n) exits n.

Metadata

Release files for rn-forge-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)

Source distribution for rn-forge-cli 0.2.1
File Size Uploaded Provenance Actions
rn_forge_cli-0.2.1.tar.gz 11.2 kB With provenance Details for rn_forge_cli-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rn-forge-cli 0.2.1
File Interpreter ABI Platform Actions
rn_forge_cli-0.2.1-py3-none-any.whl Python 3 none any Details for rn_forge_cli-0.2.1-py3-none-any.whl

Total release size: 24.0 kB

Release files / rn_forge_cli-0.2.1.tar.gz

Download URL rn_forge_cli-0.2.1.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
84b71d1c86a94ef568d5d897726902092fb1f0024a74211aa9aef955b4989eaf
BLAKE2b-256 checksum
How to use checksums
fa675bf2f1c15d1700e25f93c0fd10a57ccbf68352250343e498e50fda5590b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Nov 21, 2026.

Transparency log

Release files / rn_forge_cli-0.2.1-py3-none-any.whl

Download URL rn_forge_cli-0.2.1-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d89055bfd7137e32e4eaf1df7973583862d05e59efe1c11f00d99a52474f55d4
BLAKE2b-256 checksum
How to use checksums
b80a18eb154e00cd010e0a44e4e2f000cc2aea7d4ce8f397499e849f33a8a171
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Nov 21, 2026.

Transparency log

Security for rn-forge-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.

Select from 2 files

Attestation for rn_forge_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 Nov 21, 2026.

Transparency log

A 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.

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