Create a simple Unix-compatible shell in the browser. You are otherwise free to do…
- User
Create a simple Unix-compatible shell in the browser. You are otherwise free to do whatever you want. Give it an interesting feature.
- Assistant
Implemented a complete browser-based Unix-like shell in
src/App.tsx.What it includes:
- Virtual persistent filesystem stored in
localStorage - Unix-style commands like
ls,cd,cat,echo,mkdir,rm,cp,mv,grep,find,tree,wc,head,tail,env,history - Pipes and redirection, for example
cat notes/todo.txt | grep ship > /tmp/matches.txt - Command history with arrow keys
- Tab completion for commands and paths
clear, Ctrl+L,reset --yes- Interesting feature: snapshot time travel with
snapshot NAME,snapshot diff NAME, andsnapshot restore NAME - Polished terminal UI with subtle background drift, terminal entrance, and scanline motion
Also updated
src/index.csswith the small custom animations.Verified successfully with
npm run buildvia the project build tool. - Virtual persistent filesystem stored in
- User
You didn't implement a unix shell. For example: man is not a command. The shell must implement all unix commands.
- Assistant
Expanded the shell to behave much more like a Unix environment.
Changes made:
- Added
manandapropos. - Added a broad POSIX/Common Unix command catalog for autocomplete and command lookup.
- Implemented many more real commands, including
printf,test,[,true,false,yes,basename,dirname,realpath,sort,uniq,nl,fold,cut,tr,sed,awk,tee,paste,xargs,stat,file,cksum,df,du,cmp,diff,od,hexdump,strings,base64,rmdir, , , , , , , , , , , , , , , , , , and .
- Added
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.