Skip to main content

A tiny library for building simple CLIs.

Project description

🌊seali

A does-one-thing-well library for building CLIs.
Designed to be trivially easy to use.

  • Zero dependencies;
  • Subcommands;
  • Fish completions;
  • Elegant --help messages (with line-breaks, tab-stops, and ANSI escape codes);
  • Tiny day-to-day API: seali.{command, group, Doc, Style}.

This exists because I wanted ✨pretty help text✨ beyond what any other CLI library supports.

Installation

pip install seali

Example

import seali

@seali.command
def my_program(pos: str, /, *, someflag: bool = False):
    ...

if __name__ == "__main__":
    my_program()
python this_file.py foobar --someflag

Documentation

Available at https://docs.kidger.site/seali.

Alternatives

  • fire was the main inspiration for seali.
    I love their 'trivial to use' UX: just call the library on your function. Relative to fire, we aim to minimise their massive surface area (they also allow you to decorate classes, dictionaries, ..., have an interactive mode, a trace mode, ...), and fix some UX issues (e.g. -s short flags, help messages) for a simpler more opinionated library.

  • click is the 'standard' choice for Python CLIs.
    Honourary mention to other similar libraries that live in this niche, for example typer or rich-click.
    We aim to be (a) smaller/simpler and (b) offer a few nice UX features like fully customisable help messages.

  • argparse is in the Python stdlib.
    This is usually noted for being highly verbose. We aim to be much easier to use.

As a particular focus, we aim to offer best-in-class help messages, with support for reflowing, tabstops, and respecting ANSI escape codes.

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

seali-0.3.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

seali-0.3.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file seali-0.3.0.tar.gz.

File metadata

  • Download URL: seali-0.3.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for seali-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a75027866c845e49e52d24ce8099087cb209e9f7edb03f5898fe4367905ff7b4
MD5 cae6517fe32c7b0e57e29e0c9c961d13
BLAKE2b-256 1bc49b286994d5172ebcc8e4252173e86dd8fb9583ed71cdf7bdc43d53c4a3fd

See more details on using hashes here.

File details

Details for the file seali-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: seali-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for seali-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3e84d8c42b1ceb5163c63e3c9cf73e0ab7a4a989e0a6fc21ffa551951ec35f7
MD5 48e43d80c966e99344c127683f1999df
BLAKE2b-256 b2f794e558b6ed530f3017452ad888b1ee7c32e125047f1c4dcb6e98a40271a9

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