A modern shell, written in Rust
Bash-compatible.
Embeddable.
Extensible.
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.
curl --proto '=https' --tlsv1.2 -fsSL https://brush.sh/install.sh | sh

Interactive shell
Your shell setup comes with you.
Brush loads your existing .bashrc, aliases, functions, and completions. History-powered suggestions are enabled by default, syntax highlighting is a setting away, and zsh-style precmd and preexec hooks are there to try (experimental).
~$ ll drwxr-xr-x src/ -rw-r--r-- Cargo.toml ~$ export EDITOR="code --wait" ~$ echo "editor: $EDITOR" editor: code --wait ~$ cargo test --workspace
Shell and library
Use the shell. Or build with the engine.
One tested implementation of Bash semantics, available as a daily shell and as a Rust crate.
Run it
Launch Brush as your daily shell and keep the scripts, startup files, and completions you already rely on.
$ brushInstall Brush Embed it
Create a shell instance and execute Bash-compatible command strings inside your own application.
let mut shell = Shell::builder()
.build().await?;
shell.run_string(script,
&Default::default(),
&shell.default_exec_params()
).await?;Embedding examples Extend it
Register your own builtins, written in Rust, alongside the standard ones. More extension points are on the way.
let mut shell = Shell::builder()
.builtin("greet",
builtin::<Greet, SE>())
.build().await?;Custom builtin example Open source under the MIT license. Built in the open by the brush community.