Skip to main content

ralon

agent.lock declares what AI agents may not modify. Ralon makes the kernel agree.

# agent.lock — commit it, it is per-repository policy
version: 1

protect:
  - src/auth.ts
  - .env
  - config/**
$ npm install -g ralonlock       # the command it installs is `ralon`
$ pip install ralonlock          # the same binary, delivered as a wheel

(This page is the documentation for both packages. npm and PyPI both refused the name ralon; the command is ralon either way.)

Install once → declare policy → enforcement starts automatically

On Windows and macOS, set the machine up one time and never run a command in a repository again:

$ ralon install                  # registers a per-user background supervisor
$ ralon scope add D:\Projects    # …and say where your code actually lives

After that, any repository under a scope that contains an agent.lock is enforced within a second — including ones cloned next month. Delete the file and enforcement stops.

install uses your home directory as a first-run default and then tells you which drives it does not cover, because where Ralon is installed says nothing about where you keep repositories:

No scope covers D:\ — an agent.lock there is not enforced.
If that is where you keep code:
  ralon scope add D:\Projects

Day to day:

$ ralon status                   # is this project protected, and by what
$ ralon scope list               # every scope, and what is enforced in each
$ ralon pause                    # release this project to edit its own policy
$ ralon resume
$ ralon uninstall                # stop, and hand every project back

ralon pause exists because agent.lock protects itself — which is the point of it, and does mean you cannot rewrite your own policy while it is enforced. A pause expires on its own unless you pass --indefinitely.

Per-command enforcement

On Linux there is no supervisor, and the reason is worth knowing rather than working around: every Linux mechanism is inherited by a process before it runs and cannot be imposed on one already running. ralon install says so instead of registering a service that would come up green and enforce nothing. There you wrap the agent, which is stronger anyway — the restriction becomes part of the process and there is nothing left to kill:

$ ralon run -- claude            # the agent, and every process it spawns
$ ralon run --dry-run -- npm test
$ ralon check src/auth.ts        # exits 1 if the path is protected
$ ralon check                    # list everything the policy protects

Without installing anything: npx ralonlock check src/auth.ts, or pipx run ralonlock check src/auth.ts.

What the guarantee is

For every protected path: write, append, truncate, delete, rename away, replace by rename, and creating files inside a protected directory are all denied. Reading is untouched, and everything outside the policy is untouched.

It binds processes, not agents — the blocked process does not have to know what Ralon is — so it covers every agent equally, including ones with no hook support at all.

Platform Supervisor ralon run
Windows ✅ exclusive file handles ✅ same mechanism
macOS ⚠️ chflags uchg — a narrowing an agent can undo, not a sandbox ✅ Seatbelt, cannot be dropped
Linux ❌ not possible; install explains why ✅ mount namespaces or Landlock

Where a project is enforced, Ralon also configures the agent's own hook, so an agent that reaches a protected path is told "protected by Ralon", which file, and which pattern matched — rather than being handed EBUSY: resource busy or locked and left to conclude the repository is broken. --no-hooks turns that off; enforcement does not depend on it.

About this package

It ships prebuilt binaries and installs only the one matching your platform — Linux (x64, arm64), macOS (Intel, Apple silicon) and Windows (x64).

The npm package puts a small Node shim in front of each invocation, which passes through exit codes and signals unchanged; the wheel installs the binary directly as a console script, with nothing in front of it. For a long-running agent neither matters. cargo install ralon and the release binaries are the same program without a package manager in the way.

Exit codes are the interface and are never swallowed: 0 fine, 1 a path is protected (check) or the plan cannot be enforced (--dry-run), 2 an error. Otherwise run exits with your command's own status.

Full documentation, the threat model, and the limitations that were tested rather than assumed: https://github.com/stoneware-dev/Ralon

Apache-2.0.

Metadata

Release files for ralonlock 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for ralonlock 0.1.6
File
ralonlock-0.1.6-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
ralonlock-0.1.6-py3-none-manylinux_2_17_x86_64.musllinux_1_2_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64, Linux musl 1.2+ x86-64 Details
ralonlock-0.1.6-py3-none-manylinux_2_17_aarch64.musllinux_1_2_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64, Linux musl 1.2+ ARM64 Details
ralonlock-0.1.6-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
ralonlock-0.1.6-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 5.0 MB

Release files / ralonlock-0.1.6-py3-none-win_amd64.whl

Download URL ralonlock-0.1.6-py3-none-win_amd64.whl
Size 984.5 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
3e081a41861cabc6f2bd6bf4993da9fc77e3c36a708219cec3a5e422f8322904
BLAKE2b-256 checksum
How to use checksums
0749cb4e7f8cfccdc4200786103b267c52e732e6a4c3170b52be153dc96c8bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / ralonlock-0.1.6-py3-none-manylinux_2_17_x86_64.musllinux_1_2_x86_64.whl

Download URL ralonlock-0.1.6-py3-none-manylinux_2_17_x86_64.musllinux_1_2_x86_64.whl
Size 1.1 MB
Tags Linux glibc 2.17+ x86-64 Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
cc7ebc1727ccd1e478d6c6c6f6ca9224880e947dd4cd3d40da408b0048a07ad0
BLAKE2b-256 checksum
How to use checksums
f1adfeeb1f2b5ed3fd5b2d4d05102daf92a3c296581dc0fb928d345a1e0e2f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / ralonlock-0.1.6-py3-none-manylinux_2_17_aarch64.musllinux_1_2_aarch64.whl

Download URL ralonlock-0.1.6-py3-none-manylinux_2_17_aarch64.musllinux_1_2_aarch64.whl
Size 981.7 kB
Tags Linux glibc 2.17+ ARM64 Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
4cf0efa373f71ed0b23deb12ba5b492516d54d53e9b02815804ca2082c461cdc
BLAKE2b-256 checksum
How to use checksums
4d94204254ad0823d845341c27a265d23caad91fdaac957068d2d41c8a9afe05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / ralonlock-0.1.6-py3-none-macosx_11_0_arm64.whl

Download URL ralonlock-0.1.6-py3-none-macosx_11_0_arm64.whl
Size 909.8 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cfefdb86b166cbbc2100fd3154594ff3decaab3dd0dc37aacc7449fd5755aa98
BLAKE2b-256 checksum
How to use checksums
d701ab511b2d0e9bd16c2d0d3d5230f2da4adc355ccf67fedd9a4ddf0e3a131e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / ralonlock-0.1.6-py3-none-macosx_10_12_x86_64.whl

Download URL ralonlock-0.1.6-py3-none-macosx_10_12_x86_64.whl
Size 1.0 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
64e4f6eecf3f6515b131c8ec6f6f9c57ea3fb98a79d44ead3de38c964e39147e
BLAKE2b-256 checksum
How to use checksums
9ea87c584ac413caee901577806e9b01b111e7598d8724a9d302481f539894bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.7

5 release files

This release

0.1.6 This release

5 release files

0.1.5

5 release files

0.1.4

5 release files

0.1.3

5 release files

0.1.2

5 release files

0.1.1

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page