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
--helpmessages (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
-
firewas the main inspiration forseali.
I love their 'trivial to use' UX: just call the library on your function. Relative tofire, 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.-sshort flags, help messages) for a simpler more opinionated library. -
clickis the 'standard' choice for Python CLIs.
Honourary mention to other similar libraries that live in this niche, for exampletyperorrich-click.
We aim to be (a) smaller/simpler and (b) offer a few nice UX features like fully customisable help messages. -
argparseis 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a75027866c845e49e52d24ce8099087cb209e9f7edb03f5898fe4367905ff7b4
|
|
| MD5 |
cae6517fe32c7b0e57e29e0c9c961d13
|
|
| BLAKE2b-256 |
1bc49b286994d5172ebcc8e4252173e86dd8fb9583ed71cdf7bdc43d53c4a3fd
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3e84d8c42b1ceb5163c63e3c9cf73e0ab7a4a989e0a6fc21ffa551951ec35f7
|
|
| MD5 |
48e43d80c966e99344c127683f1999df
|
|
| BLAKE2b-256 |
b2f794e558b6ed530f3017452ad888b1ee7c32e125047f1c4dcb6e98a40271a9
|