An elegant polymorphic shell that lacks the concept of elegance.
- Version: Nish (0.0.0.0)
- License: MIT
A hybrid Linux shell written in Haskell, designed to bridge the legacy world of raw text with the modern world of structured data. Aeth is enjoyable to use, and safe by construction.
Aeth is a polymorphic shell that doesn't force you into one paradigm. Instead of choosing between traditional Unix shells (text streams) or modern shells like Nushell (structured data), Aeth provides both:
- Raw Mode:
ls→ Returns text (traditional shell behavior) - Structured Mode:
@ls→ Returns structured data (Haskell types)
This allows you to leverage decades of Unix tools while also enjoying the benefits of type-safe structured data manipulation.
- Process Management: Fork/exec to launch external programs
- Path Resolution: Finds executables through
$PATH - I/O Redirection: Supports
<,>, and2>(coming soon) - Piping: Connect stdout → stdin for raw commands
- Built-in Commands:
cd,exit - Environment Management: Handles
$HOME,$USER,$PATH, etc.
@ls [path]- List directory contents as structured table (name, kind, size)@pwd- Print working directory as structured textfilter- Filter structured tables with expressions
The prompt displays contextual information:
- Current time
- User@hostname
- Current directory (with home shortening)
- Git branch (when in a git repo)
- Language/framework icons (Haskell, Python, Node, Rust, Go, C)
- Primary IP address
- Battery percentage (laptops)
- Last command duration
- Exit status indicator
- GHC 9.6.7+ and Cabal
- Nerd Font (for icon rendering in prompt)
# Clone the repository
git clone https://github.com/prabinpanta0/Aeth
cd Aeth
# Build and run
cabal build
cabal run Aeth./aethYou'll see the dynamic prompt. Try these commands:
# Raw mode (traditional shell)
ls -la
echo "hello world"
cat README.md | grep Aeth
# Structured mode
@ls
@pwd
@ls /usr/bin
# Filtered structured output
@ls | filter { .size > 1MB }
@ls | filter { .kind == dir }
@ls | filter { .name contains test }Execute commands directly:
cabal run Aeth -- -c "ls -la"
cabal run Aeth -- -c "@ls"
cabal run Aeth -- -c "@pwd"The filter command allows rich queries on structured tables:
@ls | filter { .size > 1MB } # Files larger than 1MB
@ls | filter { .size >= 1024 } # Files >= 1024 bytes
@ls | filter { .kind == dir } # Only directories
@ls | filter { .kind != file } # Everything except files
@ls | filter { .name contains kde } # Names containing "kde"Supported operators: ==, !=, >, >=, <, <=, contains
Supported fields: .name, .kind, .size
Aeth uses a Haskell-based configuration file for maximum flexibility and type safety.
~/.config/Aeth/config.hs
The repository includes a template at config/config.hs that you can customize and copy to the location above.
# Create config directory
mkdir -p ~/.config/Aeth
# Copy template
cp config/config.hs ~/.config/Aeth/config.hs
# Edit to customize
$EDITOR ~/.config/Aeth/config.hsFor detailed configuration options, see docs/CONFIGURATION.md.
- Configuration Guide - Customize prompts, colors, icons, and add structured commands
- Architecture Overview - Understanding the hybrid shell design
This is an early prototype. Known limitations:
- No quoting/escaping in parser yet (whitespace-based)
- Multi-stage raw pipelines are delegated to
/bin/sh -c - Structured pipelines (
@a | @b) not yet implemented - Limited I/O redirection support
- Small set of built-in structured commands
- Minimal REPL with line editing and history
- Basic parser for
@prefixmode selection - Builtins:
cd,exit - First structured commands:
@ls,@pwd - Table filtering with expressions
- Replace placeholder parser with full Megaparsec parser (quoting, escapes, redirects)
- Implement real process-level piping for raw pipelines
- Add structured registry + typed piping bridge (Raw ↔ Structured)
- Expand structured command library
- Improve display engine (sorting, column selection, themes)
Please read the architecture docs to understand the basic design.
MIT License - see LICENSE file for details.
