uvx --from osmsg osmsg --last hour # zero-install, one-shot run
# or
pip install osmsg
# or
uv tool install osmsgWheels include the compiled pyosmium extension; no system OSM tools are required.
uvx (from uv) runs osmsg in a managed, throwaway environment. handy for
ad-hoc runs, CI jobs, and cron entries where you don't want to manage a venv. If a stale resolver cache
ever picks an older release, add --refresh:
uvx --refresh --from osmsg osmsg --last hourPull a published image from GHCR:
docker pull ghcr.io/osgeonepal/osmsg:latest
docker run --rm -v "$PWD:/work" -w /work ghcr.io/osgeonepal/osmsg:latest --last hourOr build locally:
docker build -t osmsg:latest .
docker run --rm -v "$PWD:/work" -w /work osmsg --last hourgit clone https://github.com/osgeonepal/osmsg && cd osmsg
git switch develop
uv sync
uv run pre-commit install
uv run pytest -m "not network"uv sync installs runtime + dev tools (ruff, ty, pytest, pre-commit, commitizen) from pyproject.toml.
ruff (lint + format), ty (Astral type checker), uv-lock (keeps uv.lock in sync with pyproject.toml),
markdownlint, commitizen (conventional commits).
Hooks run automatically on every git commit once you have run uv run pre-commit install. To run them manually:
uv run pre-commit run --all-files # run every hook against the whole repo
uv run pre-commit run ruff --all-files # run a single hook
uv run pre-commit run --files osmsg/cli.py # run hooks against specific files
uv run pre-commit autoupdate # bump hook versions in .pre-commit-config.yamlIf a hook auto-fixes a file (e.g. ruff reformats, uv-lock refreshes the lockfile), the commit is aborted:
re-stage the changes and commit again.
pytest -m "not network"for offline unit tests (handlers, queries, exporters, CLI).pytest -m networkfor integration tests against Geofabrik / OSM (requiresOSM_USERNAME/OSM_PASSWORD).