Skip to content
rahatarchPublic

About

An operating system for AI agents.

Topics

Resources

Code of conduct

Contributing

Stars

45 stars

Watchers

0 watching

Forks

Latest commit

 

History

611 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrudOS

Turn your app into an AI agent in 5 minutes.

Connect Claude, Cursor, or any AI to your existing app features—with zero rewrites and built-in rules that keep your app under your control.

GitHub release npm version crates.io License: Apache 2.0 Node.js Supported platforms: Linux, macOS, and Windows Status: beta

Quick start · How it works · Why BrudOS · See it in action · Ready-made features · Where it's going · Discord · FAQ · Docs

npm install @brud/kernel @brud/sdk @brud/mcp


Your app already knows how to do things. Let AI do them.

You already wrote the functions that power your app—creating an invoice, updating a record, searching customers, exporting a report.

Connecting an AI directly to those functions is risky: one bad prompt can delete records, leak secrets, or run an action you never approved. Building your own permission rules, argument checks, confirmation prompts, and audit log takes weeks.

BrudOS gives you that control layer out of the box. Your existing code stays as it is. You decide what the AI can run freely, what requires your confirmation in chat, and what is strictly blocked.

  You: "Create a ৳5,000 invoice for Rahim"
            │
            ▼
  Claude / Cursor / Any AI ── calls your BrudOS MCP tool
            │
            ▼
  BrudOS ── checks brud.mcp.json rules on every request
            ├── allow ──▶ runs YOUR read/safe function immediately
            ├── ask   ──▶ pauses and asks you to confirm in chat
            │              └── approved ──▶ runs YOUR function & logs it
            └── block ──▶ refused, hidden from AI, and logged
  1. Keep your code. Wrap your existing functions without rewriting your app.
  2. Set simple rules. Mark each action allow, ask, or block in brud.mcp.json.
  3. Connect any AI client. Works with Claude Desktop, Claude Code, Cursor, Windsurf, or any MCP-compatible client—plus any model via API key.

Why BrudOS

  • Zero rewrites. Reuse your existing functions as they are.
  • Allow, Ask, or Block. Read operations run smoothly, mutations ask for your approval in chat, and dangerous actions stay hidden and blocked.
  • Works with any AI. Use Claude, Cursor, Windsurf, or bring your own model via API key.
  • Built-in guardrails. Rejects malformed inputs, blocks prompt-injection tokens, and redacts secrets from logs automatically.
  • WebAssembly sandboxes. Third-party plugins run in isolated WebAssembly sandboxes with no access to your files, network, or environment unless you explicitly grant it.
  • Local-first. Runs on your machine—no cloud proxy and no telemetry sent anywhere.

Quick start

You don't have to wire everything by hand. Paste one prompt into your AI coding assistant (Claude Code, Cursor, or Windsurf) and replace the part in brackets.

Option A: Add AI to an app you already have

Download and extract https://github.com/rahatarch/brud/releases/download/docs-latest/brud-docs.zip
into a temporary folder. Read docs-next/10-mcp/for-agents.md and follow its guide.
Install @brud/kernel, @brud/sdk, and @brud/mcp.
Make [my feature, e.g. "creating ৳5,000 invoices and managing orders"] usable by an AI through BrudOS.
Reuse my existing code—do not copy or rewrite it.
Configure brud.mcp.json with safe risk rules (reads: allow, mutations: ask, deletes: block).
Connect my client with `npx brud connect claude` (or cursor / windsurf).
Then tell me in plain, everyday words:
1. What the AI can now do freely.
2. What will ask for my confirmation in chat.
3. What is strictly blocked.
4. The exact prompt I should send to Claude right now to test it live!

Option B: Build a new AI-powered app

Download and extract https://github.com/rahatarch/brud/releases/download/docs-latest/brud-docs.zip
into a temporary folder. Read AI-AGENT-GUIDE.md and docs-next/10-mcp/for-agents.md and follow their guides.
Create a new Node.js 22+ project with @brud/kernel, @brud/sdk, and @brud/mcp and build
[my idea, e.g. "a local invoice manager where Claude can list customers, create ৳5,000 invoices with my approval, and never delete records"].
Configure brud.mcp.json with safe risk rules (reads: allow, mutations: ask, deletes: block)
and connect Claude or Cursor via `npx brud connect`.
Show a live activity feed of every action the AI tried, marked allowed, pending, or blocked.
Test it end to end, start the app, and give me the exact prompt to try it live.

