Develop the web in the web. This project provides a runtime to run Node.js projects completely in the browser by mocking internals like process
. In addition it includes a shell written in javascript to run commands like ls
or cd
and a playground to test those features.
-
Webcontainer compatible api
- conforms to the webcontainer api
-
Virtual File system
- based on zenfs
-
Process management
- fork / clone processes
- pid management
/proc
file system- get process exit code
- node.js compatible process object
-
Shell Environment
- a shell written in javascript
- supports:
ls
,cat
,echo
,touch
,rm
,cd
,cp
,mv
,pwd
,env
,exit
,true
,false
,history
,clear
,xdg-open
,wget
,unzip
- auto-completion for commands, aliases & paths
- execute commands in
PATH
-
Networking
- service worker to intercept requests
-
Playground
- file explorer
- file editor
- terminals to run commands
.
├── packages
│ ├── core # webcontainer runtime
│ │ └── src
│ │ └── shell # shell environment
│ │ └── commands # shell commands
│ └── playground
│ ├── public # public files
│ └── src
│ ├── assets # static assets
│ ├── components # vue components
│ └── compositions # vue compositions
└── testing
└── busybox # emscripten compiled busybox
# install dependencies
bun install
# start dev server
bun dev
# visit http://localhost:5173
- networking
- add service worker to intercept requests
- clean way to initialize service worker first time (load files somehow)
- polyfill
node:net
andnode:http
modules - tcp/ip stack using sth like (IwIP)
- support http requests
- support websockets
- process management
- spawn isolated processes using mocked process object (workers?)
- jsh
- allow to run script files from fs
- fix input buffer when moving cursor in terminal
- support
&&
and||
operators - support
>>
and>
- support
|
- add shebang support
- jsh commands
- rm -r
- mkdir -p
- cp -r
- which
- export
- sleep
- alias
- curl
- external commands
- wasm (using wasmer)
- node
- python (using wasmer)
- pnpm
- npm
- yarn
- playground
- allow to persist fs (download or api)
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenWebContainer (Thanks for the README template)