Install · pre-release (before v1.0)

Install lockmq

lockmq runs in Docker. On your machine you need only Docker and the lockmq launcher, a short shell script that runs every command in the signed release image.

lockmq is a pre-release: the CLI, the MCP tools and the config files may still change before v1.

With Homebrew

Install with Homebrew
brew trust davidgodefroid/tap
brew install davidgodefroid/tap/lockmq davidgodefroid/tap/lox cosign

Homebrew asks you to trust a third-party tap once. lockmq v0.10 takes lockhub’s lox v0.12.0 or later and cosign v2.5.0 or later, which lox verifies every image with; the lockmq formula pulls in neither. brew install davidgodefroid/tap/lockfamily installs the whole family instead, lox and cosign included.

  1. In your project, lox add lockmq asks where your broker is (never the password). It writes the profile, wires Claude Code, runs lockmq doctor --fix, shows a short review and starts the console. For Codex, Cursor or Gemini CLI, also run lockmq init codex, cursor or gemini.

    lox add lockmq
  2. In a terminal of its own, outside any agent, keep lox run open. It serves the decisions: every ticket shows up there.

    lox run
  3. Start your agent in the project and ask it about your queues.

With lea, run lox add in lea’s projects directory. If lea already runs, lea stop, then lea, brings the new lock in. How lox add works.

Without Homebrew

Download the install script from the release you install, read it, then run it with that release:

V=vX.Y.Z
curl -fsSLO "https://raw.githubusercontent.com/DavidGodefroid/lockmq/$V/scripts/install.sh"
less install.sh
LOCKMQ_VERSION=$V sh install.sh

It checks the release’s cosign signature and checksum, and the image’s signature. Then it installs /usr/local/bin/lockmq, pinned to the verified image digest.

Linux and macOS (Docker Desktop); on Windows, install it in WSL 2.

  • lockmq version prints the launcher’s version and its image’s.
  • lockmq update installs the latest release’s launcher and pulls its image.
  • LOCKMQ_VAULT=1 selects the image with the Vault CLI, for credentials = "vault".
  • LOCKMQ_IMAGE runs an image of your own build.

What runs where

The console runs as the lockmq account in its own container. It is the only one that holds the broker credentials and opens broker connections.

The agent’s MCP server runs as agent, in the lockmq-clients group, in a throwaway container. The two share only the console’s socket volume, and the kernel checks every peer on the socket.

Set up a project by hand

lox add runs these for you. By hand, in the project directory: the agent files, a broker profile, then a check of the setup.

lockmq init claude      # or codex, cursor, gemini
lockmq profile add
lockmq doctor --fix --yes

profile add asks for the management API URL, the optional AMQP and stream URLs, the vhosts and the user. It asks where the password comes from (ask or vault), never the password itself.

It also asks whether the profile is production, and whether to allow queue peeks (default no). Flags give the answers instead (--url, --user, --vhost, …), and --non-interactive never asks.

In a container localhost is the container itself. A broker on your machine is host.docker.internal; a broker container is its name on a network shared with the console.

.lockmq/ stays yours: the hub copies it for the console, taking only your own files that no one else can write. doctor --fix repairs what it would refuse, and never follows a symbolic link.

Create a read-only broker user

Tag it monitoring, give it empty configure and write permissions, and read only on what lockmq may read.

RabbitMQ lets read purge a queue: grant it on the streams, and on queues only for profiles with tier peek.

rabbitmqctl add_user lockmq-ro 'choose-a-password'
rabbitmqctl set_user_tags lockmq-ro monitoring
rabbitmqctl set_permissions -p orders lockmq-ro '^$' '^$' '^(order-events)$'

The console and its hub

The console runs attached to lockhub only: lockmq console on its own refuses to start. lox add starts it once; lox run starts it again when needed and serves the decisions.

At start the console checks the isolation and asks you to approve its policy. It asks for the password (or the Vault token), connects, audits the broker user’s privileges and opens the socket.

Its own questions come back with lox attach NAME (detach: Ctrl-P Ctrl-Q).

Wire the agent

lockmq works with any MCP client. lockmq init claude|codex|cursor|gemini writes the project files and the MCP command lockmq mcp.

That command is the launcher: it starts the MCP server in a throwaway container, as agent, with the socket volume and the project. Start the agent at the project root, or below it.

For every project instead of one, add the same command to the agent’s user config. Claude Code, for example:

claude mcp add --scope user lockmq -- lockmq mcp

Codex, Gemini CLI and Cursor take the same command (lockmq, argument mcp). Keep their tool_timeout_sec or timeout long: a first connection waits up to 10 minutes for its connect ticket.

An agent started on the host is not confined, even though its lockmq client, run by the launcher in a throwaway container, passes the console's confinement check: the agent can still drive Docker. Run the agent confined, in a container of its own without the Docker socket (for example inside lea); it runs lockmq as a client of the console container.

The full Docker guide · every command in the usage guide