Build Nice User Interfaces In The Terminal
Project Links
Meta
Author: Dimitri Merejkowsky
Requires Python: >=3.9,<4.0
Classifiers
License
- OSI Approved :: BSD License
Programming Language
- Python :: 3
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
python-cli-ui
Tools for nice user interfaces in the terminal.
Note
This project was originally hosted on the TankerHQ organization, which was my employer from 2016 to 2021. They kindly agreed to give back ownership of this project to me. Thanks!
Documentation
Demo
Watch the asciinema recording.
Usage
$ pip install cli-ui
Example:
import cli_ui
# coloring:
cli_ui.info(
"This is",
cli_ui.red, "red", cli_ui.reset,
"and this is",
cli_ui.bold, "bold"
)
# enumerating:
list_of_things = ["foo", "bar", "baz"]
for i, thing in enumerate(list_of_things):
cli_ui.info_count(i, len(list_of_things), thing)
# progress indication:
cli_ui.info_progress("Done", 5, 20)
cli_ui.info_progress("Done", 10, 20)
cli_ui.info_progress("Done", 20, 20)
# reading user input:
with_sugar = cli_ui.ask_yes_no("With sugar?", default=False)
fruits = ["apple", "orange", "banana"]
selected_fruit = cli_ui.ask_choice("Choose a fruit", choices=fruits)
# ... and more!
Contributing
We use optimistic merging so you don’t have to worry too much about formatting the code, pleasing the linters or making sure all the test pass.
That being said, if you want, you can install just and use it to check your changes automatically. Just run just to see available tasks.
Making a new release
Uploading documentation
Run:
just deploy-doc
0.19.0
Mar 29, 2025
0.18.0
Dec 11, 2024
0.17.2
Aug 28, 2022
0.17.1
Aug 28, 2022
0.17.0
May 15, 2022
0.16.1
Mar 12, 2022
0.16.0
Dec 22, 2021
0.15.2
Oct 05, 2021
0.15.1
Aug 14, 2021
0.15.0
Jul 31, 2021
0.14.1
Jun 06, 2021
0.14.0
Apr 20, 2021
0.13.0
Apr 19, 2021
0.12.0
Feb 11, 2021
0.11.0
Jul 23, 2020
0.10.3
Apr 29, 2020
0.10.2
Feb 10, 2020
0.10.1
Feb 04, 2020
0.10.0
Dec 02, 2019
0.9.1
Dec 18, 2018
0.9.0
Dec 18, 2018
0.8.0
Dec 14, 2018
0.8.0b1
Dec 09, 2018
0.7.4
Dec 06, 2018
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
colorama
(<0.5.0,>=0.4.1)
tabulate
(<0.10.0,>=0.9.0)
unidecode
(<2.0.0,>=1.3.6)