{"id":15269415,"url":"https://github.com/reubeno/brush","last_synced_at":"2025-10-16T09:50:28.678Z","repository":{"id":243944361,"uuid":"798617823","full_name":"reubeno/brush","owner":"reubeno","description":"Rust-implemented shell focused on POSIX / bash compatibility","archived":false,"fork":false,"pushed_at":"2024-10-18T18:49:11.000Z","size":1424,"stargazers_count":17,"open_issues_count":11,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-19T12:37:09.939Z","etag":null,"topics":["bash","posix-shell","rust","script","shell"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reubeno.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-10T06:17:52.000Z","updated_at":"2024-10-18T18:37:39.000Z","dependencies_parsed_at":"2024-07-05T14:35:18.043Z","dependency_job_id":"cb5a589d-ef98-4944-8db2-b74da558b5cb","html_url":"https://github.com/reubeno/brush","commit_stats":null,"previous_names":["reubeno/brush"],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubeno%2Fbrush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubeno%2Fbrush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubeno%2Fbrush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reubeno%2Fbrush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reubeno","download_url":"https://codeload.github.com/reubeno/brush/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445926,"owners_count":18227060,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","posix-shell","rust","script","shell"],"created_at":"2024-09-30T07:01:08.354Z","updated_at":"2025-10-16T09:50:28.665Z","avatar_url":"https://github.com/reubeno.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/19351a8e-7b03-4338-81be-dd5b6d7e5abc\"/\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n\u003c!-- Primary badges --\u003e\n\u003cp align=\"center\"\u003e\n  \u003c!-- crates.io version badge --\u003e\n  \u003ca href=\"https://crates.io/crates/brush-shell\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/brush-shell?style=flat-square\"/\u003e\u003c/a\u003e\n  \u003c!-- msrv badge --\u003e\n  \u003cimg src=\"https://img.shields.io/crates/msrv/brush-shell\"/\u003e\n  \u003c!-- LoC badge --\u003e\n  \u003cimg src=\"https://tokei.rs/b1/github/reubeno/brush?category=code\"/\u003e\n  \u003c!-- license badge --\u003e\n  \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue?style=flat-square\"/\u003e\n  \u003c!-- CI status badge --\u003e\n  \u003ca href=\"https://github.com/reubeno/brush/actions/workflows/ci.yaml\"\u003e\u003cimg src=\"https://github.com/reubeno/brush/actions/workflows/ci.yaml/badge.svg\"/\u003e\u003c/a\u003e\n  \u003cbr/\u003e\n  \u003c!-- crates.io download badge --\u003e\n  \u003ca href=\"https://crates.io/crates/brush-shell\"\u003e\u003cimg src=\"https://img.shields.io/crates/d/brush-shell?style=flat-square\"/\u003e\u003c/a\u003e\n  \u003c!-- Packaging badges --\u003e\n  \u003ca href=\"https://repology.org/project/brush/versions\"\u003e\n    \u003cimg src=\"https://repology.org/badge/tiny-repos/brush.svg\" alt=\"Packaging status\"/\u003e\n  \u003c/a\u003e\n  \u003c!-- Dependencies badges --\u003e\n  \u003ca href=\"https://deps.rs/repo/github/reubeno/brush\"\u003e\u003cimg src=\"https://deps.rs/repo/github/reubeno/brush/status.svg\" alt=\"Dependency status\"/\u003e\u003c/a\u003e\n  \u003c!-- Social badges --\u003e\n  \u003ca href=\"https://discord.gg/kPRgC9j3Tj\"\u003e\n    \u003cimg src=\"https://dcbadge.limes.pink/api/server/https://discord.gg/kPRgC9j3Tj?compact=true\u0026style=flat\" alt=\"Discord invite\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ca href=\"https://repology.org/project/brush/versions\"\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e \n\n\u003chr/\u003e\n\n`brush` (**B**o(u)rn(e) **RU**sty **SH**ell) is a [POSIX-](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html) and [bash-](https://www.gnu.org/software/bash/)compatible shell,\nimplemented in Rust. It's built and tested on Linux, macOS, and WSL. Native Windows support is experimental.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/0e64d1b9-7e4e-43be-8593-6c1b9607ac52\" width=\"80%\"/\u003e\n\u003c/p\u003e\n\n`brush` is functional for interactive use as a daily driver! It executes most `sh` and `bash` scripts we've\nencountered. Known limitations are tracked with filed issues. Out of an abundance of caution,\nwe wouldn't recommend using it yet in _production_ scenarios in case it doesn't behave identically\nto your existing stable shell. (If you do find any behavioral differences, though, please report them with an\nissue!)\n\nContributions and feedback of all kinds are welcome! For more guidance, please consult our\n[contribution guidelines](CONTRIBUTING.md). For more technical details, please consult the\n[documentation](docs/README.md) in this repo.\n\nThis project was originally borne out of curiosity and a desire to learn. We're doing our best to keep that\nattitude :).\n\n\u003cbr/\u003e\n\n## 📝 License\n\nAvailable for use and distribution under the [MIT license](LICENSE).\n\n## ⌨️ Installation\n\n_When you run `brush`, it should look exactly as `bash` does on your system: it processes your `.bashrc` and\nother standard configuration. If you'd like to distinguish the look of `brush` from the other shells\non your system, you may author a `~/.brushrc` file._\n\n\u003cdetails open\u003e\n\u003csummary\u003e🚀 \u003cb\u003eInstalling prebuilt binaries from GitHub\u003c/b\u003e\u003c/summary\u003e\n\nWe publish prebuilt binaries of `brush` for Linux (x86_64, aarch64) and macOS (aarch64) to GitHub for official [releases](https://github.com/reubeno/brush/releases). 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.:\n\n```bash\ngh release download --repo reubeno/brush --pattern \"brush-x86_64-unknown-linux-gnu.*\"\n```\n\nAfter downloading the archive for your platform, you may verify its authenticity using the [GitHub CLI](https://cli.github.com/), e.g.:\n\n```bash\ngh attestation verify brush-x86_64-unknown-linux-gnu.tar.gz --repo reubeno/brush\n```\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003e🚀 \u003cb\u003eInstalling prebuilt binaries via `cargo binstall`\u003c/b\u003e\u003c/summary\u003e\n\nYou may use [cargo binstall](https://github.com/cargo-bins/cargo-binstall) to install pre-built `brush` binaries. Once you've installed `cargo-binstall` you can run:\n\n```bash\ncargo binstall brush-shell\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e 🔨 \u003cb\u003eInstalling from sources\u003c/b\u003e\u003c/summary\u003e\n\nTo build from sources, first install a working (and recent) `rust` toolchain; we recommend installing it via [`rustup`](https://rustup.rs/). Then run:\n\n```bash\ncargo install --locked brush-shell\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🐧 \u003cb\u003eInstalling using Nix\u003c/b\u003e\u003c/summary\u003e\n\nIf you are a Nix user, you can use the registered version:\n\n```bash\nnix run 'github:NixOS/nixpkgs/nixpkgs-unstable#brush' -- --version\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🐧 \u003cb\u003eInstalling on Arch Linux\u003c/b\u003e\u003c/summary\u003e\n\nArch Linux users can install `brush` from the official [extra repository](https://archlinux.org/packages/extra/x86_64/brush/):\n\n```bash\npacman -S brush\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🍺 \u003cb\u003eInstalling using Homebrew\u003c/b\u003e\u003c/summary\u003e\n\nHomebrew users can install using [the `brush` formula](https://formulae.brew.sh/formula/brush):\n\n```bash\nbrew install brush\n```\n\u003c/details\u003e\n\n## 👥 Community\n\n`brush` has a community Discord server, available [here](https://discord.gg/kPRgC9j3Tj).\n\n## 🔍 Known limitations\n\nThere are some known gaps in compatibility. Most notably:\n\n* **Some `set` and `shopt` options.**\n  The `set` builtin is implemented, as is `set -x` and many frequently used `set`/`shopt` options, but a number aren't fully implemented. For example, `set -e` will execute but its semantics aren't applied across execution.\n\nIf you're interested, we'd love contributions to improve compatibility, broaden test coverage, or really any other opportunities you can find to help us make this project better.\n\n## 🧪 Testing strategy\n\nThis project is primarily tested by comparing its behavior with other existing shells, leveraging the latter as test oracles. The integration tests implemented in this repo include [675+ test cases](brush-shell/tests/cases) run on both this shell and an oracle, comparing standard output and exit codes.\n\nFor more details, please consult the [reference documentation on integration testing](docs/reference/integration-testing.md).\n\n## 🙏 Credits\n\nThere's a long list of OSS crates whose shoulders this project rests on. Notably, the following crates are directly relied on for major portions of shell functionality:\n\n* [`reedline`](https://github.com/nushell/reedline) - for readline-like input and interactive usage\n* [`clap`](https://github.com/clap-rs/clap) - command-line parsing, used both by the top-level brush CLI as well as built-in commands\n* [`fancy-regex`](https://github.com/fancy-regex/fancy-regex) - relied on for everything regex\n* [`tokio`](https://github.com/tokio-rs/tokio) - async, well, everything\n* [`nix` rust crate](https://github.com/nix-rust/nix) - higher-level APIs for Unix/POSIX system APIs\n\nFor testing, performance benchmarking, and other important engineering support, we use and love:\n\n* [`pprof-rs`](https://github.com/tikv/pprof-rs) - for sampling-based CPU profiling\n* [`criterion.rs`](https://github.com/bheisler/criterion.rs) - for statistics-based benchmarking\n* [`bash-completion`](https://github.com/scop/bash-completion) - for its completion test suite and general completion support!\n\n## 🔗 Links: other shell implementations\n\nThere are a number of other POSIX-ish shells implemented in a non-C/C++ implementation language. Some inspirational examples include:\n\n* [`nushell`](https://www.nushell.sh/) - modern Rust-implemented shell (which also provides the `reedline` crate we use!)\n* [`rusty_bash`](https://github.com/shellgei/rusty_bash)\n* [`mvdan/sh`](https://github.com/mvdan/sh)\n* [`Oils`](https://github.com/oils-for-unix/oils)\n* [`fish`](https://fishshell.com) ([as of 4.0](https://fishshell.com/blog/rustport/))\n\nWe're sure there are plenty more; we're happy to include links to them as well.\n","funding_links":[],"categories":["Rust","Applications"],"sub_categories":["System tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubeno%2Fbrush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubeno%2Fbrush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubeno%2Fbrush/lists"}