A custom, high-performance shell written entirely in Rust. Oxide builds a complete command pipeline from scratch—lexing, parsing, and execution—without relying on existing system shell implementations.
Why Oxide? Instead of wrapping existing system calls, Oxide implements its own complete pipeline from scratch: it reads raw text, tokenizes it through a custom Lexer, builds an Abstract Syntax Tree (AST) via its Parser, and routes commands through a dedicated Execution Engine.
- Features
- Architecture
- Getting Started
- Usage Examples
- Project Structure
- Documentation
- Contributing
- Roadmap
- License
- ✅ Custom Lexing & Parsing — Accurately tokenizes and parses strings, arguments, and shell operators
- ✅ Process Execution — Spawns and manages OS-level child processes efficiently
- ✅ Built-in Commands — Native interception for commands that modify shell state (
cd,echo, etc.) - ✅ Redirection — Output truncate (
>), append (>>), and input (<) redirects (e.g.,sort < in.txt >> out.txt) - ✅ Piping (
|) — Chain external commands, streaming stdout into the next command's stdin (e.g.,where cargo | sort | findstr rustup) - ✅ Variable Expansion —
$VAR,${VAR}, and~(home) expansion in arguments - ✅ Dynamic Prompt — Real-time tracking and display of the current working directory
- ✅ Modular Architecture — Cleanly decoupled components for easy extension
- 🔄 Piping through built-ins (currently external commands only)
- 🔄 Command history and autocompletion
- 🔄 Script execution
Oxide is organized as a Cargo Workspace to maintain strict modularity and clear separation of concerns:
| Component | Purpose |
|---|---|
oxide-cli |
Entry point and terminal UI layer |
oxide-core |
Main execution engine and state manager (REPL loop) |
oxide-parser |
Lexer (tokenization) and Parser (grammar and AST generation) |
oxide-builtins |
Built-in commands (cd, echo, etc.) |
oxide-exec |
Command execution and process management |
oxide-config |
Configuration and settings handling |
oxide-utils |
Shared utilities and helpers |
For detailed architecture insights, see docs/architecture.md.
- Rust 1.70+ (Install Rust)
- Cargo (included with Rust)
- On Windows: MSVC build tools
# Clone the repository
git clone https://github.com/AmmaarBakshi/oxide.git
cd oxide
# Build and run the shell
cargo run -p oxide-cli
# Or build a release binary (optimized)
cargo build --release -p oxide-cli
./target/release/oxide-cliWindows: Ensure you have MSVC build tools installed. You can install them via Visual Studio or the Build Tools.
Linux/macOS: Standard Rust installation is sufficient.
oxide> echo "Hello, Oxide!"
Hello, Oxide!
oxide> pwd
/home/user
oxide> cd /tmp
oxide> pwd
/tmpoxide> echo "Project Status" > status.txt
oxide> cat status.txt
Project Statusoxide> ls -la
oxide> whoami
oxide> dateoxide/
├── crates/ # Cargo workspace members
│ ├── oxide-cli/ # Terminal interface
│ ├── oxide-core/ # Core execution engine
│ ├── oxide-parser/ # Lexer and parser
│ ├── oxide-builtins/ # Built-in commands
│ ├── oxide-exec/ # Process execution
│ ├── oxide-config/ # Configuration
│ └── ... # Other specialized crates
├── docs/ # Documentation
│ ├── architecture.md # System design
│ ├── grammar.md # Shell grammar specification
│ └── ...
├── tests/ # Integration and unit tests
├── assets/ # Configuration templates and themes
└── Cargo.toml # Workspace configuration
Comprehensive documentation is available in the docs/ directory:
- Architecture — System design and component interaction
- Grammar — Shell syntax specification
- Configuration — Configuration options and customization
- Performance — Benchmarks and optimization notes
- Scripting — Script execution guide
- Security — Security considerations
- Plugin API — Extending Oxide with plugins
We welcome contributions! Please see CONTRIBUTING.md for guidelines on:
- Reporting bugs
- Submitting feature requests
- Code style and standards
- Pull request process
For planned features, milestones, and project direction, see ROADMAP.md.
Oxide Shell is licensed under the LICENSE file. See it for details.
Made with ⚗️ by Oxide contributors