Mastodon terminal user interface
Project description
tooi
tooi is a text-based user interface for Mastodon, Pleroma and friends. The name is a portmantou of toot and TUI.
- Source code: https://codeberg.org/ihabunek/tooi
- Python package: https://pypi.org/project/toot-tooi/ *
- IRC chat: #toot channel on libera.chat
It uses the Textual framework.
* Could not get tooi as Python project name, if someone knows python people
ask them kindly to approve
this request.
Project status
This project is in its early days and things will change without notice.
While we aim to keep the project usable at all times, expect that things may break before we hit version 1.0.
Installation
Currently tooi requires toot for logging into instances.
The recommended method of installation is using uv which installs python projects into their own virtual environments.
-
Follow the uv installation guide to set it up.
-
Install toot and tooi by running:
uv tool install toot uv tool install toot-tooi
Alternatively, if you know what you're doing, install both projects from pypi using your favourite method.
Usage
Before first use, run toot login to log into your mastodon instance.
Tooi will authenticate as the currently active toot user. You can check who
you're logged in as by running toot whoami, and switch accounts using toot activate.
Launch the program by running tooi.
Run tooi --help to see the available commandline options.
Key bindings
Generic bindings:
- Arrow keys or
h/j/k/l- move up/down/left/right TabandShift+Tab- move between focusable componentsSpaceorEnter- activate buttons and menu items
Managing tabs:
.- refresh timeline/- open search tab1-9- switch between open tabsCtrl+d, Ctrl+w- close current tabg- open new tab ("goto")
Status bindings:
a- show accountb- boost statusd- delete statuse- edit statusf- favourite statusm- show mediar- reply to statuss- reveal sensitivet- show threadu- show toot source
Setting up a dev environment
Usage of uv for development is recommended.
Check out tooi and install the dependencies:
git clone https://codeberg.org/ihabunek/tooi.git
cd tooi
uv sync
Run the app by invoking:
uv run tooi
Using the console
To use the Textual console, run it in a separate terminal window:
uv run textual console
Then run tooi in dev mode so it connects to the console:
uv run textual run --dev tooi.cli:main
Code style and linting
Rule of thumb: look at existing code, try to keep it similar in style.
Please run make lint to check formatting before sending a patch. This runs
flake8 which checks for some basic code style rules. It shouldn't be too
aggressive, and if you're bothered by a rule, let me know.
Lines can be upto 100 characters wide, wrap them if they go over that.
Wrapping style
Wrapping style is not enforced by the linter, but this is the preferred style most of the time:
# NO: Do not wrap after opening paren
very_long_package_name.even_longer_long_function_call(first_argument,
second_argument,
third_argument)
# YES: Align arguments on next tab
very_long_package_name.even_longer_long_function_call(
first_argument,
second_argument,
third_argument
)
Type checking
You're encouraged to specify types in your code. While they can be a bit of a pain in Python, I have found them to be useful in locating errors and eliminating potential bugs.
This project is configured to use pyright for type checking, and I recommend that you install the pyright language server if it's available for your editor. Currently it returns errors in some places, some of which are caused by the way textual is implemented. So it's not required to have zero errors before submitting patches, but it will indicate problems in new code.
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 toot_tooi-0.15.1.tar.gz.
File metadata
- Download URL: toot_tooi-0.15.1.tar.gz
- Upload date:
- Size: 98.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0e0aa8f2ef82bfb6784dfc9613c8e669493458948f98bb7aa5002981cafb7ed
|
|
| MD5 |
368e4912ee83add69da37b0105ce3b5e
|
|
| BLAKE2b-256 |
25a54b27c2e40a033d022c9a3c51ff29b43e0dd69bacd9fe92d7747d475e0a29
|
File details
Details for the file toot_tooi-0.15.1-py3-none-any.whl.
File metadata
- Download URL: toot_tooi-0.15.1-py3-none-any.whl
- Upload date:
- Size: 83.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea8b65fffb8a01827c6fe6134c1e9b07a211eb71110411f4f748e900435c7447
|
|
| MD5 |
83feca9ae1252c87f910fd280b398c7d
|
|
| BLAKE2b-256 |
d7181a48df77ed97821d48f894f9e44d14e4f8bd39980ec412f6fc0c6e2e3faa
|