Have a nice looking, simple cli in seconds
Project description
cliasi (cli easy)
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%")
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.
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 cliasi-0.4.0.tar.gz.
File metadata
- Download URL: cliasi-0.4.0.tar.gz
- Upload date:
- Size: 237.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f43d33ae91aaa1de7ff6225168efe25659fa60b696ba133a5309753f4ba8897a
|
|
| MD5 |
d5cda5b06d9f3bca0c960068a205e348
|
|
| BLAKE2b-256 |
b63db51251cbdcc1a32007455a93ed98ecff7acb50fa2fc4c0ce319c9550153b
|
Provenance
The following attestation bundles were made for cliasi-0.4.0.tar.gz:
Publisher:
publish.yml on IgnyteX-Labs/cliasi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cliasi-0.4.0.tar.gz -
Subject digest:
f43d33ae91aaa1de7ff6225168efe25659fa60b696ba133a5309753f4ba8897a - Sigstore transparency entry: 829192160
- Sigstore integration time:
-
Permalink:
IgnyteX-Labs/cliasi@d66d6728657f9fd452dbfaff87811aac0045b33d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/IgnyteX-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d66d6728657f9fd452dbfaff87811aac0045b33d -
Trigger Event:
release
-
Statement type:
File details
Details for the file cliasi-0.4.0-py3-none-any.whl.
File metadata
- Download URL: cliasi-0.4.0-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15a32dfb14a9b0e0764a284214dab78b21cf342c51b4fc898b355af1d85a4585
|
|
| MD5 |
b46c1462f87add4ffb5890e3d4a6c11c
|
|
| BLAKE2b-256 |
71bd4f35a9deaa7758ebb552d17c83501d084e6b96e22433f0ad71ce9281f868
|
Provenance
The following attestation bundles were made for cliasi-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on IgnyteX-Labs/cliasi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cliasi-0.4.0-py3-none-any.whl -
Subject digest:
15a32dfb14a9b0e0764a284214dab78b21cf342c51b4fc898b355af1d85a4585 - Sigstore transparency entry: 829192162
- Sigstore integration time:
-
Permalink:
IgnyteX-Labs/cliasi@d66d6728657f9fd452dbfaff87811aac0045b33d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/IgnyteX-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d66d6728657f9fd452dbfaff87811aac0045b33d -
Trigger Event:
release
-
Statement type: