A general-purpose shell written in Rust. Like Bash and Zsh, but with a modern expression language and task management features planned.
Status: Alpha (actively developing)
$ git clone https://github.com/TruFoundation/TruShell.git
$ cd TruShell
$ cargo build --release
$ ./target/release/trushell
Or run directly for development:
$ cargo run
Notes:
TruShell is a modern, extensible shell that:
Think of TruShell as an approachable shell with cleaner syntax and an AST-based execution model.
let and referenced with $1mb, 500ms)Interactive use:
trushell> let name = "Alice"
trushell> let age = 30
trushell> let next_year = $age + 1
trushell> echo "Hello, $name! Next year you'll be $next_year."
Pipes and file operations:
trushell> cat server.log | grep "ERROR" > errors.txt
trushell> echo "Done" &> status.log
Code blocks and grouping:
trushell> let sum = { let a = 5; let b = 10; $a + $b }
TruShell can load sandboxed WASM plugins. Plugins must include a JSON manifest (placed alongside the WASM module) that declares the plugin’s name, version, API version, and the capabilities it requires.
Example manifest:
{
"name": "log-echo",
"version": "0.1.0",
"api_version": "1.0",
"capabilities": ["logging"]
}
Supported capability examples:
logging — allows the plugin to call a host logging functionenvironment-get — allows the plugin to read environment variables via the hostPlugin examples live under examples/plugins/ in the repository. A plugin that imports host functions it has not declared will fail to instantiate.
let x = 42 and reference as $x"text"1mb, 500ms{ ... } return the value of the last expression inside+ - * /), comparisons (== != > < >= <=)Operator precedence (lowest → highest): comparison, addition/subtraction, multiplication/division, primary (literals/identifiers/parentheses).
The interpreter follows a familiar pipeline:
Project layout (top-level):
TruShell/
├── src/
│ ├── main.rs - REPL and command execution
│ └── parser.rs - Lexer and parser
├── Cargo.toml - Project manifest
├── Cargo.lock - Dependency lock file
└── README.md - This file
Design goals:
Requirements:
Build & run:
# debug
cargo build
# release
cargo build --release
# run tests
cargo test
# enable backtraces while running
RUST_BACKTRACE=1 cargo run
Recommended workflow:
cargo fmtcargo clippyWe welcome contributions. Suggested flow:
git checkout -b feature/your-featurecargo fmt and cargo clippyPlease open an Issue to discuss larger design changes before implementing them.
Planned work:
~/.trushellrc.bashrc / .zshrcFound a bug or have a question?
TruShell is released under the terms found in LICENSE.md.
Maintainers: TruFoundation
Made with care — contributions and feedback welcome.