Projects/ShellShockedJS (POSIX Shell)
Core2025

ShellShockedJS (POSIX Shell)

A POSIX-compliant shell interpreter built from scratch in Node.js — pipelines, redirection, background jobs, all under 10ms.

Node.jsPOSIXParsing

Overview

ShellShockedJS is a POSIX-compliant shell built entirely from scratch in Node.js. It implements a custom tokenizer, parser, and executor capable of handling 90%+ of common CLI syntax with sub-10ms overhead per command.

Core features:

  • Pipelines (cmd1 | cmd2 | cmd3)
  • I/O redirection (>, >>, <)
  • Background job execution (command &)
  • Built-in commands (cd, pwd, echo, exit, env)
  • Signal handling (SIGINT, SIGTERM)
Example Sessionbash
$ echo "hello world" | tr ' ' '_'
hello_world

$ ls -la | grep ".ts" | wc -l
12

$ sleep 5 &
[1] 4821

$ cat input.txt | python3 solve.py > output.txt