Skip to content

An elegant polymorphic shell that lacks the concept of elegance.

License

Notifications You must be signed in to change notification settings

Krypto-Hashers-Community/Aeth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aeth

A hybrid Linux shell written in Haskell that bridges traditional text-based shells with modern structured data.

  • Version: 0.2.0
  • License: MIT

Aeth is a polymorphic shell that supports both traditional Unix commands and structured data operations:

  • Raw Mode: ls returns text (traditional shell behavior)
  • Structured Mode: @ls returns structured data (tables with columns)

Features

Core Shell

  • Fast startup (~25ms)
  • Process management via fork/exec
  • Path resolution through $PATH
  • Piping and I/O redirection
  • Environment variable expansion
  • Tab completion for commands and paths
  • Command history with up/down arrow navigation
  • Signal handling (Ctrl+C, Ctrl+D)
  • Proper quoting support

Built-in Commands

Command Description
cd [path] Change directory (supports cd -)
pwd Print working directory
exit Exit shell
export KEY=VALUE Set environment variable
unset KEY Remove environment variable
history Show command history
clear Clear screen
source FILE Execute commands from file
type CMD Show command type
which CMD Find executable path
echo [args] Print arguments
true / false Return exit codes
jobs List background jobs

Structured Commands

Command Description
@ls [path] List directory as table
@ls -a Include hidden files
@pwd Print working directory
@ps Process list as table
@df Disk usage as table
@env Environment variables
@find [path] [pattern] Find files recursively

Structured Transformations

Command Description
filter { .field op value } Filter table rows
sort .field Sort table by column
select .field1 .field2 Select specific columns

Filter operators: ==, !=, >, >=, <, <=, contains

Example:

@ls | filter { .size > 1MB }
@ls | filter { .kind == dir }
@ps | filter { .%CPU > 1 }

Configurable Prompt

Prompt styles: minimal, powerline, simple, or custom format.

Custom prompt placeholders: {cwd}, {user}, {host}, {branch}, {exit}, {git}

Command Aliases

Define in config.toml:

alias.ll = "ls -la"
alias.la = "@ls -a"

Installation

Requirements: GHC 9.6+ and Cabal

git clone https://github.com/prabinpanta0/Aeth
cd Aeth
cabal build
cabal run Aeth

Usage

Interactive Mode

./aeth

Non-Interactive Mode

./aeth -c "ls -la"
./aeth -c "@ls"

Configuration

Location: ~/.config/Aeth/config.toml

mkdir -p ~/.config/Aeth
cp config/config.toml ~/.config/Aeth/config.toml

See docs/CONFIGURATION.md for details.


Documentation


Roadmap

Completed

  • Fast startup (~25ms)
  • Tab completion
  • Proper quoting support
  • Environment variable expansion
  • Signal handling
  • Configurable prompts
  • Command history with arrow navigation
  • Visual file/directory distinction
  • Structured commands (@ls, @ps, @df, @env, @find)
  • Structured transformations (filter, sort, select)
  • Command aliases

Planned

  • Full I/O redirection
  • Job control (fg, bg)
  • Syntax highlighting
  • Auto-suggestions

License

MIT License - see LICENSE file.

About

An elegant polymorphic shell that lacks the concept of elegance.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 100.0%