TUI tool named odoo-activity (inspired by pg_activity)
Project description
odoo-activity
A terminal UI for local Odoo instances. One screen: host cpu/mem/uptime, every
Odoo instance (systemd --user or supervisor) with its databases nested
underneath, and a detail pane for process/log/db inspection.
Installation
uv tool install odoo-activity
Usage
odoo-activity # or: oa
Assumes Odoo instances run under systemd --user and/or supervisor
(both are discovered and merged), and that the odoo-db CLI is on PATH
for the database category tabs. The Config tab additionally needs
odoo-config and odoo-addons-path on PATH.
| Key | Action |
|---|---|
↑/↓ |
move through instances and their nested dbs |
s / r |
start/stop toggle / restart (confirm popup) |
[ / ] |
switch tab in the detail pane |
p / l / c |
Processes / Logs / Config |
u / l / j / c |
Users / Locks / Jobs / Crons |
K |
kill -9 the selected process (Processes tab, confirm popup) |
L |
kill -3 the selected process, then jump to Logs (Processes tab) |
e |
cycle compact/explain/expand/clean (Config tab) |
/ |
search (Logs and Config tabs) |
q |
quit |
Config tab modes
e cycles the Config tab through odoo-config's compact/explain/
expand/clean views of the highlighted instance's config file — see
odoo-config's CLI docs for what each one shows.
ODOO_ACTIVITY_DB_ROLE overrides the postgres role used to resolve an
instance's databases (default: the instance's db_user, falling back to
its name).
Architecture
odoo_activity/
├── probes.py # all system data: no Textual import
├── panes/detail.py # ActivityPane: the one stateful rendering widget
└── tui.py # app shell: layout, list, timers, actions
probes.py— pure functions, no UI. Everysystemctl/supervisorctl/ps/psqlcall and/procread lives here, returning plain dicts/lists so it's testable without spinning up a screen. An instance's databases, logfile and processes all resolve from one config: its<workdir>/config/{odoo.conf,server.conf}.panes/detail.py—ActivityPane, the one stateful render widget: a tab strip over a Log/DataTable, mode-switched by whatever's highlighted (see Modes below) — not a separate popup screen.tui.py— the shell only:compose()layout, the nested instances+dbsListView, focus/highlight wiring, refresh timers, start/stop/restart +ConfirmScreen. Delegates rendering toActivityPane, data toprobes.py.
Modes
ActivityPane mode-switches on whatever's highlighted in the instances list:
- Instance mode — an instance row is highlighted. Tabs: Processes, Logs, Config.
- Database mode — one of its nested database rows is highlighted. Tabs: Users, Locks, Jobs, Crons, Modules, Stats.
Both modes share the same tab strip and Log/DataTable widgets (just a
_mode flag), and several letter-key shortcuts are reused across them for
whichever tab they map to in each (e.g. l is Logs in instance mode, Locks
in database mode).
Data sources
- Instances —
systemctl --user list-unitsandsupervisorctl status, merged by name. - Databases — each instance's
<workdir>/config/{odoo.conf,server.conf}gives a db role (orODOO_ACTIVITY_DB_ROLE);psqllists the databases owned by that role. - Processes — the manager gives the instance's master pid (
systemctl ... -p MainPID/supervisorctl pid);ps -eo pid,ppid,user,%mem,argsis then walked down the ppid tree from there to find every worker. - Logs — the same config gives
logfile, tailed by reading backward in fixed-size chunks from the end so a multi-GB file costs a few reads, not a full scan. - Config — read-only:
odoo-config {compact,explain,expand,clean}is run against the instance's config file and its plain-text stdout is shown as-is; the version passed to it comes fromodoo-addons-path <workdir> --verbose --format json'sversionkey.
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 odoo_activity-0.2.0.tar.gz.
File metadata
- Download URL: odoo_activity-0.2.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a06a16fb6d2e9c95a501eeefbb3d3c8cb9b88ecfe17fdb4b4c96ea9ef46214f
|
|
| MD5 |
2da8f747db60e48019e754585d65b42d
|
|
| BLAKE2b-256 |
d11af1e8b99f0148435aea3e19f5fd150b6fa0eb4479c189d5c05f796c876cb9
|
Provenance
The following attestation bundles were made for odoo_activity-0.2.0.tar.gz:
Publisher:
release.yaml on trobz/odoo-activity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_activity-0.2.0.tar.gz -
Subject digest:
3a06a16fb6d2e9c95a501eeefbb3d3c8cb9b88ecfe17fdb4b4c96ea9ef46214f - Sigstore transparency entry: 2112247806
- Sigstore integration time:
-
Permalink:
trobz/odoo-activity@15c3aa2b1ecc5ce2a42077514a57ff36cc19cd59 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/trobz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@15c3aa2b1ecc5ce2a42077514a57ff36cc19cd59 -
Trigger Event:
push
-
Statement type:
File details
Details for the file odoo_activity-0.2.0-py3-none-any.whl.
File metadata
- Download URL: odoo_activity-0.2.0-py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54ab1bbf7c33ea605d775aa420381a533834f4b9e0609cf7ece7114d1e2138e2
|
|
| MD5 |
e66a39847d7e199ae4044217cb0235af
|
|
| BLAKE2b-256 |
dccfcadf55773261f751f62b9a8de1c39c5b77b3277eb34ab4d6f05037ff0828
|
Provenance
The following attestation bundles were made for odoo_activity-0.2.0-py3-none-any.whl:
Publisher:
release.yaml on trobz/odoo-activity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
odoo_activity-0.2.0-py3-none-any.whl -
Subject digest:
54ab1bbf7c33ea605d775aa420381a533834f4b9e0609cf7ece7114d1e2138e2 - Sigstore transparency entry: 2112247810
- Sigstore integration time:
-
Permalink:
trobz/odoo-activity@15c3aa2b1ecc5ce2a42077514a57ff36cc19cd59 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/trobz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@15c3aa2b1ecc5ce2a42077514a57ff36cc19cd59 -
Trigger Event:
push
-
Statement type: