AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
brush runs your existing Bash scripts and startup files as your everyday shell, and ships as a Rust crate you can embed and extend in your own software.
Developer toolsRust · PythonGitHub @reubenoOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
🐚bash/POSIX-compatible shell implemented in Rust 🦀
Translation pending
Taken from the repository README
Loading the full README.
Read the full README ↗brush is a Bash-compatible shell written in Rust.
Run it as your everyday shell. It loads your existing .bashrc, aliases, functions, and completions, runs the scripts you already have, and adds some modern shell amenities: history-based suggestions and live syntax highlighting.
Build with it. brush-core is a tested implementation of Bash semantics that your own Rust software can embed and extend. brush-parser, which turns shell source into a syntax tree, is used on its own by other projects, including Zed, Vite+, and oh-my-pi, to parse shell commands.
Bash is the shell most of us already know. It's in our fingers, our scripts, and our team's runbooks. brush keeps that behavior as it is, and adds suggestions, highlighting, and the other modern conveniences for those who want them. Keeping that promise means being faithful, so every change is tested against Bash itself.
The brush shell and its libraries are the same code. Embedding brush-core gives your software the behavior the shell has, and an improvement to one is an improvement to the other. brush is written in Rust with extension points designed in: custom builtins already plug in alongside the standard ones, and we intend to open more of the shell's internals the same way, so that tools can observe and extend it natively.
Install the latest release on Linux or macOS:
curl --proto '=https' --tlsv1.2 -fsSL https://brush.sh/install.sh | sh
Or with Homebrew or cargo:
brew install brush # Homebrew, on macOS or Linux
cargo install --locked brush-shell # build from crates.io
cargo binstall brush-shell # prebuilt, via cargo-binstall
Packagers have also brought brush to Homebrew, Arch Linux, Fedora via Terra, MSYS2, Nix, and more. See all install options for details.
Then run brush. It reads the same startup files Bash does, so it picks up your Bash setup as it is. To give brush a look of its own, add a ~/.brushrc.
.bashrc, .bash_profile, aliases, functions, PS1, PROMPT_COMMAND, and prompt tools like starship all work as they do in Bash.git, docker, systemctl, and the rest complete as usual.fg, bg, and jobs.brush --enable-highlighting or syntax-highlighting = true under [ui] in brush's TOML config file.set -e, pipefail, extglob, globstar, and friends.precmd and preexec hooks, and terminal shell integration for VS Code, iTerm2, and other supporting terminals. Both are off by default; see experimental features.Not everything is there yet. Most notably,
select,wait -n,disown, some traps, and a set of edge cases are still missing. The compatibility reference lists what works, what's partial, and what isn't implemented. If you spot something that doesn't look right, please let us know by filing an issue.
The same implementation that runs the shell is available as a set of crates. Create a shell, run Bash-compatible code in it, and inspect the result:
let mut shell = brush_core::Shell::builder().build().await?;
let result = shell
.run_string(
r#"greet() { echo "Hello, $1!"; }; greet world"#,
&brush_core::SourceInfo::default(),
&shell.default_exec_params(),
)
.await?;
assert!(result.is_success());
For more, see the examples: register a builtin written in Rust alongside the standard ones, call a shell function from Rust with control over its I/O, or parse a script and serialize its syntax tree. The examples guide describes each one and when it's useful.
| Crate | API docs | What it provides |
|---|---|---|
brush-core | docs.rs | The shell runtime: expansion, execution, jobs, completion, and the Shell API. Start here to embed. |
brush-parser | docs.rs | Tokenizer and parser for Bash and POSIX shell syntax, with an optional serde AST. Usable independently from the other crates. |
brush-builtins | docs.rs | The standard builtins, usable as a set. Depends on brush-core. |
brush-interactive | docs.rs | Line editing, highlighting, suggestions, and completion UI, built on reedline. Depends on brush-core. |
brush-shell | docs.rs | The brush binary and its command line. Depends on everything else. |
Optional crates add bundled coreutils builtins and experimental builtins.
| Tier | Platforms | What that means |
|---|---|---|
| Supported | Linux: x86_64, aarch64 (glibc, musl) macOS: aarch64 | Prebuilt binaries for every release, the full test suite on Linux x86_64 and aarch64 (glibc) and macOS aarch64, build checks for Linux musl and macOS x86_64, and daily-driver quality. |
| Preview | Windows: x86_64, aarch64 | Windows receives build and static checks in CI along with a small brush-specific test suite; prebuilt binaries are on the way. Parts of the shell are still missing or limited but it's functional for basic usage, particularly when paired with Microsoft's build of coreutils for Windows. |
| Experimental | WASI 0.3 | WASI builds run under wasmtime in CI. There are many significant gaps; more of a starting point for further experimentation. |
| Builds only | Android, FreeBSD, NetBSD, OpenBSD | Cross-compiled in CI so they keep compiling. No official tests, binaries, or validation. |
brush started as a curiosity-driven project, and that curiosity is still what drives it. Most contributors arrived the same way: tried brush, hit something unexpected, and helped fix it. However much time you have, there's a way in.
A star, a mention in your own project's README, or a post about brush all help too.
Curious how brush relates to other shells? See related projects.
brush is shaped by everyone who has given it their time: bug reports with a reproducer, reviews that caught what we missed, packages for distributions we'd never touched, and a good deal of patient chat. Thank you, all of you. It's appreciated more than a line in a README can say.
There's room here for you, too.
brush stands on the shoulders of excellent open source projects, including (but not limited to):
Released as open source under the MIT license. Built in the open by the brush community.