Tinysh
Tiny UNIX shell, de-obfuscated, modernized, and "rewritten in Rust".
Install / Use
/learn @zserge/TinyshREADME
tinysh
If you hold a UNIX shell to your ear, you can hear the C.
This is a tiny UNIX shell, implemented in Rust and in C. It is derived from the brilliant IOCCC submission back in 1990 by Sean Dorward. The repository includes the original IOCCC version, as well as the modernized deobfuscated version in C89, and a complete rewrite in Rust.
To run the shell do: cargo run. Or, better, rlwrap cargo run if you want to have a history of commands.
To run the C version do: cd c && make && ./tinysh.
The shell supports:
- Simple commands, i.e.
vim,echo hello worldetc. - Pipelines, i.e. `ls | Cargo | wc -l'.
- File redirection, i.e.
echo hello > xandcat < x | grep hello.
Pretty good for ~100 lines of code in either C or Rust. However, it does not support:
>>append operator.2>or2>&1or anything more complex.&, although that should be trivial to add.- Globs, variables, conditionals, loops, functions and it will never be a proper POSIX shell.
Only a toy. Use and explore at your own risk. However, PRs are welcome for bugfixes, or if the additional functionality would not increase the complexity.
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
