Have pretty cli output without hassle https://pypi.org/project/cliasi
  • Python 97%
  • Makefile 3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
frader fe07edd24d Update gh workflows
* test no longer runs on tags
* remove old docs.yml workflow (moved to readthedocs.io)
* remove default comments
2026-01-30 16:51:20 +01:00
.github/workflows Update gh workflows 2026-01-30 16:51:20 +01:00
docs Add documentation for infer_settings() 2026-01-17 00:43:32 +01:00
examples Add documentation for new behaviour 2026-01-15 23:03:32 +01:00
src/cliasi Add infer_settings method 2026-01-17 00:37:51 +01:00
tests Fix animated messages going over multiple lines 2026-01-17 00:27:38 +01:00
.gitignore Add __about__.py to .gitignore 2025-12-07 19:48:43 +01:00
.pre-commit-config.yaml Update .pre-commit-config.yaml to add --force-exclude to ruff 2026-01-08 14:20:51 +01:00
.readthedocs.yaml Update .readthedocs.yaml to use uv 2026-01-08 11:21:53 +01:00
LICENSE Initial commit 2025-11-21 17:25:12 +01:00
Makefile Update Makefile documentation and add --fix 2026-01-16 00:20:23 +01:00
pyproject.toml Add py.typed file 2026-01-10 15:59:28 +01:00
README.md Add example for calculation modes 2026-01-15 17:25:36 +01:00
uv.lock Add uv.lock 2026-01-08 11:22:13 +01:00

cliasi (cli easy)

GitHub issues PyPI

Output pretty command line text without hassle.
This is mostly a collection of pretty print commands

View the documentation here.

Installation

pip install cliasi
uv add cliasi

Basic Usage

from cliasi import cli

cli.success("It works!")
# > ✔ [CLI] | It works!

cli.messages_stay_in_one_line = True
# The next few lines will get overwritten
cli.info("blah")
cli.warn("doing something dangerous")
# > ! [CLI] | doing something dangerous

Read more about different message types and see visualizations in the documentation here.

Animations

One of the main features of cliasi is the ability to display animations while waiting for something to finish.

# File: examples/readme_demo.py
from cliasi import cli

# This will wait for three seconds and display an animation
task = cli.animate_message_non_blocking(
    "Saving files...",
    message_right="[CTRL-C to abort]",
    messages_stay_in_one_line=True
)
do_stuff()
task.update("Files saved, waiting for process to quit", message_right="70%")
tell_process_to_quit()
task.stop()
cli.success("Process quit", message_right="100%")

readme_demo

Catching exceptions

cliasi also catches exceptions and displays them in a pretty way. This then looks something like this:

# exception_message.py
import cliasi

# Importing cliasi automatically installs the logging handler
raise ValueError("An example error")

Example CLI output (uncolored, see colored version in docs):

X [CLI] | Uncaught exception:
X [CLI] | Traceback (most recent call last):
        |   File "examples/exception_message.py", line 4, in <module>
        |     raise ValueError("An example error")
        | ValueError: An example error

Other features

cliasi has many more features like:

  • Logging integration
  • Custom message alignments
  • Customizable progressbars (with PBCalculationMode)
  • And more!

Contributing:

This is just a fun project of mine mainly to try out python packaging. If you would like to contribute or have a feature-request, please open an issue or pull request.