Skip to main content

arg-kiss — Keep It Stupidly Simple CLI builder on top of argparse

Python PyPI License Platform Ruff

Write type-annotated Python functions, get a CLI with argparse's native --help — no magic, no bloat.

🚀 Quick Start

pip install arg-kiss                    # Python 3.10+
from arg_kiss import Argkiss

cli = Argkiss(name="todo", description="Task manager", color=True)


@cli.command()
def add(task: str, priority: int = 1, done: bool = False):
    """Add a task."""
    status = "✓" if done else "○"
    print(f"[{status}] {task} (priority: {priority})")


@cli.command()
def list_all():
    """Show all tasks."""
    print("Nothing yet!")


cli()
$ python todo.py add "Buy milk" --priority 2
[] Buy milk (priority: 2)

$ python todo.py list-all
Nothing yet!

$ python todo.py --help
usage: todo [-h] {add,list-all} ...

Task manager

positional arguments:
  {add,list-all}
    add           Add a task.
    list-all      Show all tasks.

options:
  -h, --help      show this help message and exit

📋 Commands & Features

@cli.command() — Define commands from functions

@cli.command()
def fetch(url: str, retries: int = 3):
    """Download from URL with retries"""
    print(f"Fetched {url} (retries: {retries})")

@cli.argument() — Customize argument flags

Use @cli.argument() above @cli.command() to customize flags, help text, and behavior for individual parameters.

@cli.argument("-u", "--user", help="Username")
@cli.argument("-p", "--port", type=int, default=8080, help="Port number")
@cli.argument("--ssl", action="store_true", help="Enable SSL")
@cli.command()
def connect(user: str, port: int = 8080, ssl: bool = False):
    """Connect to server"""
    print(f"Connecting as {user} on port {port} (SSL: {ssl})")

Type → CLI mapping

Function signature CLI argument
name: str Positional name
count: int = 1 --count 1
verbose: bool = False --verbose / --no-verbose
mode: str | None = None --mode MODE

Boolean flags — Two modes

By default, boolean parameters get --flag/--no-flag pairs:

cli = Argkiss(name="app", boolean_optional=True)  # default


@cli.command()
def run(verbose: bool = False):
    """Run with --verbose or --no-verbose"""

To disable and use simple --flag with store_true/store_false:

cli = Argkiss(name="app", boolean_optional=False)


@cli.command()
def run(verbose: bool = False):
    """Run with --verbose to enable"""

Command groups

remote = cli.group("remote", "Manage remotes")


@remote.command()
def add(name: str, url: str):
    print(f"Added remote {name} -> {url}")


@remote.command()
def remove(name: str):
    print(f"Removed remote {name}")

Usage:

$ python app.py remote add origin https://github.com/user/repo
Added remote origin -> https://github.com/user/repo

$ python app.py remote remove origin
Removed remote origin

Global arguments (apply to all commands)

cli.add_global_argument("--verbose", "-v", action="store_true", help="Verbose output")
cli.add_global_argument("--config", "-c", type=str, help="Config file path")


@cli.command()
def deploy(environment: str):
    """Deploy to environment."""
    # Global arguments available in parsed namespace
    pass

Async support

@cli.command()
async def fetch(url: str, retries: int = 3):
    async with httpx.AsyncClient() as client:
        r = await client.get(url)
        print(f"Status: {r.status_code}")

🎨 CLI Configuration

cli = Argkiss(
    name="myapp",  # Program name (default: None)
    description="Does amazing things",  # Description in help (default: None)
    version="2.0.0",  # Adds --version flag (default: None)
    color=True,  # ANSI colours (default: True)
    boolean_optional=True,  # --flag/--no-flag for bools (default: True)
)
Option Type Default Description
name str | None None Program name in help
description str | None None Description in help
version str | None None Adds --version flag
color bool True Enable/disable coloured output
boolean_optional bool True Use --flag/--no-flag for bool params

Disable colours via environment

NO_COLOR=1 python myapp.py --help

📄 License & Acknowledgments

LGPLv3 License — Built with Python standard library:

Module Purpose
argparse CLI parsing engine
asyncio Async command execution
inspect Signature introspection

Author: Fkernel653 Project: GitHubPyPI

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arg_kiss-0.3.6.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arg_kiss-0.3.6.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file arg_kiss-0.3.6.1.tar.gz.

File metadata

  • Download URL: arg_kiss-0.3.6.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for arg_kiss-0.3.6.1.tar.gz
Algorithm Hash digest
SHA256 226f4de2afed2d75bb5bbc0611a0f3e821c469b7454dce57c8b1dc67b927e62e
MD5 b16e1f9f3ea0620a1f3ced1c12dea59c
BLAKE2b-256 275b636706e66c5978be16d063bafb5bb1525931cb7727213d152565472d0920

See more details on using hashes here.

File details

Details for the file arg_kiss-0.3.6.1-py3-none-any.whl.

File metadata

  • Download URL: arg_kiss-0.3.6.1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","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}

File hashes

Hashes for arg_kiss-0.3.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c99e0b0d94c5830d1c16ef57b6e1ede7a002f71ab9d7b53007c8432c1c2b0368
MD5 4c3cf2b390778abee527d35ce22b5d42
BLAKE2b-256 a2685c7f6fbe54d0306999b1200ba239164a08996ea893b7588dca71b75cda9f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.6.2

2 files

This release

0.3.6.1 This release

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.8

2 files

0.1.6

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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