Skip to main content

Nash — Not A Shell

A sandboxed bash-like command interpreter written in Rust

Why Nash?

Nash looks and behaves like a minimal Bash shell, but it never executes real system commands or touches the host filesystem directly. Everything runs inside a fully controlled in-memory Virtual Filesystem (VFS) with optional host-directory overlay via explicit mount bindings.

Fully Sandboxed

Zero system calls, no OS shell spawned. Perfect for AI agents and untrusted code execution.

In-Memory VFS

Realistic Unix directory tree scaffolded at boot with optional host mounts.

28 Built-in Commands

grep, sed, find, jq, tree, cut, uniq, and more — all implemented in Rust.

Bash-Compatible

Pipes, redirections, &&, ||, subshells, quoting, VAR,VAR, (cmd) all work.

Quick Example

user@nash:/home/user$ ls
Desktop/  Documents/  Downloads/  welcome.txt

user@nash:/home/user$ echo "hello world" | grep hello
hello world

user@nash:/home/user$ mkdir projects && cd projects
user@nash:/home/user/projects$ pwd
/home/user/projects

Get Started

Installation

Install Nash using Cargo and get up and running in minutes

Quickstart

Learn the basics with a hands-on tutorial

Command Reference

Explore all 28 built-in commands

Architecture

Deep dive into how Nash works internally

Key Features

Interactive REPL

Colored bash-style prompt with readline history and Ctrl-C/D handling

Script Execution

Run .sh files directly or execute commands from stdin

Host Mounts

Bind real directories read-write or read-only via —bind

Multi-User

Create isolated home directories for different users

Shell Flags

Support for -e, -u, -x, -v and other bash-compatible flags

Zero Dependencies

No dependencies beyond the Rust toolchain

Use Cases

Give AI agents a safe shell environment where they can run commands without accessing your real filesystem or executing system processes.
Test shell scripts in an isolated environment before running them on production systems.
Teach shell scripting concepts in a controlled environment where students can’t accidentally damage the system.
Execute untrusted build scripts in a sandboxed environment with controlled access to specific directories.

Build docs developers (and LLMs) love