Thanks for taking a look. Issues and pull requests are both welcome.
git clone https://github.com/danialfarid/termdeck.git
cd termdeck
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/termdeck doctor # confirm dtach, rg, lsof are foundRun a development instance on its own port and data directory so it can't disturb an installed copy:
.venv/bin/termdeck --port 8531 --data-dir ~/.termdeck-dev --openPython changes take effect on restart; changes under termdeck/static/ take effect on a browser reload.
ruff check . # if you have ruff; config is in pyproject.toml
python -m compileall -q termdeck # syntax check
python -m build # the package still buildsThen exercise what you changed in a real browser. There is no test suite yet — a PR that adds meaningful tests for the module it touches is very welcome.
This codebase is deliberately consistent. Match the surrounding style:
- Descriptive names instead of comments. If a block needs explaining, extract it into a well-named method. Comments are reserved for class-level docstrings describing workflow, contracts, and corner cases — never a running narration of the code, and never a reference to a specific caller.
- Constants, not literal strings. Routes, escape sequences, filenames, and limits belong in
TermdeckConfig. - No module-level functions and no nested functions. Behaviour belongs to a class as a method or a static method; shared helpers go in a util class.
- Fail fast. Don't catch bare
Exception, don't swallow errors to keep going, and don't guard an expected key or column withif x in y/.get(...)— a missing expected value is a bug and should raise at the real failure site. - Type hints on every method and property, with precise container types (
dict[str, int], notdict). - 120-column lines. Keep signatures, dict literals, and call sites dense rather than one argument per line.
- Small files. Aim under ~300 lines per class file; split by responsibility instead of growing one.
- YAGNI. Add a parameter or field when it has a caller, not before.
New user-visible behaviour should come with a README or docs/ update in the same PR.
docs/architecture.md walks through the process model, every module's responsibility, the agent-session tracking design, and the WebSocket protocol. Worth reading before a change that spans more than one file.
Include:
termdeck doctoroutputtermdeck --version, your OS and version- Steps to reproduce, what happened, what you expected
- Relevant lines from
termdeck service logsif you run it as a service
Please don't open a public issue — see SECURITY.md.
By contributing you agree that your contributions are licensed under the Apache License 2.0.