← Back to Projects

Kairo

Interactive OS Shell

A Python-based interactive REPL shell that unifies OS utilities into a functional architecture with 40% faster execution.

100+ chainable commands40% faster execution10+ beta testers

Overview

Kairo is an interactive command-line shell built in Python that reimagines how OS utilities are organized and executed. By consolidating scattered legacy executables into a unified REPL with functional programming patterns, it achieves 40% faster execution and dramatically cleaner code.

Problem

Legacy OS utilities are scattered, inconsistently designed, and often require chaining multiple commands for simple tasks. Maintenance is painful—each utility has its own argument conventions, output formats, and error handling patterns. The result: slow workflows and brittle scripts.

Constraints

  • Had to interoperate with existing system utilities
  • REPL needed to be responsive for interactive use
  • Command syntax had to be intuitive for users familiar with traditional shells
  • Architecture needed to support easy addition of new commands

Solution

I refactored legacy executables into a unified functional programming architecture. Commands are first-class functions that can be composed, piped, and tested independently. The REPL evaluates expressions lazily where possible, and command orthogonality was refined through peer usability testing—users helped identify confusing or overlapping commands.

Architecture & Stack

RuntimePython 3.x
ArchitectureFunctional programming with command composition
InterfaceInteractive REPL with readline support
TestingPeer usability testing for command design

Key Engineering Decisions

  • Functional architecture: commands are pure functions where possible, enabling easy composition
  • Lazy evaluation for expensive operations, improving perceived responsiveness
  • Command orthogonality: each command does one thing well, reducing overlap and confusion
  • Consistent output format across all commands for reliable piping

Challenges & Tradeoffs

The hardest part was deciding where to break compatibility with traditional shell conventions. I chose to prioritize consistency over familiarity—commands follow a uniform pattern even when it differs from legacy equivalents. This required clear documentation and a learning curve, but dramatically reduced cognitive load once users adapted.

Results

100+
Chainable commands
40%
Faster execution
10+
Beta testers

What This Demonstrates

  • Systems programming and OS-level understanding
  • Functional programming architecture design
  • Performance optimization with measurable results
  • User-centered design through peer testing