Skip to main content

SaiunCLI ✨

SaiunCLI is a Python framework for creating visually appealing, user-friendly, and highly customizable Command-Line Interface (CLI) tools. It leverages the power of rich for styling and formatting, making it easy to build modern CLI applications that are both functional and beautiful.

Inspired by rich-cli.

preview image

Project Status: 🚧 Under Construction 🚧

SaiunCLI is actively being developed. Some features may be incomplete or subject to change. Stay tuned for updates and improvements!

Features

  • Customizable Themes: Easily style your CLI with themes and override defaults.
  • Command and Subcommand Support: Define commands and nested subcommands with specific options and arguments.
  • Inherited Options and Arguments: Configure options to be inherited across subcommands.
  • Global Options: Define options that apply globally across all commands and subcommands.
  • Modern Styling: Leverage rich to make CLI output visually appealing, including tables, progress bars, and spinners.
  • User-Friendly Argument Parsing: Parse both positional arguments and flags in a structured and intuitive manner.
  • Dynamic Command Registration: Add commands programmatically during runtime.
  • Configurable Help and Usage: Auto-generate help messages for commands with customization options.
  • Intuitive Developer Experience: Focus on functionality without worrying about low-level details.

Comparison with Other Tools

Feature SaiunCLI Click Argparse
Custom Styling ✅ ❌ ❌
Nested Commands ✅ ✅ ❌
Dynamic Commands ✅ ✅ ❌
Option Inheritance ✅ ❌ ❌
Global Options ✅ ❌ ❌
Easy Theming ✅ ❌ ❌

Installation

You can install saiuncli with pip.

pip install saiuncli

Usage

from saiuncli.cli import CLI
from saiuncli.command import Command
from saiuncli.option import Option
from saiuncli.theme import Theme

# Custom theme and console for CLI outputs
theme = Theme()
console = Console(theme=theme)


def hello_handler(name: str, count: int):
    for i in range(count):
        console.print(f"Hello, {name}!")
    console.success("Succcessfully executed handler!")


def count_handler(a: int, b: int):
    if a is None or b is None:
        raise ValueError("Both 'a' and 'b' must be provided.")
    console.print(f"{a} + {b} = {a + b}")
    console.success("Succcessfully executed handler!")


def base_handler(**args):
    console.print("Base command executed.")
    if args:
        console.print(f"{args}")

    console.success("Success Message")
    console.error("Error Message")
    console.warning("Warning Message")
    console.info("Info Message")


if __name__ == "__main__":

    # Create CLI
    mycli = CLI(
        title="My Super Cool CLI Tool",
        description="A simple tool to demonstrate saiuncli.",
        version="1.0.0",
        console=console,
        handler=base_handler, # Command Handler
        help_flags=[],
        version_flags=[],
        options=[
            Option(
                flags=["-v", "--verbose"],
                description="Enable verbose output.",
                action="store_true",
            ),
            Option(
                flags=["-q", "--quiet"],
                description="Enable quiet output.",
                action="store_true",
            ),
            Option(
                flags=["-d", "--debug"],
                description="Enable debug output.",
                action="store_true",
            ),
        ],
    )

    # Define Subcommands
    hello_command = Command(
        name="hello",
        handler=hello_handler,
        description="Prints 'Hello, world!' to the console.",
        options=[
            Option(
                flags=["-n", "--name"],
                description="The name to print.",
                type=str,
                required=True,
            ),
            Option(
                flags=["-c", "--count"],
                description="The number of times to print the name.",
                type=int,
                default=1,
            ),
        ],
    )

    count_command = Command(
        name="count",
        handler=count_handler,
        description="Adds two numbers together.",
        options=[
            Option(
                flags=["-a"],
                description="The first number.",
                type=int,
                required=True,
            ),
            Option(
                flags=["-b"],
                description="The second number.",
                type=int,
                required=True,
            ),
        ],
    )


    # Append Subcommands
    mycli.add_subcommands([hello_command, count_command])

    # Run your CLI Tool!
    mycli.run()

Metadata

Release files for SaiunCLI 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SaiunCLI 0.1.12
File Size Uploaded Provenance
saiuncli-0.1.12.tar.gz 13.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 29.8 kB

Release files / saiuncli-0.1.12.tar.gz

Download URL saiuncli-0.1.12.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ae0a8bb4f58dc1c75303e9057b2cef747da75615606ff7af055c83983f9328e8
BLAKE2b-256 checksum
How to use checksums
abbe6b95d0d16d76ff81a9801b22742a4edf2dac54527702ee25cd320695f7ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 22, 2026.

Transparency log

Release files / saiuncli-0.1.12-py3-none-any.whl

Download URL saiuncli-0.1.12-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fcbef28939ccce787a39bc742f38c97307dee99fdf1910fd97e334de8c3545e
BLAKE2b-256 checksum
How to use checksums
2037c13b896829b59681d775e0565119303069a7a32149f6109749529b5340f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 22, 2026.

Transparency log

Security for SaiunCLI 0.1.12

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for saiuncli-0.1.12.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 Oct 22, 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.

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files Full provenance

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