A small, POSIX-inspired shell built for the CodeCrafters "Build Your Own Shell" challenge. It supports a set of core shell behaviors, builtins, and utilities implemented in Python.
- Builtins:
echo,pwd,cd,type,complete,jobs,history,declare,exit - External commands by searching
PATH - Quoting and escapes for single quotes, double quotes, and backslashes
- Pipes with
|between commands - Redirections:
>,>>,1>,1>>,2>,2>> - Background jobs via
&withjobslisting - Tab completion for commands and file paths
- Basic variable expansion via
declareand$VARor${VAR} - History support (including
-r,-w,-a) and optionalHISTFILE
- app/main.py: core shell implementation
- egg-shell.sh: local runner script (uses
uv)
This project uses uv to run the shell. If you do not have it installed, see
https://docs.astral.sh/uv/ for installation instructions.
./egg-shell.shIf you prefer to run without uv, make sure you have Python 3.14+ available
and run:
python -m app.main- The shell loads commands from
PATHon startup. - If
HISTFILEis set, history is read and appended on exit. - Completion specs can be registered using
complete -C <path> <command>.