Install¶
El Hidratador is a single Python package with no runtime dependencies. Every install path below
produces the same hidratador command.
Requirements¶
| Requirement | Version | Needed for | Required |
|---|---|---|---|
| Python | 3.11 or newer | the package and the CLI | yes |
sqlite3 |
3.35 or newer | the ledger | yes, bundled with CPython |
git |
any | cloning a repository for staging | no |
gh |
any | observing a repository, publishing reconciled comments | no |
docker |
any | creating a staging sandbox | no |
The last three are adapters. hidratador doctor reports a missing one as a warning, not a
failure. The core needs none of them.
Path 1 — install from PyPI¶
This installs the hidratador console script into the environment's bin directory. Use a
virtual environment if the system Python is managed by your operating system:
python3 -m venv ~/.venvs/hidratador
source ~/.venvs/hidratador/bin/activate
python3 -m pip install el-hidratador
Path 2 — install from a checkout¶
Clone the repository and install it in editable mode. The dev extra brings in the toolchain the
checks need: ruff, mypy, pytest, and coverage.
git clone https://github.com/hamanakam1/el-hidratador.git
cd el-hidratador
python3 -m pip install -e ".[dev]"
The docs extra is separate, and installs mkdocs and mkdocs-material for building this site:
Path 3 — the container image¶
The repository ships a Dockerfile that builds the package into a python:3.12-slim image. The
image runs as an unprivileged user, and the ledger lives on a volume rather than inside the image.
Or build it directly:
Run it:
The ledger is at /var/lib/hidratador/ledger.sqlite inside the container, and that path is a
declared volume. Mount your own to keep state between runs:
The container image is Linux only.
Path 4 — the devcontainer¶
The repository ships a devcontainer, so there is nothing to install by hand. Open the project in your editor and choose "Reopen in Container", or from the command line:
The container image carries Python 3.13, the gh CLI, ShellCheck, and the project dependencies:
{
"name": "El Hidratador",
"image": "mcr.microsoft.com/devcontainers/python:1-3.13-bookworm",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/shellcheck/stable:1": {}
},
"postCreateCommand": "python3 -m pip install --upgrade pip && python3 -m pip install -e \".[dev]\" && python3 -m pip install yamllint && make help"
}
Open it with "Reopen in Container", then run the checks inside the container:
The ledger lives in the container's home directory by default. To keep it on your host instead,
mount a directory and point $HIDRATADOR_DB at it:
{
"mounts": [
"source=${localWorkspaceFolder}/.hidratador,target=/home/vscode/.el-hidratador,type=bind"
],
"containerEnv": {
"HIDRATADOR_DB": "/home/vscode/.el-hidratador/ledger.sqlite"
}
}
Path 5 — run from source¶
No install at all. From the repository root, the module entry point works directly:
This is the form to use while you are working on the package. It is equivalent to the hidratador
script in every other respect, including exit codes and JSON output.
Verify the install¶
Four checks, in order.
# 2. The ledger can be created and read back
hidratador --db /tmp/hidratador-check.sqlite init
hidratador --db /tmp/hidratador-check.sqlite status | jq '.tasks_by_status'
A fresh machine reports ledger and journal-mode as warnings until hidratador init has run
against the default path, because there is no file to inspect yet. Both are warnings, not
failures: the exit code is still 0.
El Hidratador demonstration
================================
Created the ticket M-1001 in status INBOX.
Scope keys: repo/api, repo/edge
A scope key is a resource, not a description. Two tickets that share a scope key cannot run at the same time.
Clean up the check file:
rm -f /tmp/hidratador-check.sqlite /tmp/hidratador-check.sqlite-wal /tmp/hidratador-check.sqlite-shm
Environment variables¶
Two, and only two. Neither holds a credential.
| Variable | Default | Purpose |
|---|---|---|
HIDRATADOR_DB |
~/.el-hidratador/ledger.sqlite |
The ledger path. Used only when --db is absent. |
HIDRATADOR_GITHUB_DB |
~/.el-hidratador/github.sqlite |
The GitHub adapter's observation and outbox database. |
Resolution order for the ledger is --db PATH, then $HIDRATADOR_DB, then the default. Both
variables expand ~.
export HIDRATADOR_DB="$HOME/.el-hidratador/ledger.sqlite"
export HIDRATADOR_GITHUB_DB="$HOME/.el-hidratador/github.sqlite"
There is no configuration file, no config file search path, and no other environment variable. Everything else is a flag. See the example configuration for a deployment shape you can turn into real flags.
Uninstall¶
Removing the package does not remove the ledger. To delete the state as well:
If you installed from a checkout in editable mode, remove the checkout too:
Check that nothing is left on PATH:
Related pages¶
- Getting started — the first five minutes
- Operations — ledger location, backups, and the stuck-task runbook
- Troubleshooting — when the install does not behave
- Development — the development toolchain in detail