Skip to main content

ControlThings User Interface

The ctui is a library for creating terminal-based user interfaces, and is used in all the ControlThings tools at controlthings.io. It is similar to using Click or Python's standard Cmd library, but with a curses-like interface written in pure Python.

Installation

Ctui is primarily developed on Linux, but should work in both Mac and Windows as well.

As long as you have git and Python 3.8 or later installed, all you should need to do is:

pip3 install ctui

Usage

Import the library, instantiate a Ctui object, and start the ctui application, like:

from ctui import Ctui

myapp = Ctui()
myapp.run()

Of course you can configure you app in a number of different ways by modifying your app's attributes or by adding your own custom commands. Check out the examples folder to walk you through some of these. For more complex examples how to use ctui, check out the various ControlThings Tools, most of which use ctui. You can find these at https://github.com/ControlThingsTools.

Fork and Develop

To set up a development environment for ctui, you will first need to install uv which is used to manage all the project dependencies and publish the pypi packages. I strongly recommend checking out the website and at least reading through the Basic Project Concepts page, but if you want the TLDR, just run the following command to install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Once uv is installed, pull the ctui repo and :

git clone https://github.com/ControlThings-io/ctui.git
cd ctui
uv sync

To try out the project examples files, run:

uv run examples/default.py
uv run examples/filesystem.py

That last command will open a shell in a python virtual environment where you can do live edits to the code. If you are a VS Code user, VS Code will automatically load the repo configs with all the linting rules I use through the repo, and should automatically open the debug tools and terminal inside the virtual environment.

Author

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctui-0.8.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctui-0.8.1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file ctui-0.8.1.tar.gz.

File metadata

  • Download URL: ctui-0.8.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ctui-0.8.1.tar.gz
Algorithm Hash digest
SHA256 13b0028cf8031ea6e521a0ebf6441e261eee9201a883cb8782fa6446f900a62f
MD5 f0dc43299f3e8f7c3257569aa19c9a98
BLAKE2b-256 26f5d0e70e7c78e5e497765409e75df779afd6769d1f274ea66bcde5d3b6d975

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctui-0.8.1.tar.gz:

Publisher: publish.yml on ControlThings-io/ctui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ctui-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: ctui-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ctui-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ead92d7b480d0efac4c6dd39288c53022137a94b970f505bb825c3fe4fc3bba7
MD5 58ed06f35d66423d3f38f6a3566f7881
BLAKE2b-256 a8e15adab45e6fd1b4e14c47ce88a7dd7902e594175fad28bd4a3501ccb9ae46

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctui-0.8.1-py3-none-any.whl:

Publisher: publish.yml on ControlThings-io/ctui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.3

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page