Install
Install lockfile
lockfile runs in Docker on Linux. You install one lockfile command, a launcher that runs every command in the signed release image, and the seccomp profile of the console’s container.
With Homebrew
brew trust davidgodefroid/tap
brew install davidgodefroid/tap/lockfile davidgodefroid/tap/lox cosign
Homebrew asks you to trust a third-party tap once. The whole family instead: brew install davidgodefroid/tap/lockfamily.
The lockfile formula is Linux only. It installs the same launcher and seccomp profile as the install script, pinned to the same image digests. lox is lockhub’s CLI; this release needs lox v0.12.0 or later. The formula does not pull in cosign, which lox add and lox run need.
Then, in your project (with lea: in its projects directory), let lox add lockfile ask for your file store, set up the lock and start its console:
lox add lockfile # S3, SFTP or a local directory; the lock is named files by default
lox run # in a terminal of its own: serves the decisions
If lea already runs, lea stop, then lea brings the new lock in. Then install the plugins.
Requirements
- Docker on Linux, on a kernel with Landlock and seccomp, which sandbox the plugins (Landlock also denies TCP from kernel ABI 4).
lockfile doctorreports what the kernel offers. Without them, plans are refused withE_SANDBOX_UNAVAILABLE. - On Windows, WSL 2 with Docker Desktop.
- lox v0.12.0 or later, which sets up the lock and runs its console.
- cosign v2.5.0 or later on
PATH, forlox addandlox run(they verify every image), the install script andlockfile update. Without it nothing is installed: there is no unsigned mode. The image has its own cosign for the plugins.
By hand: the launcher
V=vX.Y.Z
curl -fsSLO "https://raw.githubusercontent.com/DavidGodefroid/lockfile/$V/scripts/install.sh"
less install.sh # read it first
LOCKFILE_VERSION=$V sh install.sh
The script checks the signatures of checksums.txt and of the images against lockfile’s release workflow run on that exact tag. Then it checks the archive against checksums.txt.
It installs /usr/local/bin/lockfile and /usr/local/share/lockfile/seccomp.json, with sudo if needed: root-owned when installed with sudo (the default directories); as you when the directories are yours to write. The launcher runs the image by its verified digest; lockfile version prints both versions.
Each command runs with the account it needs. The console, which lox run starts, runs as lockfile under the seccomp profile. init and doctor --fix run as you. The agent’s commands run as agent, with the socket volume only. What runs where.
A source profile
Profiles live in the workspace’s .lockfile/config.toml, which is yours. When the lock starts, lockhub reviews it and copies it, read-only, to the console’s ~/.config/lockfile.
lockfile profile add, run from the workspace, appends one, validated:
# S3 (or an S3-compatible endpoint), credentials from Vault, production
lockfile profile add --profile docs --source s3 --bucket documents --region eu-west-1 --prefix invoices/ \
--credentials vault --vault-path secret/data/lockfile/docs --production
# SFTP with a key, host key checked against known_hosts
lockfile profile add --profile partner --source sftp --host sftp.example.org --user reader --auth key \
--key /home/lockfile/.config/lockfile/partner_ed25519 \
--known-hosts /home/lockfile/.config/lockfile/known_hosts --base-dir /outgoing
# after: install -m 0600 keys/partner_ed25519 keys/known_hosts .lockfile/
# (paths in the console's container, where lox run copies .lockfile/; an unquoted ~ would be your own home)
# A local directory, mounted read-only in the console's container
lockfile profile add --profile samples --source local --path /srv/lockfile/samples
[profiles.docs]
source = "s3" # s3 | sftp | local
bucket = "documents"
region = "eu-west-1"
endpoint = "" # S3-compatible server; https:// (http:// only to host.docker.internal or localhost, never production)
prefix = "invoices/" # keys outside the prefix are refused
credentials = "vault" # ask | vault | none (a local source, or an unencrypted sftp key)
vault_path = "secret/data/lockfile/docs"
production = true # tickets flagged production; widenings need the name typed
max_object_bytes = "50MiB" # larger objects are not fetched
max_plugins_per_handle = 16 # answers revealed about one fetched file, at most
handle_ttl = "30m" # a fetched file is deleted after this
answer_quantum = "5s" # results leave the console only on multiples of this
No file ever holds a secret. It is typed at console start (ask) or read from Vault (vault); none takes no secret.
The full list of keys is in the usage guide.
The console, with its hub
lox add lockfile samples --profile samples # declares the lock in lockfamily.yaml
lox run # its own terminal: starts the hub and the lock, serves decisions
lox attach samples # the policy review (detach: Ctrl-P Ctrl-Q)
The console runs attached to lockhub only: lockfile console on its own refuses to start. lockhub’s lox declares the lock and starts it with its hub.
It runs in a container of its own, under the shipped seccomp profile (never seccomp=unconfined), without capabilities, on a read-only root.
It checks the isolation, asks for the secret, connects and serves the profile’s socket. Every plan becomes a ticket, decided in lox run by you or an auto rule; a plan with an unofficial plugin or typed values always waits for a human.
Plugins
lockfile plugin install file.non-empty@1.0.0 # exact versions only; signatures checked with cosign
lockfile plugin install format.is-pdf@1.0.0
lockfile plugin install pdf.parses@1.0.0
lockfile plugin list
lox attach samples # :review applies them (detach: Ctrl-P Ctrl-Q)
Plugins go in the home of the running console, so install them once it has started. With several lockfile locks, --instance NAME picks one. A running console applies a new plugin after :review.
The official marketplace’s signer is pinned in the binary. Plugins covers the catalogue, updates, unofficial marketplaces and writing your own.
Wire your agent
lockfile init codex # or claude, cursor, gemini; this project
lockfile init codex --user # every project of this account
lockfile doctor --fix # wires the installed agents not wired yet (asks; --yes does not)
lockfile init writes the MCP command, lockfile mcp, which runs through the launcher in a throwaway container. Any MCP client works; init wires Claude Code, Codex, Cursor and Gemini CLI.
In Claude Code, lockfile_status, lockfile_sources and lockfile_plugins run without a prompt; plans and runs go through its permission prompt. Whatever the agent, every plan is still decided on lockhub, in lox run.
Upgrade
lockfile update [vX.Y.Z]
It checks the release’s and the image’s signatures as the install script does, replaces the launcher and the seccomp profile, then pulls the image. Restart the console afterwards; the volumes keep its state. With Homebrew: brew upgrade.
Build
docker build -t lockfile https://github.com/DavidGodefroid/lockfile.git
LOCKFILE_IMAGE=lockfile lockfile version
Your own image. From a clone, sh scripts/lockfile … runs it with the clone’s seccomp.json.