Program Manager Web is a browser-based control panel for running and monitoring multiple long-lived programs (e.g. robotics components, services, build pipelines) on a remote or local machine. It replaces a wall of SSH terminals with one dashboard: start/stop/build/clean each program, watch its live output, and keep an eye on system resources — all from a single HTTPS page.
- Multi-terminal management — create any number of independent terminal instances, each with its own working directory, command, and live output panel (ANSI colors included).
- Run / Stop / Clean / Build per terminal
- Run: launches the configured command; supports quick ad-hoc commands typed into the terminal, which are sent to the running process's stdin if it's busy, or launched as a new command if it's idle.
- Stop: terminates the process tree, escalating from
SIGINTtoSIGTERMtoSIGKILL. - Clean: removes the
builddirectory. - Build: runs
cmake -B build && make -C build -jN. - Both Clean and Build are disabled (visually and server-side) for terminals marked as not buildable.
- Batch-limited "Build All" — rebuilds every terminal at once, with configurable batch size (max builds running concurrently) and
-j(compiler jobs per build), so a full rebuild doesn't saturate RAM/CPU. - Auto-restart — a terminal can be configured to relaunch its command automatically if the process exits.
- Startup dependencies — a terminal can wait for other terminals to be running (with a configurable delay in seconds) before it starts, useful for ordered startup of interdependent components.
- Real-time resource monitoring — global CPU/RAM usage plus per-terminal CPU/RAM, and GPU load/VRAM for NVIDIA (via
GPUtil), AMD, and Intel GPUs (via sysfs), rendered as gauges that fill the available width. - VSCodium integration — open a web-based VSCodium instance scoped to a terminal's working directory directly from the dashboard.
- Configuration management — load and save terminal setups (name, directory, command, restart/buildable flags, dependencies) as JSON files, so a whole session can be restored in one click.
- User authentication — login system backed by
users.json, with passwords hashed viautils/addUser.py. Optionally, users can instead (or additionally) authenticate with a client TLS certificate issued by the app's own private CA — no password prompt, works in any normal browser (desktop or Android), and can be enforced exclusively with--cert-only. - Collapsible terminals — hide/show individual terminals or all of them at once to keep the layout manageable when running many programs.
Python dependencies (listed in requeriments.txt):
flaskflask-socketioflask-loginpsutilgputil
-
Clone the repository:
git clone https://github.com/alfiTH/Program-manager.git cd Program-manager -
Install dependencies:
pip install -r requeriments.txt
-
Install VSCodium server (used for the in-browser code editor):
mkdir ~/software 2> /dev/null; cd ~/software wget https://github.com/VSCodium/vscodium/releases/download/1.109.21026/vscodium-reh-web-linux-x64-1.109.21026.tar.gz mkdir vscodium-server tar -xzf vscodium-reh-web-linux-x64-1.109.21026.tar.gz -C vscodium-server cd -
By default the app expects this at
$HOME/software/vscodium-server; change thedirectoryentry inCONFIGat the top ofsrc/ProgramManager.pyif you installed it elsewhere.
The application only runs over HTTPS. Generate a certificate/key pair inside certificates/:
cd certificates
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
cd -Users live in users.json with hashed passwords. Add one with:
python3 src/ProgramManager.py --addUserAs an alternative to passwords, a user can authenticate with a TLS client certificate.
The app acts as its own private Certificate Authority (created automatically on first use,
at certificates/ca_cert.pem / certificates/ca_key.pem) and only ever trusts certificates
it issued itself — no external authenticator, no third-party account, no browser prompt.
Once the certificate is installed, login is completely transparent: the browser presents it
during the TLS handshake and the dashboard opens directly, with no login form at all.
- Issue a certificate for an existing user (also creates the CA the first time it's run):
This writes a password-protected bundle to
python3 src/ProgramManager.py --addClientCert
client_certs/<user>-<label>.p12. Transfer it to the user's device over a channel you trust, then delete the copy on the server. - Install the
.p12on the target device:- Desktop: double-click it (or import it via the browser's/OS's certificate settings) and enter the password you set when issuing it.
- Android: Settings → Security → "Install a certificate" (wording varies by
manufacturer/version), select the
.p12file, and enter the password.
- Reload the dashboard — the browser will use the certificate automatically. By default
(no
--cert-only), password login still works for anyone without a certificate.
To enforce certificate-only access — no password login reachable at all, refused at the TLS handshake itself, like requiring mutual TLS on a corporate VPN — start the server with:
python3 src/ProgramManager.py --config etc/config.json --cert-onlyIn this mode, a browser without a valid certificate can't complete the TLS handshake at all (it will show a generic connection error, not a custom page) — keep this in mind before enabling it, and make sure every user has a certificate first.
Revoke a lost or compromised certificate (it stops being accepted immediately, without touching the CA or anyone else's certificate):
python3 src/ProgramManager.py --revokeClientCertA configuration file (JSON) describes the terminals to load at startup — see etc/config.json for examples. Each entry supports:
{
"name": "my_component",
"directory": "$ROBOCOMP/components/my_component",
"command": "bin/my_component etc/config",
"restart": false,
"buildable": true,
"robocomp": false,
"depends_on": [{ "name": "other_component", "seconds": 3 }]
}Configurations can also be loaded/saved from the running dashboard via Load Configuration / Save Configuration.
-
Start the server:
python3 src/ProgramManager.py --config etc/config.json
Useful flags:
Flag Default Description --config PATH— Terminal configuration file to load at startup --port PORT5000Port for the web dashboard --codium-port PORT8000Port for the embedded VSCodium server --host HOSTlocalhostBind address (use 0.0.0.0for remote access)--cert-onlyoff Require a valid client certificate for every connection (disables password login) --debugoff Run Flask in debug mode --addUser— Add a new user and exit --addClientCert— Issue a client certificate ( .p12) for an existing user and exit--revokeClientCert— Revoke a previously issued client certificate and exit -
Access the dashboard: Open
https://<server_ip>:5000(orhttps://localhost:5000) in your browser. Since certificates are self-signed, you'll need to accept the browser security warning. -
Log in with a user created via
--addUser.
src/ProgramManager.py— Flask/Socket.IO application: terminal lifecycle, resource monitoring, config load/save.templates/—index.html(dashboard) andlogin.html.utils/—addUser.py(user management),clientCertAuth.py(private CA + client certificate issuance/verification),issueClientCert.py/revokeClientCert.py(client cert CLI),ansiParser.py(ANSI-to-HTML),configLoader.py(config load/save).
etc/— Sample terminal configuration files.certificates/— Server SSL certificate/key for HTTPS, plus the app's private CA (ca_cert.pem/ca_key.pem) used to issue and verify client certificates.client_certs/— Issued client certificate bundles (.p12), pending transfer to their users.client_certs.json— Registry of issued client certificates (serial, user, label, revoked state).users.json— Hashed user credentials.requeriments.txt— Python dependencies.
This project is licensed under the GNU General Public License v3.0.
Alejandro Torrejón Harto
- Email: atorrejon@unex.es
- Copyright 2025, The Program Manager Project