Umbrella uv workspace for local development across:
This repo only tracks the workspace root files. Each package stays in its own Git repository and is cloned next to the root workspace.
git clone git@github.com:ArchiveBox/monorepo.git
cd monorepo
./bin/setup.shbin/setup.sh clones missing sibling repos, tries to fast-forward existing checkouts with git pull --ff-only while ignoring pull failures caused by local repo state, refreshes bin/setup_monorepo.sh hardlinks inside each member repo so they always match the root script, creates the root .venv, makes a best-effort attempt to run sudo apt install libldap2-dev || brew install openldap, and then runs:
uv sync --all-packages --all-extras --no-cache --activeIf the extras sync still fails, the script retries automatically without --all-extras. That gets the workspace up even when LDAP build deps are unavailable, but archivebox[ldap] will remain unavailable until you install them manually.
Each member repo also gets a bin/setup_monorepo.sh hardlink back to the root script. When run from inside a member checkout, it bootstraps ../ into a real ArchiveBox/monorepo git checkout first, then continues with the normal sibling repo setup.
git clone https://github.com/ArchiveBox/abxbus
cd abxbus
./bin/setup_monorepo.sh- Always use
uvfor everything. Do not usepipor rawpython3 ...directly. - If you need Python directly, use
uv run python .... - Do not use
py_compilefor syntax checks. Useuv run prek run --all-files. prekis the main sweep command. It runs the repo checks together, including tools like Ruff, Ty, Pyright, Prettier, and related hooks.- Run tests with
uv run pytest -xs ...and keep-xfailfast on by default so you do not sit through long suites after the first real regression. - Prefer targeted test selection while iterating, for example
uv run pytest -xs abx-dl/tests/test_cli.py::test_download. abxbus/abxbus-tsis a TypeScript implementation. Usepnpminside that folder, nevernpm.
archiveboxdevelops ondev.abxbus,abx-pkg,abx-plugins, andabx-dldevelop onmain.
abx-plugins,abx-dl, andarchiveboxshare~/.config/abxand the active XDG cache directory for dynamic runtime dependencies, cached/derived env config, temp files, sockets, and related runtime state.
- Purpose: shared event bus and event schema layer used across the stack.
- Workspace dependencies: none.
- Workspace dependents:
abx-dl,archivebox. - Usage: keep it transport- and application-agnostic. Python lives in
abxbus/; the TypeScript implementation lives inabxbus/abxbus-ts.
- Purpose: system package and binary management layer.
- Workspace dependencies: none.
- Workspace dependents:
abx-plugins,abx-dl,archivebox. - Usage: always use
abx-pkgfor package management, binary discovery, version checks, and installation flows instead ofshutil.which, ad hoc shell probes, or directsubprocess.call(...)commands.
- Purpose: plugin definitions, manifests, adapters, and shared plugin helpers.
- Workspace dependencies:
abx-pkg. - Workspace dependents:
abx-dl,archivebox. - Usage: plugins are generic workers. They must not depend on
abx-dl,archivebox, or any app-specific runtime knowledge. - Inputs/outputs: plugins receive input via env vars, CLI args, and filesystem state; they emit records and progress info to stdout/stderr and write outputs to the filesystem.
- Internal structure: plugins may depend on each other when needed, but no circular loops. Shared helpers may live in
plugins/base/utils.*. - Dependency policy: do not add plugin runtime dependencies to
abx-plugins/pyproject.tomland do not create a rootpackage.json. Plugin runtime dependencies belong inplugins/<pluginname>/config.jsonunderrequired_binaries, and are installed at runtime viaabx-pkg.
- Purpose: generic plugin orchestration runtime.
- Workspace dependencies:
abxbus,abx-pkg,abx-plugins. - Workspace dependents:
archivebox. - Usage: this is the orchestration layer for installs, runs, progress, and events. Keep it generic.
- Boundary:
abx-dlmust not know aboutarchivebox, specific plugins, or individual plugin resources. It should orchestrate plugin execution through stable generic interfaces only.
- Purpose: end-user application and persistence layer.
- Workspace dependencies:
abxbus,abx-pkg,abx-plugins,abx-dl. - Workspace dependents: none in this workspace.
- Usage:
archiveboxusesabx-dlto install plugin binaries, run snapshot downloads, and handle plugin-facing runtime work. - Boundary:
archiveboxshould never know about individual plugins or their resources such as Chrome, and it should not re-implement functionality that already belongs inabx-dl. - Runtime model:
archiveboxlistens to theabx-dlevent stream, projects events into its database, and injects events back to steerabx-dl.abx-dlowns the actual orchestration runtime for snapshot execution and installs.