Skip to main content

Write type-annotated Python functions, get a CLI with argparse's native `--help` — no magic, no bloat. Flat commands only, synchronous execution

Project description

argss — Stupidly Simple CLI builder (sync-only, no groups)

Python PyPI License Platform Ruff

argss is a lightweight fork of arg-kiss — stripped down to the essentials.

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

🎯 Why argss?

Feature arg-kiss argss
@cli.command()
@cli.argument()
Type inference
Boolean flags
Global arguments
Command groups
Async support
color parameter (Python 3.14+ coloured help)
Dependencies none none
Lines of code ~150 ~110

Note: arg-kiss provides a color parameter in CLI() that enables/disables coloured --help output on Python 3.14+. argss omits this parameter for simplicity.

Use argss when you want:

  • Minimal code footprint
  • No asyncio overhead
  • Flat command structure (no sub-subcommands)
  • Faster import time (~30% faster than arg-kiss)

🚀 Quick Start

pip install argss
from argss import CLI

cli = CLI(name="todo", description="Task manager")

@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 without needing the Argument class.

@cli.argument("-v", "--verbose", help="Enable verbose output")
@cli.argument("-r", "--retries", type=int, help="Number of retries")
@cli.command()
def fetch(url: str, verbose: bool = False, retries: int = 3):
    """Download from URL"""
    print(f"Fetched {url} (retries: {retries})")

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

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

🎨 CLI Configuration

cli = CLI(
    name="myapp",                       # Program name (default: None)
    description="Does amazing things",  # Description in help (default: None)
    version="2.0.0",                    # Adds --version flag (default: None)
)
Option Description
name Program name in help (default: None)
description Description in help (default: None)
version Adds --version flag (default: None)

📄 License & Acknowledgments

MIT License — Built with Python standard library:

Module Purpose
argparse CLI parsing engine
inspect Signature introspection

Forked from: arg-kiss by Fkernel653

argss author: Fkernel653

Project: GitHubPyPI

Project details


Download files

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

Source Distribution

argss-0.1.5.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

argss-0.1.5-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file argss-0.1.5.tar.gz.

File metadata

  • Download URL: argss-0.1.5.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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 argss-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1947201f206e497297178a24dd602f10940b813530275576a4a7290e0e61e794
MD5 29e302d7e98ebd1cd11122cc515563dc
BLAKE2b-256 bfdd717f1fa384b801ec8f43d21a6801047bb5be3c08a8910bf4a63543316cbb

See more details on using hashes here.

File details

Details for the file argss-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: argss-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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 argss-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5476085412fd1f8f46ac2df54701fcfe5eba47f808faeceaeb9c13563f6ade93
MD5 7b8ec4515be38477b2fa20e99b931047
BLAKE2b-256 40a36ce2dcf2bf74b3c9575c3f3191ebea4fd0adc35a8fcce192bdbd9c303de9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page