Start Here 🡺 User Guide | Features | Installation | Development | Limitations
This is a new UI for bugit implemented with the textual library.
- Complete mouse support provided by textual. Now you can click, drag and scroll like a real app!
- "Real" text editor. The bug description box is now a full-fledged editor that allows familiar keyboard shortcuts like Ctrl+C Ctrl+V Ctrl+Z Ctrl+Shift+Z, etc. To see all the bindings, click the
^p palettebutton or use Control+P to bring up the command palette and click Help - Fancy colors! Textual comes with a lot of themes and provides us with a nice framework to theme it ourselves.
- Works through SSH. If you are dealing with ubuntu server/core, textual will still give you a pretty UI as long as the terminal you are viewing it from is a graphical terminal like gnome-terminal
To see more about textual itself, check out their docs
Use the edge channel for the latest commit on the main branch
sudo snap install bugit --edge --devmodeOr use the beta channel for point version releases
sudo snap install bugit --beta --devmodeThe stable channel is reserved for the original bugit at the moment.
Run the app with sudo bugit.bugit-v2 jira, sudo bugit.bugit-v2 lp, or sudo bugit.bugit-v2 local
- Clone the repo
- Install snapcraft
sudo snap install snapcraft --edge --classic snapcraft clean && snapcraft pack- Once snapcraft produces a
.snapfile,sudo snap install ./bugit-v2_0.1_amd64.snap --dangerous --devmode(replace the filename with the real one) to install it. - Run the app with
sudo bugit.bugit-v2 jiraorsudo bugit.bugit-v2 lp
To uninstall, sudo snap remove bugit
The Jira server URL can be changed after install:
sudo snap set bugit jira-server=<your_url>Run sudo snap unset bugit jira-server to revert to the default
(https://warthogs.atlassian.net).
This varies across different terminal emulators so I'll use gnome-terminal as the example here since it comes with ubuntu by default (and by extension ptyxis that comes with 25.10).
Copying from INSIDE the app to another place INSIDE the app: Use Ctrl+C like you would normally.
Copying from INSIDE the app to OUTSIDE the app: Hold shift to override textual's selection and drag over the text you want to copy, then use Ctrl+Shift+C to write to the system clipboard. This is the same as copying regular terminal output, which is rather ugly for this app since you would be selecting the UI elements too. The main description editor comes with a "Dump to text file" button to specifically handle this; it will dump the description into a plain text file for easy processing outside the app.
Copying from OUTSIDE the app to INSIDE the app: Use Ctrl+Shift+V to paste into the app. This is the same as pasting to any other terminal program.
For more details, check out textual's explanation
The default font in gnome-terminal can cause some UI elements to clip a little bit. To fix this without downloading additional fonts, use one of these fonts:
- Monospace
- Liberation Mono
- DejaVu Sans Mono
Dependencies are managed by uv. You can install uv by pipx install uv or use the official installer from uv's website.
git clone git@github.com:canonical/bugit-v2.git
cd bugit-v2
uv sync --python 3.12 # will download another python if sys python != 3.12
source .venv/bin/activate
# bugit needs password-less sudo
echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/bugit-v2
python3 src/bugit_v2/app.pyOptionally install pre commit hooks:
# inside the virtual env and project root
pre-commit installThis will run some basic formatter and linter checks before allowing a commit. If you don't want this git behavior, pre-commit run --all-files will just run the checks.
If you are using VSCode's git panel, it might show something like this when the hooks didn't pass:
This basically says the automatic style fixes were not included. Do another git add . and you should be able to commit. If it still doesn't work, then some of the checks actually failed. Do pre-commit run --all-files manually and check the output.
All the files should pass basedpyright's checks. Run the basedpyright command at the project root with the virtual environment enabled. In vscode, there's the basedpyright extension that lets you catch these errors in the editor.
- Warnings are OK for now since some of the rules are very strict, but try to fix as many of them as possible
- Errors must be fixed because they indicate either something is guaranteed to fail at runtime or the type annotations are too incomplete for the type checker to do any meaningful analysis. To just check for errors, run
basedpyright --level error.
Since the app runs inside the terminal, it covers up all the normal stdout and stderr outputs. Textual provides the textual console command to allows us to inspect what's going on in the app. To use this:
uv sync --python 3.12
source .venv/bin/activate
textual consoleThen in another terminal run the app with the --dev flag:
uv sync --python 3.12
source .venv/bin/activate
textual run --dev src/bugit_v2/app.pyAnd the debug console should start printing events and print() messages:
(.venv) ❯ textual console -x EVENT
▌Textual Development Console v5.0.1
▌Run a Textual app with textual run --dev my_app.py to connect.
▌Press Ctrl+C to quit.
────────────────────────── Client '127.0.0.1' connected ──────────────────────────
[14:01:13] SYSTEM app.py:3148
Connected to devtools ( ws://127.0.0.1:8081 )
[14:01:13] SYSTEM app.py:3172
---
[14:01:13] SYSTEM app.py:3173
loop=<_UnixSelectorEventLoop running=True closed=False debug=False>
[14:01:13] SYSTEM app.py:3174
features=frozenset({'devtools', 'debug'})
[14:01:13] SYSTEM app.py:3206
STARTED FileMonitor(set())
[14:01:13] INFO app.py:3275
driver=<LinuxDriver BugitApp(title='BugitApp', classes={'-dark-mode'},
pseudo_classes={'dark', 'focus'})>
[14:01:13] SYSTEM app.py:3319
ready in 91 milliseconds
You can also debug library functions without invoking the UI. In the virtual environment, run
DEBUG=1 APPORT_LAUNCHPAD_INSTANCE=production JIRA_SERVER=<your_url> BUGIT_APP_NAME=bugit python3 -m asyncioChange bugit specific envs as needed. This will drop you into a asyncio REPL that allows top level await.
To check if this is working, import bugit_v2:
import bugit_v2This app only looks pretty when it's used through a graphical terminal such as:
- gnome-terminal
- kitty
- ptyxis
- alacritty
- ghostty
- ...
If it's run in a virtual terminal (like the one you get from ctrl+alt+f4), it will still work but none of the styles/special symbols would appear. In that case use the original bugit or run the app through SSH.
