{"id":13658118,"url":"https://github.com/your-tools/python-cli-ui","last_synced_at":"2025-12-12T00:59:49.048Z","repository":{"id":19748792,"uuid":"101402244","full_name":"your-tools/python-cli-ui","owner":"your-tools","description":"Tools for better command line interfaces","archived":false,"fork":false,"pushed_at":"2025-04-24T18:59:57.000Z","size":1235,"stargazers_count":67,"open_issues_count":4,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-28T05:36:50.326Z","etag":null,"topics":["cli","python"],"latest_commit_sha":null,"homepage":"https://your-tools.github.io/python-cli-ui/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/your-tools.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-25T12:36:05.000Z","updated_at":"2025-03-29T20:28:15.000Z","dependencies_parsed_at":"2023-12-22T16:25:32.811Z","dependency_job_id":"c88b87aa-36c4-46b0-9cf1-7003a22e0fcc","html_url":"https://github.com/your-tools/python-cli-ui","commit_stats":null,"previous_names":["tankerhq/python-cli-ui"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/your-tools%2Fpython-cli-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/your-tools%2Fpython-cli-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/your-tools%2Fpython-cli-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/your-tools%2Fpython-cli-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/your-tools","download_url":"https://codeload.github.com/your-tools/python-cli-ui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253534797,"owners_count":21923544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","python"],"created_at":"2024-08-02T05:00:56.510Z","updated_at":"2025-12-12T00:59:49.015Z","avatar_url":"https://github.com/your-tools.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":".. image:: https://img.shields.io/pypi/pyversions/cli-ui.svg\n  :target: https://pypi.org/project/cli-ui\n\n.. image:: https://img.shields.io/pypi/v/cli-ui.svg\n  :target: https://pypi.org/project/cli-ui/\n\n.. image:: https://img.shields.io/github/license/your-tools/python-cli-ui.svg\n  :target: https://github.com/your-tools/python-cli-ui/blob/main/LICENSE\n\n.. image:: https://img.shields.io/badge/deps%20scanning-pyup.io-green\n  :target: https://github.com/your-tools/python-cli-ui/actions\n\npython-cli-ui\n=============\n\nTools for nice user interfaces in the terminal.\n\nNote\n----\n\nThis project was originally hosted on the `TankerHQ\n\u003chttps://github.com/TankerHQ\u003e`_ organization, which was my employer from 2016\nto 2021. They kindly agreed to give back ownership of this project to\nme. Thanks!\n\nDocumentation\n-------------\n\n\nSee `python-cli-ui documentation \u003chttps://your-tools.github.io/python-cli-ui\u003e`_.\n\nDemo\n----\n\n\nWatch the `asciinema recording \u003chttps://asciinema.org/a/112368\u003e`_.\n\n\nUsage\n-----\n\n.. code-block:: console\n\n    $ pip install cli-ui\n\nExample:\n\n.. code-block:: python\n\n    import cli_ui\n\n    # coloring:\n    cli_ui.info(\n      \"This is\",\n      cli_ui.red, \"red\", cli_ui.reset,\n      \"and this is\",\n      cli_ui.bold, \"bold\"\n    )\n\n    # enumerating:\n    list_of_things = [\"foo\", \"bar\", \"baz\"]\n    for i, thing in enumerate(list_of_things):\n        cli_ui.info_count(i, len(list_of_things), thing)\n\n    # progress indication:\n    cli_ui.info_progress(\"Done\",  5, 20)\n    cli_ui.info_progress(\"Done\", 10, 20)\n    cli_ui.info_progress(\"Done\", 20, 20)\n\n    # reading user input:\n    with_sugar = cli_ui.ask_yes_no(\"With sugar?\", default=False)\n\n    fruits = [\"apple\", \"orange\", \"banana\"]\n    selected_fruit = cli_ui.ask_choice(\"Choose a fruit\", choices=fruits)\n\n    #  ... and more!\n\nContributing\n------------\n\nWe use `optimistic merging \u003chttps://dmerej.info/blog/post/optimistic-merging/\u003e`_ so you don't have to worry too much about formatting the code, pleasing the linters or making sure all the test pass.\n\nThat being said, if you want, you can install `just \u003chttps://just.systems/man/en/\u003e`_ and use it to check your changes automatically. Just run ``just`` to see available tasks.\n\nMaking a new release\n--------------------\n\n* Create a token on pypi : see `pypi help  \u003chttps://pypi.org/help/#apitoken\u003e`_ for details.\n\n* Install `tbump \u003chttps://pypi.org/project/tbump\u003e`_ and use it to bump `cli-ui` to the new version.\n\nUploading documentation\n-----------------------\n\nRun:\n\n.. code-block:: sh\n\n    just deploy-doc\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyour-tools%2Fpython-cli-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyour-tools%2Fpython-cli-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyour-tools%2Fpython-cli-ui/lists"}