Back to Projects
Systems ProgrammingRustCLIDeveloper Tools

MASTerm - Master Your Terminal

Blazing fast, cross-shell terminal framework with zero-config intelligence

January 2026
<50ms
Startup Time
~5MB
Memory Usage
4
Crates

Problem & Context

The Challenge

Standard terminal setups (OhMyZsh, Starship) are slow (200ms+ startup), complex to configure, and lack context awareness. Developers spend hours debugging "why is my terminal slow?" or configuring plugins manually for every language.

Context

Built to bridge the gap between performance (Rust) and usability (Zero-config). Wanted a terminal that "just works" for enterprise environments with strict safety checks.

System Overview

MASTerm is a modular CLI framework written in Rust that hooks into any shell (Zsh, Bash, Fish). It features a multi-threaded core engine that loads plugins in parallel, an async prompt renderer, and a TUI dashboard for management. Key innovations include "Production Safety Guard" (prevents accidental production nukes) and "Context Intelligence" (auto-detects project stack).

Architecture

Event-driven, plugin-based architecture optimized for sub-30ms prompts.

MASTerm Core
Orchestration, config management, plugin loading, and shell hook integration
Plugin System
Parallel execution of 11+ built-in data gatherers (Git, Node, K8s, etc.)
Safety Guard
Regex-based environment detection to block dangerous commands in production
TUI Dashboard
Interactive terminal interface for config editing and system monitoring (Ratatui)
Shell Adapters
Native hooks for Zsh, Bash, Fish, and PowerShell

Interactive Architecture Workflow

MASTerm Execution Pipeline

Click nodes to explore core components • Visualization of a single prompt cycle

💻🚀⚙️xb📦🛡️🎨👀
Shell (Zsh/Bash)
MASTerm CLI
Core Engine (Rust)
Git Plugin
Language Plugins
Safety Guard
Prompt Renderer
Terminal Display

Tech Stack

RustTokioRatatuiClapLibGit2CrossFit

Key Engineering Decisions

Language: Rust vs Go vs C++

Challenge:

Needed startup time <50ms and memory safety for a tool running 100x a day

Solution:

Chose Rust for zero-cost abstractions, memory safety without GC pauses, and rich ecosystem (Tokio, Clap).

Tradeoffs:

Steeper learning curve but resulted in 5MB binary vs 50MB+ for managed languages

Plugin Architecture: WASM vs Native

Challenge:

How to allow user extensibility without compromising core performance?

Solution:

Hybrid model: Core plugins compiled natively for speed, external plugins supported via WASM (extism).

Tradeoffs:

Added build complexity but enables safe, sandboxed community plugins

Safety Guard: Prompt Blocking

Challenge:

Preventing "rm -rf" in production without breaking workflow

Solution:

Implemented visual banner warnings for detected Prod environments. Explicit user confirmation required for dangerous commands.

Tradeoffs:

Minor friction in Ops workflows, but prevented 3 distinct incidents in beta testing

Results & Impact

Startup Latency

6.5x Faster
Before:300ms (OhMyZsh)
After:45ms

Prompt Rendering

4x Faster
Before:100ms
After:25ms

Memory Footprint

90% Less
Before:60MB
After:5MB

Safety Incidents

100% Safe
Before:Occasional
After:Zero

Failures & Learnings

1

Async I/O is critical for prompts - never block the main thread for Git status

2

Cross-shell compatibility is a nightmare of escape codes - abstraction layers pay off

3

Users value "Zero Config" more than "Infinite Config" - smart defaults win

4

TUI (Text User Interfaces) are having a renaissance - great DX for CLI tools