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

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.0
File Size Uploaded Provenance Actions
rn_forge_cli-0.2.0.tar.gz 11.2 kB With provenance Details for rn_forge_cli-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 24.0 kB

Release files / rn_forge_cli-0.2.0.tar.gz

Download URL rn_forge_cli-0.2.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d192925d2bdac4cd90cc5aab6ebfb101efdfe7b4aa5adff700c61adda4b95a07
BLAKE2b-256 checksum
How to use checksums
5220b56dcd50b7e3286f8e17d31f161347bf5bccdf4616b2e89001b39ad7009c
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 18, 2026.

Transparency log

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

Download URL rn_forge_cli-0.2.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34e367041db36cc8e216cc779d347d5328c76b3511a137010ff115807634bc78
BLAKE2b-256 checksum
How to use checksums
b74aa91febb0746bb73f44d47a81897797377449f32e17b1cd29cc6f5225da7f
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 18, 2026.

Transparency log

Security for rn-forge-cli 0.2.0

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.0.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 18, 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