Prefer to follow a tutorial by hand? Start with the step-by-step guides.

See it in action

More apps built with BrudOS → · More community builds →

Ready-made features

Drop-in packages you can install instead of building from scratch.

Package What it does Docs
@brud/mcp Connects your app to Claude, Cursor, and Windsurf with allow/ask/block rules and in-chat approvals @brud/mcp docs
@brud/db Isolated persistent storage and AES-256-GCM encrypted secrets (Memory, File, or SQLite) @brud/db docs
@brud/workspace Zero-dependency workspace root and path boundary authority @brud/workspace docs

After installing one, paste this into your AI coding assistant:

Read the docs inside node_modules/@brud/ for the package I just installed,
connect it to my app, and test that it works end to end.

Builders Discord

A small, active Discord (~50 builders) for people building apps, plugins, or contributing to BrudOS. Working builds shared in #showcase get featured in Community builds.

To join, message rahatarch on Discord (or open an issue) with a short note on what you're building.

For developers

Run BrudOS in the background

Run the daemon when you want editors, AI tools, and background scripts to talk to your app over an encrypted local connection with separate human and AI permission tiers:

npm install @brud/daemon
npx brud-daemon --home ~/.brud --foreground

Setup: Run the background service · Connect to it

Supported languages

Language What you can build Packages Guide
TypeScript / JavaScript Apps, trusted add-ons, and WebAssembly sandboxes @brud/kernel, @brud/sdk, @brud/mcp, @brud/daemon, @brud/cli Getting started
Rust Apps, trusted add-ons, and WebAssembly sandboxes brud-sdk, brud-daemon-client Build with Rust
AssemblyScript WebAssembly sandboxes (experimental) npx brud init --guest --lang assemblyscript CLI docs

Packages

npm (@brud/*)

Package What it does
@brud/kernel The core: runs your features and checks the rules on every request
@brud/sdk Helps you connect and test your existing features
@brud/mcp MCP bridge exposing BrudOS features to AI clients with risk rules and in-chat confirmations
@brud/cli Creates projects, connects MCP clients, checks setup, and packages features
@brud/daemon Runs BrudOS in the background for AI tools and editors
@brud/protocol Shared message formats for talking to the background service

crates.io (Rust)

Crate What it does
brud-sdk Rust toolkit for WebAssembly sandboxes and trusted add-ons, with zero extra dependencies
brud-daemon-client Lets Rust apps talk to the background service over an encrypted local connection

Prebuilt WebAssembly sandbox runtimes are included for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64).

Where BrudOS is going

Letting AI use your app safely is where BrudOS starts, not where it ends.

Under the hood, BrudOS is a small foundation for building software out of pieces that don't have to trust each other. Every piece proves who it is, follows its owner's rules, and can't reach what it wasn't given.

  • Today: connect Claude, Cursor, or any AI to your app with allow, ask, and block rules.
  • Next: a growing set of ready-made features (files, terminal, search, memory) so you can assemble an AI agent in hours instead of months.
  • Long term: a trusted runtime for software composed from multiple authors, where untrusted add-ons run in WebAssembly sandboxes and nothing gets power unless you grant it.

Want to help build it? Join the Builders Discord.

FAQ

Do I have to rebuild my app around AI?

No. Your features stay as they are. You only choose which ones the AI may use and set allow, ask, or block rules.

Which AI clients and models work with it?

Claude Desktop, Claude Code, Cursor, Windsurf, and any MCP client—plus any model you can reach with an API key, including local models.

Do I need to be a security expert?

No. BrudOS checks caller identity, enforces your risk rules, blocks injection tokens, redacts secrets, and runs untrusted plugins inside WebAssembly sandboxes.

Does BrudOS send my code or data anywhere?

No. BrudOS runs locally on your machine. Your AI provider only sees what your app sends it. See PRIVACY.md.

What do I need to run it?

Node.js 22 or newer on Linux (x64, arm64), macOS (x64, arm64), or Windows (x64).

Documentation

License

Apache License 2.0

About

An operating system for AI agents.

Topics

Resources

Code of conduct

Contributing

Stars

45 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages