Skip to content

Setup

To work with Brane policies, you need two things:

  1. A development environment for writing and testing eFLINT policies
  2. A management tool for deploying policies to your domain’s node

The Haskell eFLINT interpreter provides an interactive REPL for developing and testing policies offline.

Terminal window
# Ubuntu/Debian
sudo apt-get install cabal-install ghc
cabal update

For other platforms, see the Haskell installation guide.

Terminal window
git clone https://gitlab.com/eflint/haskell-implementation ./eflint
cd eflint
cabal configure
cabal build
cabal install
Terminal window
eflint-repl

Type :help in the REPL for available commands.

Syntax highlighting is available for:

Section titled “Option A: Policy Reasoner GUI (Recommended)”

The visual interface is the easiest way to manage policies.

Using Docker:

Terminal window
git clone https://github.com/BraneFramework/policy-reasoner-gui
cd policy-reasoner-gui
docker compose up -d

Native installation:

Requires Rust and NPM.

Terminal 1 — start the frontend:

Terminal window
cd client
npx parcel

Terminal 2 — start the backend:

Terminal window
cargo run

If you prefer the command line, branectl can manage policies too. Install it following the branectl installation guide.

To manage policies on a worker node, you need an access token generated by the node’s administrator:

Terminal window
# Administrator generates a token for you
branectl generate policy_token <YOUR_NAME> <DOMAIN_ID> 30d \
-s ./config/policy_expert_secret.json

The resulting policy_token.json file is your credential. Keep it secure — it grants access to manage the domain’s policies.

With your tools installed, proceed to writing policies.