nodrail
OPEN SOURCE · APACHE-2.0

An open-source engine for Agent Policy Format

Keep an APF file in your repository. Test what it allows and enforce its decisions in Claude Code or a harness you maintain. The Apache-2.0 engine runs locally without an account.

Terminal · local evaluation
npm i -g @nodrail/policy-engine
nodrail-policy validate rules.yaml
nodrail-policy eval rules.yaml --command "git status"
nodrail-policy eval rules.yaml --command "git clean -fd"

What is open source?

ComponentWhat it doesCloud required?
Policy engineValidates and evaluates APF policies locally; provides CLI and library interfacesNo
TypeScript clientAdds Cloud permission checks to supported tool callsYes, for the Cloud flow
Agent pluginsConnect Claude Code and Codex hooks to CloudYes, for the Cloud flow

The policy engine, client and agent plugins are Apache-2.0 licensed. Nodrail Cloud is the hosted service. The packages' licenses do not make the entire Cloud application open source.

Take a policy into another harness

Map the harness’s proposed call to an operation and resource, evaluate the rule, then check whether the underlying tool ran. Reuse your expected-decision cases across adapters that describe equivalent actions.

Local control and shared coordination

Use the local engine when you want to evaluate policies in your own environment. Use Cloud when you want connected agent identities, shared policies, approvals by a person and a decision trail in one workspace. You keep execution and provider credentials in either approach.

There is no Nodrail Cloud usage meter for local-only evaluations. Engine limits still apply, and you operate the local environment. A local YAML file does not create a shared approval workflow or sandbox on its own.

Read, contribute and report

Follow each repository's contribution and security instructions. Package interfaces may change before 1.0; pin the release you use and test upgrades.

GET STARTED

Start with one policy