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.4.0.tar.gz (20.6 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.4.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for seali-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0f55bf97b63fa510bfe9cb39e7a497dc75e1fc4cac8f1f05c6d66cab8f97df17
MD5 cbf6011a7cdd81d12b3a94ec2d03aa6c
BLAKE2b-256 e2a70a5112fc1787090aee188eaa7dd0353801bd8ae98897f6f09e3d56b633a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seali-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 27.0 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85b4fbb6594cbff9c67844eb78b823fcb5790d016e834a67f3d5d73af9ed1d95
MD5 ae9bf51c3fa98aa7ba7b915a36083e1a
BLAKE2b-256 ff2a65074a06b8ac838608e68dcdb60e5c55f7f9de75a34716fb5d8d2fefc84d

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