DEV Community

Cover image for Textual has devtools
Waylon Walker
Waylon Walker

Posted on • Originally published at waylonwalker.com

3 1

Textual has devtools

Textual has devtools in the upcoming css branch, and its pretty awesome!

It's still early

Textual is still very early and not really ready for prime time, but it's quite amazing how easy some things such as creating keybindings is. The docs are coming, but missing right now so if you want to use textual be ready for reading source code and examples.

On to the devtools

As @willmcgugan shows in this tweet it's pretty easy to setup, it requires having two terminals open, or using tmux, and currently you have to use the css branch.

Why does textual need its own devtools

Textual is a tui application framework. Unlike when you are building cli applications, when the tui takes over the terminal in full screen there is no where to print statement debug, and breakpoints don't work.

getting the css branch

In the future it will likely be in main and not need this, but for now you need to get the css branch to get devtools.

git clone https://github.com/Textualize/textual git fetch --alll git checkout css
Enter fullscreen mode Exit fullscreen mode

install in a virtual environment

Now you can create a virtual environment, feel free to use whatever virtual environment tool you want, venv is built in to most python distributions though, and should just be there.

python3 -m venv .venv --prompt textual source .venv/bin/activate pip install .
Enter fullscreen mode Exit fullscreen mode

Now that we have textual installed

Once textual is installed you can open up the devtools by running textual console.

textual console
Enter fullscreen mode Exit fullscreen mode

textual-console

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay