Submit templates for repl.it/templates here.

← Back to all posts
Command Line OS Template (Not Real OS, but OS Simulator)
AmazingMech2418

Command Line OS Template

Have you ever wanted to create your own command line OS simulator? If so, this template is right for you! This template allows you to easily create one with a full saving file system! You no longer need to fork a repl to save data in a fake OS. You can now use a simple ServerLight server to save the data without even requiring a second repl! Starting on line 400, you define the functions and function syntax for your command line OS. These are not predefined since your OS can have whatever syntax you want for its command line, whether closer to Bash for Linux operating systems, Batch for Windows, or PowerShell, or any other command line you can think of! Throughout the index.js file, you can also change prompts to provide a custom login screen, custom error messages, etc. Now, enjoy creating your own command line OS simulator!

Note: You also need to edit the variable defined in line 1 to be your username and you need to delete the contents in replname.txt to reconfigure your OS to use your own file system. If you do not do this, it will by default update through the file system on this template repl rather than your own. Also, to clear the data, just delete the contents of both files in the data folder.

Voters
ObiVibKenobi
AmazingMech2418
Comments
hotnewtop
RobinRMC

I think I just broke your repl. :P

AmazingMech2418

If you would like to see this example in a new tab, go to https://node-command-line-fake-os-template.amazingmech2418.repl.run . To do the same for your own OS, just follow the format https://<repl_name>.<username>.repl.run.