sentrie

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

README

Sentrie

CLA Required License Dual License

Sentrie is an open-source policy enforcement engine that lets you write business rules in a dedicated language. Instead of embedding policy logic in your application code, you define rules declaratively and let Sentrie evaluate them.

Installation

Sentrie is distributed as a single binary with no external dependencies.

Quick Install

macOS (recommended):

brew install sentrie-sh/tap/sentrie

Note: We use Homebrew Formulas instead of Casks because macOS Gatekeeper flags binaries installed via Casks, requiring workarounds. Formulas are treated as regular binaries by Gatekeeper, providing a better user experience.

macOS, Linux, and WSL2:

curl -fsSL https://sentrie.sh/install.sh | bash

Windows:

irm https://sentrie.sh/install.ps1 | iex

For detailed installation instructions and platform-specific options, see the installation guide.

Basic Usage

Write a Policy

Create a policy file policy.sentrie:

namespace user_management

shape User {
  role: string
  status: string
}

policy user_access {
  fact user:User

  rule allow = {
    yield user.role == "admin" or (user.role == "user" and user.status == "active")
  }

  export decision of allow
}
Execute a Policy
sentrie exec user_management/user_access/allow --facts '{"user":{"role":"admin","status":"active"}}'
Run as HTTP Service
sentrie serve

Then make a request:

curl -X POST http://localhost:7529/decision/user_management/user_access/allow \
  -H "Content-Type: application/json" \
  -d '{"facts":{"user":{"role":"admin","status":"active"}}}'

Learn More

License

Licensed under the Apache License, Version 2.0. See LICENSE and LICENSE-DUAL.md for details.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL