Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

brush

> 编程语言
Open source

bash/POSIX-compatible shell implemented in Rust

2.1K stars0 likes0 views
WebsiteGitHub

About

bash/POSIX-compatible shell implemented in Rust




brush (Bo(u)rn(e) RUsty SHell) is a modern bash- and POSIX- compatible shell written in Rust. Run your existing scripts and .bashrc unchanged -- with syntax highlighting and auto-suggestions built in.

At a glance

✅ Your existing .bashrc just works—aliases, functions, completions, all of it.
✨ Syntax highlighting and auto-suggestions built in.
Validated against bash with ~1700 compatibility tests.
Easily embeddable in your Rust apps using brush_core::Shell.

⚠️ Not everything works yet: select and some edge cases aren't supported. See the Compatibility Reference for details.

Quick start:

bash
$ curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/reubeno/brush/main/scripts/install/install.sh | sh
$ cargo binstall brush-shell         # using cargo-binstall
$ brew install brush                 # using Homebrew
$ pacman -S brush                    # Arch Linux
$ cargo install --locked brush-shell # Build from sources

brush is ready for use as a daily driver. We test every change against bash to keep it that way.

More detailed installation instructions are available below.

✨ Features

bash Compatibility

Feature Description
✅ 50+ builtins echo, declare, read, complete, trap, ulimit, ...
✅ Full expansions brace, parameter, arithmetic, command/process substitution, globs, extglob, globstar
✅ Control flow if/for/while/until/case, &&/||, subshells, pipelines, etc.
✅ Redirection here docs, here strings, fd duplication, process substitution redirects
✅ Arrays & variables indexed/associative arrays, dynamic variables, standard well-known variables, etc.
✅ Programmable completion Works with bash-completion out of the box
✅ Job control background jobs, suspend/resume, fg/bg/jobs
Traps & options DEBUG/ERR/EXIT traps work; signal traps and options in progress

⌨️ User Experience

Feature Description
✅ Syntax highlighting Real-time as you type (reedline)
✅ Auto-suggestions History-based hints as you type (reedline)
✅ Rich prompts PS1/PROMPT_COMMAND, right prompts, starship compatible
✅ TOML config ~/.config/brush/config.toml for persistent settings
Extras fzf/atuin support, zsh-style precmd/preexec hooks (experimental), VS Code terminal integration

Installation

When you run brush, it should look exactly as bash does on your system: it processes your .bashrc and other standard configuration. If you'd like to distinguish the look of brush from the other shells on your system, you may author a ~/.brushrc file.

Installing using Homebrew (macOS/Linux)

Homebrew users can install using the brush formula:

bash
brew install brush
Installing on Arch Linux

Arch Linux users can install brush from the official extra repository:

bash
pacman -S brush
Installing on MSYS2

MSYS2 users can install brush from the repository:

bash
pacman -S mingw-w64-ucrt-x86_64-brush # or mingw-w64-clang-x86_64-brush or mingw-w64-clang-aarch64-brush
Installing prebuilt binaries via `cargo binstall`

You may use cargo binstall to install pre-built brush binaries. Once you've installed cargo-binstall you can run:

bash
cargo binstall brush-shell
Installing prebuilt binaries from GitHub

We publish prebuilt binaries of brush for Linux (x86_64, aarch64) and macOS (x86_64, aarch64) to GitHub for official releases. The simplest way to install one is with our install script, which installs brush to ~/.local/bin:

bash
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/reubeno/brush/main/scripts/install/install.sh | sh

The script checks the download against its published SHA-256 checksum, which guards against a corrupted download but not a compromised release (the checksum comes from the same release). If an authenticated GitHub CLI is available, it also verifies the archive's build provenance attestation, confirming it was built by this repository's release workflow; pass --require-attestation to fail rather than proceed when that check can't be performed. See the comments at the top of scripts/install/install.sh for all options. Alternatively, you can manually download and extract the brush binary from one of the archives published there, or otherwise use the GitHub CLI to download it, e.g.:

bash
gh release download --repo reubeno/brush --pattern "brush-x86_64-unknown-linux-gnu.*"

After downloading the archive for your platform, you may verify its authenticity using the GitHub CLI, e.g.:

bash
gh attestation verify brush-x86_64-unknown-linux-gnu.tar.gz --repo reubeno/brush
Installing using Nix

If you are a Nix user, you can use the registered version:

bash
nix run 'github:NixOS/nixpkgs/nixpkgs-unstable#brush' -- --version
Installing on Fedora (community package)

brush isn't packaged in Fedora's official repositories, but a community-maintained brush-shell package is available from Terra, a separately maintained, third-party repository for Fedora and its derivatives.

Once you've enabled the Terra repository:

bash
dnf install brush-shell
Building from sources

To build from sources, first install a working (and recent) rust toolchain; we recommend installing it via rustup. Then run:

bash
cargo install --locked brush-shell

Community & Contributing

This project started out of curiosity and a desire to learn—we're keeping that attitude. If something doesn't work the way you'd expect, let us know!

  • Discord server — chat with the community
  • Building from source — development workflow
  • Contribution guidelines — how to submit changes
  • Technical docs — architecture and reference

Related Projects

Other POSIX-ish shells implemented in non-C/C++ languages:

  • nushell — modern Rust shell (provides reedline)
  • fish — user-friendly shell (Rust port in 4.0)
  • Oils — bash-compatible with new Oil language
  • mvdan/sh — Go implementation
  • rusty_bash — another Rust bash-like shell
Credits

This project relies on many excellent OSS crates:

  • reedline — readline-like input and interactive features
  • clap — command-line parsing
  • fancy-regex — regex support
  • tokio — async runtime
  • nix — Unix/POSIX APIs
  • criterion.rs — benchmarking
  • bash-completion — completion test suite

Licensed under the MIT license.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustbashposix-shellrustscript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言