Install lockmq
Every release ships a static binary for Linux and macOS (amd64, arm64), .deb, .rpm and .apk packages, an SPDX SBOM per archive, a checksums.txt and its keyless cosign signature. No Go toolchain is needed.
lockmq is a pre-release (v0.1.x): the CLI, the MCP tools and the config files may still change before v1. The current release is v0.1.0.
Install script (Linux, macOS)
Downloads the archive for your OS and architecture, checks it against checksums.txt (and the signature of checksums.txt when cosign is on PATH), then installs /usr/local/bin/lockmq, with sudo if needed:
curl -fsSLO https://raw.githubusercontent.com/DavidGodefroid/lockmq/main/scripts/install.sh
less install.sh # read it first
sh install.sh # LOCKMQ_VERSION=v0.1.0 to pin a version
Or, in one line:
curl -fsSL https://raw.githubusercontent.com/DavidGodefroid/lockmq/main/scripts/install.sh | sh
LOCKMQ_REQUIRE_COSIGN=1 makes the script fail instead of warning when cosign is missing. LOCKMQ_INSTALL_DIR installs elsewhere, but a binary your account owns cannot serve the separated console: lockmq install copies only a binary the agent’s account cannot replace.
Debian, Ubuntu, Fedora, RHEL, Alpine
Packages install /usr/bin/lockmq, owned by root. Your architecture is detected:
V=0.1.0
A=$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/')
U=https://github.com/DavidGodefroid/lockmq/releases/download/v$V/lockmq_${V}_linux_$A
# Debian, Ubuntu
curl -fsSLO $U.deb && sudo apt install ./lockmq_${V}_linux_$A.deb
# Fedora, RHEL
sudo dnf install $U.rpm
# Alpine
curl -fsSLO $U.apk && sudo apk add --allow-untrusted ./lockmq_${V}_linux_$A.apk
To remove, sudo apt remove lockmq (or dnf remove, apk del).
By hand, with signature check
Download lockmq_<version>_<os>_<arch>.tar.gz, checksums.txt and checksums.txt.sigstore.json from the releases page, then:
cosign verify-blob --bundle checksums.txt.sigstore.json \
--certificate-identity-regexp '^https://github.com/DavidGodefroid/lockmq/' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
checksums.txt
sha256sum --ignore-missing -c checksums.txt # macOS: shasum -a 256 --ignore-missing -c checksums.txt
tar -xzf lockmq_<version>_<os>_<arch>.tar.gz lockmq
sudo install -m 0755 lockmq /usr/local/bin/lockmq
For v0.1.0 the archives are lockmq_0.1.0_linux_amd64.tar.gz, lockmq_0.1.0_linux_arm64.tar.gz, lockmq_0.1.0_darwin_amd64.tar.gz and lockmq_0.1.0_darwin_arm64.tar.gz, each with its .sbom.json.
From source
go install github.com/DavidGodefroid/lockmq/cmd/lockmq@latest (Go 1.26 or later); the binary is then in your home, so lockmq install --trust-binary prints its sha256 and checks the root-owned copy against it. To build from a checkout:
CGO_ENABLED=0 go build ./cmd/lockmq
go test ./...
go test -tags integration ./test/integration/ # RabbitMQ 3.13 and 4.1 in Docker
See CONTRIBUTING.md for building and testing.
After installing: set up
1. Separate the console from the agent
The console runs only in an account of its own: an agent in the console’s account could read its terminal or type into it. lockmq console refuses to start without this setup. Once per machine:
lockmq install [--client USER] [--user lockmq] [--group lockmq-clients] [--print] [--trust-binary] [--yes]
It prints the root commands and, on Linux, runs them with sudo after you confirm (--yes: without asking; --print: never). On macOS it prints them for an administrator to run. It creates the lockmq console account and the lockmq-clients group, adds the agent’s account to it (--client, default you), writes the root-owned /etc/lockmq/system.toml, creates the socket directory (/run/lockmq on Linux) and copies lockmq to /usr/local/bin, owned by root.
Then set a password for the console account (sudo passwd lockmq), log out and in again (the group applies at login), and open a separate login session as lockmq (switch user; use Wayland).
2. Describe your brokers
lockmq setup [--project DIR]
Asks for one profile and appends it to the project’s .lockmq/config.toml: the management API URL, the optional AMQP and stream URLs, the vhosts, the user, where the password comes from (ask, keychain or vault; never the password itself), production or not, and whether to allow queue peeks (default no). The profile is validated before it is written; a URL with a password is refused.
Every key is described in the README’s Configuration section.
3. 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)$'
4. Wire your agents
lockmq init [claude|codex|cursor|gemini ...]
Writes the project’s agent files (default: the agents found on the machine): the MCP server entry (lockmq mcp), the Claude Code skill, the AGENTS.md / GEMINI.md section and the Cursor rule. Claude Code may call the catalogue tools without a prompt; lockmq_read, lockmq_peek and lockmq_pii_add always ask.
5. Start the console
In the lockmq account’s own session:
lockmq console --profile dev --project /path/to/project
It checks the isolation, asks you to approve the policy, asks for the password (or reads the keychain or Vault), connects, audits the broker user’s privileges and opens the socket. lockmq doctor checks the whole setup from either account.
Docker
A broker in a container is a broker like any other: point the profile at the ports the container publishes. The console itself runs on the host in v0.1; a container mode, as locksql has, is on the roadmap. lockmq and containers.