Skip to main content

Cli-Lite

A simple framework to build a cli tool. Base on Alconna

install

pip install cli-lite

example

write as sample:

# example.py
from clilte import BasePlugin, CommandLine, PluginMetadata
from arclet.alconna import Alconna, Arparma, Args, CommandMeta, Option


class MyPlugin(BasePlugin):

    def init(self) -> Alconna | str:
        return Alconna("hello", Args["name", str], meta=CommandMeta("test command"))

    def meta(self) -> PluginMetadata:
        return PluginMetadata("hello", "0.0.1", "my first plugin", ["dev"], ["john"])

    def dispatch(self, result: Arparma) -> bool | None:
        return print(f"Hello! {result.name}")

    @classmethod
    def supply_options(cls) -> list[Option] | None:
        return 


if __name__ == '__main__':
    cli = CommandLine(title="My first CLI", version="example 0.0.1")
    cli.add(MyPlugin)
    cli.main()

and execute the line:

python example.py hello world

you will get the result:

Hello! world

Metadata

Release files for cli-lite 0.11.3

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

Source distribution (sdist)

Source distribution for cli-lite 0.11.3
File Size Uploaded Provenance
cli_lite-0.11.3.tar.gz 7.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cli-lite 0.11.3
File Interpreter ABI Platform
cli_lite-0.11.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.3 kB

Release files / cli_lite-0.11.3.tar.gz

Download URL cli_lite-0.11.3.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7911c6a2603b2289e72defbd3185a0deb81f926f909cc8bd15299593166c0e95
BLAKE2b-256 checksum
How to use checksums
191eff103a40e897e3103151659b53151281ed0d261d4c8b3fbe6a9f6f7a61b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.25.6 CPython/3.11.7 Windows/10

Release files / cli_lite-0.11.3-py3-none-any.whl

Download URL cli_lite-0.11.3-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93d3e68bc532a2c39505295b52f3adc8f9bc950f1683256ff3004234d595231d
BLAKE2b-256 checksum
How to use checksums
4837c9bd8b8fd6d0ad105b0c6060ca4181fda9e9192eaa3fbad421dc73d0b577
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.25.6 CPython/3.11.7 Windows/10

Security for cli-lite 0.11.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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