Skip to main content

cfui

Install: pip install cfuicli (import name: cfui).

Stdlib-only terminal UI and tiny argparse framework in the style of Cloudflare's cf CLI.

from cfui import App, Arg, ui

app = App("tool", repo="https://github.com/me/tool", pypi="tool", description="Does things.")


@app.command("greet", "Say hi", args=[Arg("--name", required=True, prompt="Your name")])
def greet(a):
    ui.success(f"hi {a.name}")


def main():
    app.main()

Gives you help, version (and -v), update [--check], -q/--quiet, boxed errors, JSON output, and prompts for missing required options on a TTY (a clear error when piped or in CI).

Shared pieces (cfui.common)

YES, JSON, FORCE, DRY_RUN, JOBS, TIMEOUT, BACKGROUND (ready-made Args), confirm(msg, yes), parse_value, run_parallel(items, worker, jobs), and add_config(app, items=, get=, set=, reset=, path=, validate=) which registers config show|get|set|reset|path|validate.

Releasing

Conventional Commits on main -> CI -> Release workflow (python-semantic-release) bumps the version, tags and publishes to PyPI with a Trusted Publisher (environment pypi, workflow release.yml). See docs/workflow.md.

Metadata

Release files for cfuicli 1.0.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 cfuicli 1.0.0
File Size Uploaded
cfuicli-1.0.0.tar.gz 82.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cfuicli 1.0.0
File Interpreter ABI Platform
cfuicli-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 94.1 kB

Release files / cfuicli-1.0.0.tar.gz

Download URL cfuicli-1.0.0.tar.gz
Size 82.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5ac86aa37f81a28a50480f8da5948226d8438e3c19cfcf9d30bf9ca9f0251580
BLAKE2b-256 checksum
How to use checksums
f96541c351ce04555febc3ce8be6e8ad22f4b295f84fac75d14b992d2f6557b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cfuicli-1.0.0-py3-none-any.whl

Download URL cfuicli-1.0.0-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71bedf0b8f56cdc881cbfdd711086d0b38d8ded055dec73e2d59cadc82188748
BLAKE2b-256 checksum
How to use checksums
4cc02b4d39ec9ac642c58bf4a49ac999e0c0bd76bdb18866ca1e2ea95b6c78d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.1.0

2 release files

This release

1.0.0 This release

2 release 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