All projects

2026Developer

Building

Python Shell

Systems programming

A POSIX-compliant shell written in Python for the CodeCrafters Build Your Own Shell challenge, with a REPL, builtins like cd, pwd and echo, and external programs.

  • Python

Overview

A POSIX-compliant shell built from scratch in Python as part of the CodeCrafters Build Your Own Shell challenge. It reads commands in a loop, interprets them and runs external programs, just like the shell in a terminal.

What It Does

  • REPL: reads, parses and runs commands one after another.
  • Builtin commands: cd, pwd, echo and more.
  • External programs: finds and runs any program on the system.

What I Learned

  • Shell command parsing.
  • How a read-eval-print loop works.
  • How builtins differ from external programs.

Running It

The entry point is app/main.py. Run the shell locally with:

./your_program.sh

Tech Stack

  • Python
  • uv for the project environment
“First, solve the problem. Then, write the code.”
— John Johnson
Made with Modulify