Development

June 19, 2026 · View on GitHub

This guide covers what you need to set up the project, run it locally, and contribute changes. For a high-level tour of how the codebase fits together, see architecture.md.

Prerequisites

First-time setup

Clone the repository, then from the repo root:

just init           # install dependencies and configure dev tooling
just build-develop  # compile QML, data, and translations into rc_project.py
uv run main.py      # launch the application

Whenever you change files in data/, i18n/, or qt/qml/, re-run just build-develop so the resource bundle is regenerated. Configure your IDE to run it before launching the app.

Daily commands

RecipeWhat it does
just testRun Python tests and QML tests (recompiles resources first)
just prepare-testsRecompile resources for testing (runs build-develop then stages it)
just test-pythonRun Python tests only — does not recompile
just test-qmlRun QML tests only — does not recompile
just test-qml-debug TARGETRun a single QML test file matched by name (useful for iteration)
just fmtFormat and lint Python, QML, JSON, TOML, YAML, Markdown
just lint-qmlRun pyside6-qmllint
just build-developRecompile QML/data/i18n into the resource bundle
just cleanRemove all generated files
just add-translation LOCALEStart a new translation (see internationalization.md)
just update-translationsRefresh existing .ts files from current source strings

After changing production QML, data, or translation files, run just prepare-tests (or just test, which invokes it) so the resource bundle test runners load is up to date. When iterating on test code only, just test-qml and just test-python run directly without recompiling.

Project layout

PathContents
mpvqc/Python: services (business logic), viewmodels (Qt-exposed glue), application bootstrap
qt/qml/QML modules following a reverse-DNS layout, with unit tests colocated alongside sources
test/Python tests (pytest) — services and viewmodels in isolation
testqml/Test harness for QML integration tests: bridge, fixtures, injection overrides
data/Fonts, icons, default mpv.conf / input.conf, themes, build-info.toml
i18n/Translations as .ts source files; .qm binaries are generated
build-aux/Generator scripts: pyproject.toml files-list updater, qrc generator, lupdate project file, Wayland symbol-name regenerator
docs/These docs

See also