url-vault builds a local cache of mirrored Git repositories and ordinary URLs, then serves that cache back through a local proxy-friendly URL layout.
The current workflow is:
- Prefetch known sources in a connected environment.
- Run a local proxy in a disconnected environment.
- Record cache misses into YAML.
- Copy the miss YAML back to the connected environment.
- Run
url-vaultagain to fill the missing objects into the same cache tree.
- Mirrors Git repositories with
git clone --mirror - Refreshes existing Git mirrors with
git remote update --prune - Runs
git update-server-infoafter Git syncs for dumb-HTTP compatibility - Downloads ordinary HTTP(S) URLs into the same cache tree
- Supports parallel sync with configurable
max_parallel - Supports always-prefetched lists through
prefetchandprefetch_files - Supports offline miss ingestion through
request_files - Includes a mitmproxy addon for cache hits and miss logging
The local cache path is derived from the original URL:
<destination_dir>/<scheme>/<host>/<path>
Examples:
https://github.com/org/example.git->.../https/github.com/org/example.gitgit@github.com:org/example.git->.../ssh/github.com/org/example.githttps://example.com/archive.tar.gz?sha=abc123->.../https/example.com/archive.tar.gz/__query__/sha%3Dabc123
Install the project into a local environment:
uv syncOr with standard venv tooling:
python -m venv .venv
. .venv/bin/activate
python -m pip install -e .Run one sync cycle:
url-vault --onceOr use the compatibility entry point:
python main.py --onceExample runtime config:
update_period: 24h
max_parallel: 4
destination_dir: /srv/url-vault/cache
prefetch_files:
- prefetch.d/neovim-plugins.yaml
request_files:
- requests/offline-misses.yamlCurrent repo-local examples:
prefetch.d/neovim-plugins.yaml: tracked Git prefetch listrequests/offline-misses.yaml: optional offline miss queue, created or updated by the proxy workflow
url_vault/: runtime packagemain.py: Python entry point wrappermitm_local_cache.py: mitmproxy addon for cache serving and miss loggingprefetch.d/: tracked prefetch listsrequests/: local miss queue directorytests/: pytest coveragedocs/specification.md: project behavior and schemamitmproxy.md: Linux-first proxy setup
- Project specification: docs/specification.md
- Linux-focused proxy setup: mitmproxy.md
- WSL-backed end-to-end smoke harness: docs/e2e-smoke.md