Skip to content

Repository files navigation

Brex

brex score

Brex — a compilable instruction language for AI coding agents.
Write a spec → get IR + Markdown prompts + policy.

Documentation

Read the glossary first, then the guides.

Language Start here
Русский Глоссарий · старт · индекс
English Glossary · start · index

Hub: docs/README.md

Install

cargo install --path crates/brex-cli
brex --version

The binary lands in ~/.cargo/bin. If the shell says brex: command not found, put it on PATH:

export PATH="$HOME/.cargo/bin:$PATH"   # bash/zsh (add to ~/.bashrc or ~/.zshrc)
fish_add_path ~/.cargo/bin             # fish

On Windows cargo uses %USERPROFILE%\.cargo\bin. Optional: brex completions <shell> prints a completion script to stdout.

Binaries for linux/mac/windows are in GitHub Releases (workflow .github/workflows/release.yml, tag v*). Change history: CHANGELOG.md.

Update

brex update     # pull (ff-only) + show new commits + cargo install the fresh CLI

Unlike plain git pull, brex update refuses on a dirty tree, prints what came in, and rebuilds the binary (--no-rebuild to skip). If you prefer manual control: git pull && cargo install --path crates/brex-cli.

30-second start

brex init -t web-api
brex build
brex doctor
brex explain scaffold

Templates: brex packs. Std packs: brex add security.

Or use an example:

brex build examples/simple/project.brex -o out/simple
brex list examples/simple/project.brex

Simple syntax

PROJECT "hello-cli";
DESC "CLI that greets you";
STACK "rust", "clap";

ROLE "Senior backend developer";
CAN "code", "tests";

RULE "Write tests";
GOAL "Has --help and hello";

FILE "app" "src/main.rs";

TASK "bootstrap";
USE "senior_backend_developer";
MAKE "app";
SAY "Build a clap CLI with a hello command";

POLE = ROLE. Full dictionary: docs/en/LANGUAGE.md / docs/ru/LANGUAGE.md.

Commands

brex init [name] [-t default|cli|web-api|monorepo]
brex packs · add <pack> · completions · update
brex check · build · schema · policy · dump-ir
brex run · explain · list · score · graph · fmt · diff
brex blame · drift · replay · allow · hook · doctor

Flags: -o out, --emit ir|md|policy|schema|all, --prompt-style generic|cursor|claude.

Examples

About

A programming language for building precise, structured prompts that AI agents can truly understand

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages