Chisle
The coding-agent plugin that bills 52% of a bare model across 20 live tasks. Terse persona + tool-output compressor + context diet.
翻訳待ち
🐚bash/POSIX-compatible shell implemented in Rust 🦀
翻訳待ち
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. |
This is the beginning of the README. Read the rest at the original. Read the full README ↗