{"id":21662495,"url":"https://github.com/web3os-org/kernel","last_synced_at":"2025-07-17T23:31:32.265Z","repository":{"id":41862995,"uuid":"443477628","full_name":"web3os-org/kernel","owner":"web3os-org","description":"The OS for the next web","archived":true,"fork":false,"pushed_at":"2024-11-22T10:06:33.000Z","size":45201,"stargazers_count":42,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-08T21:03:55.527Z","etag":null,"topics":["blockchain","browser","cryptocurrency","dapp","ethereum","ipfs","javascript","operating-system","web3","webapp"],"latest_commit_sha":null,"homepage":"https://web3os.sh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3os-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATIONS.md","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mathiscode"}},"created_at":"2022-01-01T05:31:56.000Z","updated_at":"2025-04-30T05:00:41.000Z","dependencies_parsed_at":"2024-11-16T16:45:17.168Z","dependency_job_id":null,"html_url":"https://github.com/web3os-org/kernel","commit_stats":{"total_commits":274,"total_committers":3,"mean_commits":91.33333333333333,"dds":0.3941605839416058,"last_synced_commit":"96a79ce2726d341d17d1606da0e23df7d0629558"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/web3os-org/kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3os-org%2Fkernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3os-org%2Fkernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3os-org%2Fkernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3os-org%2Fkernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3os-org","download_url":"https://codeload.github.com/web3os-org/kernel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3os-org%2Fkernel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265678492,"owners_count":23810114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","browser","cryptocurrency","dapp","ethereum","ipfs","javascript","operating-system","web3","webapp"],"created_at":"2024-11-25T10:16:28.690Z","updated_at":"2025-07-17T23:31:28.339Z","avatar_url":"https://github.com/web3os-org.png","language":"JavaScript","funding_links":["https://github.com/sponsors/mathiscode"],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 MD036 MD041 --\u003e\r\n\r\n# DEPRECATED\r\n\r\n## web3os is being replaced by ecmaOS\r\n\r\n- [https://ecmaos.sh](https://ecmaos.sh)\r\n- [https://docs.ecmaos.sh](https://docs.ecmaos.sh)\r\n- [https://github.com/ecmaos/ecmaos](https://github.com/ecmaos/ecmaos)\r\n- [https://www.youtube.com/watch?v=WOsbRim0b6E](https://www.youtube.com/watch?v=WOsbRim0b6E)\r\n\r\n---\r\n\r\n\u003cimg alt=\"Web3OS\" src=\"http://github.com/web3os-org/kernel/raw/master/.github/iconlogo.png\" style=\"width:100%\"\u003e\r\n\r\n*\"The computer can be used as a tool to liberate and protect people, rather than to control them.\"*\r\n-Hal Finney\r\n\r\n[![Launch web3os.sh](https://img.shields.io/badge/launch-web3os.sh-blue?style=for-the-badge)](https://web3os.sh)\r\n[![Launch web3os.sh on IPFS](https://img.shields.io/badge/launch-web3os%20on%20ipfs-silver?style=for-the-badge)](https://web3os-sh.ipns.dweb.link)\r\n[![Launch web3os.sh on Fleek](https://img.shields.io/badge/launch-web3os%20on%20Fleek-silver?style=for-the-badge)](https://web3os.on.fleek.co)\r\n\r\n---\r\n\r\n[![API Reference](https://img.shields.io/badge/API-Reference-success)](https://docs.web3os.sh)\r\n[![Version](https://img.shields.io/github/package-json/v/web3os-org/kernel?color=success)](https://web3os.sh)\r\n[![Site Status](https://img.shields.io/website?url=https%3A%2F%2Fweb3os.sh)](https://web3os.sh)\r\n[![Last Commit](https://img.shields.io/github/last-commit/web3os-org/kernel.svg)](https://github.com/web3os-org/kernel/commit/master)\r\n[![Open issues](https://img.shields.io/github/issues/web3os-org/kernel.svg)](https://github.com/web3os-org/kernel/issues)\r\n[![Closed issues](https://img.shields.io/github/issues-closed/web3os-org/kernel.svg)](https://github.com/web3os-org/kernel/issues?q=is%3Aissue+is%3Aclosed)\r\n\r\n[![Sponsors](https://img.shields.io/github/sponsors/web3os-org?color=red)](https://github.com/web3os-org/kernel/blob/master/LICENSE)\r\n[![Contributors](https://img.shields.io/github/contributors/web3os-org/kernel?color=yellow)](https://github.com/web3os-org/kernel/graphs/contributors)\r\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/web3os-org/kernel/blob/master/LICENSE)\r\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](https://github.com/web3os-org/kernel/compare)\r\n[![Discord](https://img.shields.io/discord/926916877689700373?label=discord)](https://discord.gg/yA4M83fXn9)\r\n[![Observatory Grade](https://img.shields.io/mozilla-observatory/grade/web3os.sh?publish)](https://observatory.mozilla.org/analyze/web3os.sh)\r\n\r\n[![Twitter](https://img.shields.io/twitter/follow/web3os?style=social)](https://twitter.com/web3os)\r\n[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/web3os?style=social)](https://reddit.com/r/web3os)\r\n[![Medium](https://img.shields.io/badge/Medium-@web3os-blue?style=social\u0026logo=medium)](https://web3os.medium.com)\r\n[![Facebook](https://img.shields.io/badge/Facebook-web3os-blue?style=social\u0026logo=facebook)](https://www.facebook.com/Web3os-111014368120117)\r\n[![Youtube](https://img.shields.io/badge/Youtube-web3os-blue?style=social\u0026logo=youtube)](https://www.youtube.com/channel/UC2EqcpVYpyB6RSopi1GaLSg)\r\n\r\n[![Followers](https://img.shields.io/github/followers/web3os-org?style=social)](https://github.com/web3os-org)\r\n[![Watchers](https://img.shields.io/github/watchers/web3os-org/kernel?style=social)](https://github.com/web3os-org/kernel)\r\n[![Stars](https://img.shields.io/github/stars/web3os-org/kernel?style=social)](https://github.com/web3os-org/kernel)\r\n\r\nA decentralized web-based operating system for the next web, empowering users and developers to:\r\n\r\n- Easily install many npm browser packages\r\n- Run Node.js code using [RunKit](https://runkit.com)\r\n- Customize the OS to suit your individual needs\r\n- Write scripts to perform particular tasks\r\n- Write full applications that can create windows and interface with the kernel\r\n- Interact with crypto wallets and smart contracts\r\n- Utilize a number of P2P protocols within the browser\r\n\r\nDocumentation: [https://docs.web3os.sh](https://docs.web3os.sh)\r\n\r\nThis project is still very young, and more documentation and organization is Coming Soon™.\r\n\r\nThis project is tested with [BrowserStack](https://browserstack.com).\r\n\r\n---\r\n\r\n- [Features](#features)\r\n- [Disclaimer](#disclaimer)\r\n- [Help Wanted](#help-wanted)\r\n- [User Quickstart](#user-quickstart)\r\n- [Developer Quickstart](#developer-quickstart)\r\n- [Autostart](#autostart)\r\n- [Globals](#globals)\r\n- [Shortcuts](#shortcuts)\r\n- [Scripting](#scripting)\r\n- [Web3os Package Manager](#web3os-package-manager)\r\n- [Official Apps](#official-apps)\r\n- [Three (OS Assistant)](#three-os-assistant)\r\n- [Kernel Interface](#kernel-interface)\r\n- [App Structure](#app-structure)\r\n- [Metal (@web3os-core/metal)](#metal-web3os-coremetal)\r\n- [WebUSB](#webusb)\r\n- [WebHID](#webhid)\r\n- [Web Bluetooth](#web-bluetooth)\r\n- [Web Serial](#web-serial)\r\n- [Web MIDI](#web-midi)\r\n- [TODO](#todo)\r\n- [Can it do *thing*?](#can-it-do-thing)\r\n- [Further Documentation](#further-documentation)\r\n\r\n---\r\n\r\n## Features\r\n\r\n\u003cdetails open\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Features\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n- Runs completely in the browser (Chromium-based browsers are ideal)\r\n- Browser filesystem with [BrowserFS](https://github.com/jvilk/BrowserFS)\r\n- CLI Terminal with [xterm.js](https://github.com/xtermjs/xterm.js)\r\n- [3pm: The web3os package manager](#web3os-package-manager)\r\n- Modules may also be imported with [SystemJS](https://github.com/systemjs/systemjs)\r\n- Installable as a Progressive Web App\r\n- Optional desktop environment (type `desktop`)\r\n- Optional backend environment / host link with [metal](https://github.com/web3os-org/metal)\r\n- Provides interfaces for many standard and experimental browser APIs\r\n- WebSocket support\r\n- WebUSB support\r\n- WebHID support\r\n- Web Serial Support\r\n- Web Bluetooth support\r\n- Gamepad support\r\n- It runs Doom (and Wolfenstein 3D! and other DOS stuff!) with [JS-DOS](https://js-dos.com/) (@web3os-apps/doom, @web3os-apps/wolfenstein)\r\n- It runs Diablo with [diabloweb](https://d07riv.github.io/diabloweb) (@web3os-apps/diablo)\r\n- It runs Winamp with [webamp](https://github.com/captbaritone/webamp) (@web3os-apps/webamp)\r\n- It runs virtual machines with v86 by Copy.sh\r\n- Apps can create sexy dialogs with [sweetalert2](https://github.com/sweetalert2/sweetalert2)\r\n- Apps can create notifications with [awesome-notifications](https://f3oall.github.io/awesome-notifications) or native browser notifications\r\n- Slick windowing system with [WinBox](https://github.com/nextapps-de/winbox)\r\n- Decentralized messaging support with [Mailchain](https://mailchain.xyz) (@web3os-apps/mailchain)\r\n- Git integration with [isomorphic-git](https://isomorphic-git.org/)\r\n- GunJS integration with [GUN](https://gun.eco)\r\n- Moralis integration with [Moralis](https://moralis.io)\r\n- P2P communication (chat, audio, video, screenshare, fileshare) with [PeerJS](https://peerjs.com)\r\n- Torrent integration with [WebTorrent](https://webtorrent.io)\r\n- **(WIP)** IPFS Integration with [js-ipfs](https://github.com/ipfs/js-ipfs)\r\n  - Built-in IPFS video search and player; type `flix`\r\n- WebAssembly executable support *(WIP)*:\r\n  - [Native](https://developer.mozilla.org/en-US/docs/WebAssembly)\r\n  - [WIP] [WASI](https://wasi.dev/)\r\n  - [WIP] [Emscripten](https://emscripten.org/)\r\n  - [WIP] [AssemblyScript](https://www.assemblyscript.org/)\r\n- Decentralized:\r\n  - Open source to customize and host your own copy ([MIT License](https://github.com/web3os-org/kernel/blob/master/LICENSE))\r\n  - Included [Fleek](https://github.com/web3os-org/kernel/blob/master/.fleek.json) and [Netlify](https://github.com/web3os-org/kernel/blob/master/netlify.toml) configs for easy deployment\r\n  - Main site hosted by [Fleek](https://fleek.co) at [https://web3os.sh](https://web3os.sh)\r\n  - Backup site hosted on IPFS at [https://web3os-sh.ipns.dweb.link/](https://web3os-sh.ipns.dweb.link/)\r\n- Developer-friendly:\r\n  - Easily scriptable and customizable\r\n  - Use an [initfsUrl](https://docs.web3os.sh/global.html#setupFilesystem) query param to load a ZIP file from a URL to populate your filesystem\r\n  - Use a [mountableFileSystemConfig](https://docs.web3os.sh/global.html#setupFilesystem) query param to specify how your filesystems should be mounted\r\n  - Install nearly any browser package from npm\r\n  - Programs are just HTML/CSS/JS/WebGL, or any language that compiles to WebAssembly\r\n\r\n\u003c/details\u003e\r\n\r\n## Disclaimer\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Disclaimer\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nThis project is still considered to be in an early preview state. Any code that runs can access the entire virtual browser filesystem, so there are currently no user accounts, access control lists, or anything of that nature.\r\n\r\nThe code in this repository has not been audited. Do not rely on it to keep anything safe, and never paste commands you don't understand. Anywhere, ever.\r\n\r\nHeavily scrutinize any application or script you install or run, as well as its authors.\r\n\r\n\u003c/details\u003e\r\n\r\n## Help Wanted\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Help Wanted\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nIt's going to take people far smarter than me to make this project achieve its full potential.\r\n\r\nPlease consider digging into the code and see what you can come up with and submit a PR!\r\n\r\nNot sure where to start? Check out [the issues](https://github.com/web3os-org/kernel/issues)!\r\n\r\nSee [CONTRIBUTING.md](https://github.com/web3os-org/kernel/blob/master/CONTRIBUTING.md)\r\n\r\n\u003c/details\u003e\r\n\r\n## User Quickstart\r\n\r\n\u003cdetails open\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand User Quickstart\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n- Visit [https://web3os.sh](https://web3os.sh)\r\n- Use `ls` and `cd` to look around the filesystem\r\n- Type `help` for generic helpful information\r\n- Type `files /bin` to browse all available commands\r\n- Learn more about commands: `help [command]`\r\n- Edit a file: `edit /tmp/test.txt`\r\n- Launch the desktop: `desktop`\r\n- Run the screensaver: `screensaver`\r\n- Play DOOM: `doom`\r\n- Play Wolfenstein 3D: `wolfenstein`\r\n- Read this README: `markdown /docs/README.md`\r\n- Launch the file explorer: `files /docs`\r\n- Launch a browser: `www https://instacalc.com`\r\n- Connect to your wallet: `account connect`\r\n- Check native coin balance: `account balance`\r\n- Check token balance: `account balance USDC`\r\n- Switch to another network: `account chain polygon`, `account chain bsc`, `account chain 0x2`\r\n- Interact with a smart contract: `contract --help`\r\n- 🎉 Fire the Confetti Gun: `confetti`\r\n- See the list of [official apps](#official-apps)\r\n\r\n\u003c/details\u003e\r\n\r\n## Developer Quickstart\r\n\r\n\u003cdetails open\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Developer Quickstart\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n\r\n```sh\r\ngit clone git@github.com:web3os-org/kernel.git\r\ncd kernel\r\npnpm install # or npm install\r\npnpm start # or npm start\r\n```\r\n\r\nFrom here, simply connect to [https://localhost:30443](https://localhost:30443) and accept the certificate warning.\r\n\r\nAlternatively, install [src/assets/ssl/localhost.crt](https://github.com/web3os-org/kernel/blob/master/src/assets/ssl/localhost.crt) to your trusted certificate store.\r\n\r\nWe use SSL locally so that all browser APIs work as expected.\r\n\r\n\u003c/details\u003e\r\n\r\n## Autostart\r\n\r\n\u003cdetails open\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Autostart\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nTo modify the commands the system executes on startup:\r\n\r\n- `edit /config/autostart.sh`\r\n- For example, add `desktop` to the end of the file\r\n- Insert any additional commands you want to run on startup\r\n\r\n\u003c/details\u003e\r\n\r\n## Globals\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Globals\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n\r\nThese objects are available on the global object (globalThis/window):\r\n\r\n- `Kernel`: The global kernel\r\n- `Terminal`: The kernel's main terminal\r\n- `System`: The SystemJS library\r\n\r\n\u003c/details\u003e\r\n\r\n## Shortcuts\r\n\r\n\u003cdetails open\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Shortcuts\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nShortcuts are managed via a JSON object at `/config/shortcuts` and accessed using the `open` command.\r\n\r\nCurrent shortcut types: `execute` - `url`\r\n\r\nExample:\r\n\r\n```json\r\n{\r\n  \"scarytime\": {\r\n    \"type\": \"execute\",\r\n    \"target\": \"snackbar Confetti attack! ; confetti --scalar 12\"\r\n  },\r\n\r\n  \"instacalc\": {\r\n    \"type\": \"execute\",\r\n    \"target\": \"www --no-toolbar --title Instacalc https://instacalc.com\"\r\n  },\r\n    \r\n  \"github\": {\r\n    \"type\": \"url\",\r\n    \"target\": \"https://github.com\"\r\n  }\r\n}\r\n```\r\n\r\nTo open a shortcut: `open \u003ckey\u003e`, e.g. `open github`\r\n\r\n\u003c/details\u003e\r\n\r\n## Scripting\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Scripting\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n\r\nWeb3os scripts (.sh) are a simple line-by-line execution, while Javascript (.js) offers far more power.\r\n\r\nTo run a web3os script: `sh /path/to/script.sh`\r\n\r\n- Or from an app: `window.Kernel.executeScript('/path/to/script.sh')`\r\n\r\nTo run a Javascript script: `eval /path/to/script.js`\r\n\r\n- Or from an app: `window.Kernel.execute('eval /path/to/script.js')`\r\n\r\n\u003c/details\u003e\r\n\r\nSee some sample scripts at: [https://github.com/web3os-org/sample-scripts](https://github.com/web3os-org/sample-scripts)\r\n\r\n## Web3os Package Manager\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Web3os Package Manager\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n\r\nThe `3pm` command can be used to manage installed packages. Installing a package adds an entry to `/config/packages` and all packages in this file are loaded on startup.\r\n\r\nPackages are generally ES Modules, located at a url that contains a `package.json`.\r\n\r\nYou can attempt to install any package from npm using a CDN such as [unpkg](https://unpkg.com) (this is the default 3pm registry).\r\n\r\nThis means that during development, you can serve up your app locally, with Live Server for example, and `3pm install http://localhost:5500`.\r\n\r\nYou may also just use the `import` command to directly import an ES module from a URL. Or bypass all of this and use your own technique!\r\n\r\nDependency management is another monster altogether, so that's still a WIP. This means your package should already be bundled when web3os loads it, or pull in your dependencies some other way.\r\n\r\nHere are a few examples of npm libraries that can be successfully loaded in web3os:\r\n\r\n- [lodash](https://www.npmjs.com/package/lodash)\r\n  - `3pm install lodash`\r\n  - This doesn't add an executable, but `_` is now available in the global scope.\r\n\r\n- [jquery](https://www.npmjs.com/package/jquery)\r\n  - `3pm install jquery`\r\n  - This doesn't add an executable, but `$` is now available in the global scope.\r\n\r\n- [moment](https://momentjs.com)\r\n  - `3pm install --umd moment`\r\n  - `const now = Kernel.modules.moment.run()`\r\n\r\n- [umbrellajs](https://umbrellajs.com/)\r\n  - `3pm install umbrellajs --main umbrella.esm.js`\r\n  - Now you can use it:\r\n    - `const u = Kernel.modules.umbrellajs.default`\r\n    - `const body = u('body')`\r\n\r\n\u003c/details\u003e\r\n\r\n## Official Apps\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Official Apps\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n\r\n- [@web3os-apps/doom](https://npmjs.org/@web3os-apps/doom)\r\n- [@web3os-apps/gun](https://npmjs.org/@web3os-apps/gun)\r\n- [@web3os-apps/minipaint](https://npmjs.org/@web3os-apps/minipaint)\r\n- [@web3os-apps/moralis](https://npmjs.org/@web3os-apps/moralis)\r\n- [@web3os-apps/rubikscube](https://npmjs.org/@web3os-apps/rubikscube)\r\n- [@web3os-apps/wolfenstein](https://npmjs.org/@web3os-apps/wolfenstein)\r\n\r\n\u003c/details\u003e\r\n\r\nSee the [full list](https://www.npmjs.com/org/web3os-apps)\r\n\r\nNote: some apps are currently either very basic implementations or just placeholders to be developed further\r\n\r\n## Three (OS Assistant)\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Three\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n(WIP)\r\n\r\nThree is just a pet at this point, but eventually it will become a useful assistant, or go the way of Clippy.\r\n\r\nJust type `three` at the terminal to get started!\r\n\r\nType `three --help` to see other commands you can use to control Three, and you can access all of the features on `Kernel.modules.three`, e.g.:\r\n\r\n- `Kernel.modules.three.move('50%', '50%')`\r\n- `Kernel.modules.three.say('Hello world')`\r\n- `Kernel.modules.three.animate('heartBeat', 'infinite')`\r\n  - Use any [animate.css](https://animate.style) style\r\n\r\nThree uses the `speak` command for speech synthesis. You may customize the voice parameters using the kernel memory as follows:\r\n\r\n- \u003c3os\u003e# `set three voice Google italiano`\r\n  - Use `speak --list-voices` to see available voices\r\n- \u003c3os\u003e# `set three volume 2`\r\n- \u003c3os\u003e# `set three pitch 1.5`\r\n- \u003c3os\u003e# `set three rate 0.5`\r\n\r\n`console.log(Kernel.modules.three)` to inspect.\r\n\r\n\u003c/details\u003e\r\n\r\n## Kernel Interface\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Kernel Interface\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n\r\nThis is a brief overview of how to use the kernel, please check [https://docs.web3os.sh](https://docs.web3os.sh) for updated documentation.\r\n\r\nThis (and everything else) is subject to change before version 1.0.\r\n\r\n`window.Kernel.modules` = { name: app }\r\n\r\n- Contains all apps registered in the kernel\r\n- e.g., `window.Kernel.modules.desktop.run()`\r\n- e.g., `window.Kernel.modules['@author/package'].version`\r\n\r\n`window.Kernel.dialog` ({ ...[sweetalert2options](https://sweetalert2.github.io/#configuration) }) = :Promise(sweetalert2result)\r\n\r\n- Convenience method to create a sweetalert2 dialog with appropriate defaults\r\n- e.g., `window.Kernel.dialog({ title: 'Are you sure?', text: 'Scary stuff!', icon: 'warning' })`\r\n\r\n`window.Kernel.fs` = { ...BrowserFS }\r\n\r\n- This object holds the initialized BrowserFS instance\r\n- e.g., `const doesExist = window.Kernel.fs.existsSync('/config/packages')`\r\n\r\n`window.Kernel.set` ('namespace', 'key', :any)\r\n\r\n- Sets a value in the kernel \"memory\" - persists in localStorage\r\n- e.g., `window.Kernel.set('user', 'name', 'hosk')`\r\n- e.g., `window.Kernel.set('myapp', 'theme', { color: 'rebeccapurple' })`\r\n\r\n`window.Kernel.get` ('namespace', 'key') = :any\r\n\r\n- Gets a value from the kernel \"memory\" - loaded from localStorage\r\n- e.g., `window.Kernel.get('user')`\r\n- e.g., `window.Kernel.get('user', 'name')`\r\n- e.g., `const { color } = window.Kernel.get('myapp', 'theme')`\r\n\r\n`window.Kernel.windows.create` (options) = { options, window }\r\n\r\n- Creates a new application window with [WinBox](https://github.com/nextapps-de/winbox) options\r\n\r\n\u003c/details\u003e\r\n\r\n## App Structure\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand App Structure\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n---\r\n\r\nDevelopers should be able to create apps in any way they like, with as few requirements as possible. Remember, your app is simply running in a browser - you have access to everything that any other script or module does.\r\n\r\nTo make your module executable from the command line, you may export an async function named `run`, or your default export must be a function.\r\n\r\nYour module or `package.json` may also contain a `help` property that contains your module's help text.\r\n\r\nThe best way to create applications for web3os is to create an `npm` package, using any bundler you'd like.\r\n\r\nFor example, to create an application with [snowpack](https://www.snowpack.dev):\r\n\r\n`package.json`:\r\n\r\n```json\r\n{\r\n  \"name\": \"@yourorg/yourapp\",\r\n  \"description\": \"A sample application\",\r\n  \"version\": \"1.2.3\",\r\n  \"license\": \"MIT\",\r\n  \"main\": \"build/index.js\",\r\n  \"module\": \"src/index.js\",\r\n  \"scripts\": {\r\n    \"start\": \"snowpack dev\",\r\n    \"build\": \"snowpack build\",\r\n    \"prepublishOnly\": \"npm run build\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"snowpack\": \"^3.8.8\"\r\n  }\r\n}\r\n```\r\n\r\n`index.js`:\r\n\r\n```js\r\nexport const help = `\r\n  This app enables developers to Do An App!\r\n\r\n  Usage: @yourorg/yourapp [options]        Run yourapp with some options!\r\n`\r\n\r\nexport async function run (terminal, context) {\r\n// or: export default async function (terminal, context) {\r\n  console.log(terminal) // the xterm.js terminal in which your app is running\r\n  console.log(context) // the plain string of arguments passed to your app\r\n  terminal.log('Thanks for checking out myapp!')\r\n  terminal.log(context)\r\n\r\n  // You may also access the web3os system terminal\r\n  window.Terminal.log('This is output to the root globalThis.Terminal')\r\n}\r\n```\r\n\r\nApps can be written and bundled a number of different ways, for some ideas check out:\r\n\r\n[@web3os-apps](https://github.com/web3os-org/web3os-apps)\r\n\r\n\u003c/details\u003e\r\n\r\n## Metal (@web3os-core/metal)\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Metal\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n(WIP)\r\n\r\nMetal is the web3os hardware link, allowing web3os access to certain hardware features and other capabilities of the host operating system.\r\n\r\nIt offers a multi-user environment while restricting access based on a user's authenticated wallet address, or other attributes such as NFT ownership, etc.\r\n\r\nThe `metal` command is the utility to connect to and interact with web3os metal servers.\r\n\r\n[View the metal repository](https://github.com/web3os-org/metal)\r\n\r\n\u003c/details\u003e\r\n\r\n## WebUSB\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand WebUSB\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nExperimental WebUSB API features are limited in browser support at this time.\r\n\r\nThe `usb` command doesn't do much except pair and maintain a list of devices.\r\n\r\n```text\r\nUsage:\r\n    usb devices            List paired USB devices\r\n    usb request \u003coptions\u003e  Request USB device (blank for user choice)\r\n\r\n  Options:\r\n    --help                 Print this help message\r\n    --name                 Specify a friendly name for the USB device\r\n    --product              Product ID of the USB device\r\n    --vendor               Vendor ID of the USB device\r\n    --version              Print the version information\r\n```\r\n\r\nAccess the array of devices within an app: `Kernel.modules.usb.devices`\r\n\r\n\u003c/details\u003e\r\n\r\n## WebHID\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand WebHID\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nExperimental WebHID API features are limited in browser support at this time.\r\n\r\nThe `hid` command doesn't do much except pair and maintain a list of devices.\r\n\r\n```text\r\nUsage:\r\n    hid devices            List paired HID devices\r\n    hid request \u003coptions\u003e  Request HID device (blank for user choice)\r\n\r\n  Options:\r\n    --help                 Print this help message\r\n    --product              Product ID of the HID device\r\n    --vendor               Vendor ID of the HID device\r\n    --version              Print the version information\r\n```\r\n\r\nAccess the array of devices within an app: `Kernel.modules.hid.devices`\r\n\r\n\u003c/details\u003e\r\n\r\n## Web Bluetooth\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Web Bluetooth\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nExperimental Web Bluetooth API features are limited in browser support at this time.\r\n\r\nThe `bluetooth` command doesn't do much except pair and maintain a list of devices.\r\n\r\n```text\r\nUsage:\r\n    bluetooth devices            List paired bluetooth devices\r\n    bluetooth pair \u003coptions\u003e     Request bluetooth device (blank for user choice)\r\n\r\n  Options:\r\n    --help                 Print this help message\r\n    --name                 Specify a friendly name for the bluetooth device\r\n    --version              Print the version information\r\n```\r\n\r\nAccess the array of devices within an app: `Kernel.modules.bluetooth.devices`\r\n\r\n\u003c/details\u003e\r\n\r\n## Web Serial\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Web Serial\u003c/strong\u003e\u003c/summary\u003e\r\n\r\nExperimental Web Serial API features are limited in browser support at this time.\r\n\r\nThe `serial` command doesn't do much except pair and maintain a list of devices.\r\n\r\n```text\r\nUsage:\r\n    serial devices            List paired serial devices\r\n    serial request \u003coptions\u003e  Request serial device (blank for user choice)\r\n\r\n  Options:\r\n    --help                    Print this help message\r\n    --product                 Product ID of the serial device\r\n    --vendor                  Vendor ID of the serial device\r\n    --version                 Print the version information\r\n```\r\n\r\nAccess the array of devices within an app: `await navigator.serial.getPorts()`\r\n\r\n\u003c/details\u003e\r\n\r\n## Web MIDI\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand Web MIDI\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n```text\r\nUsage:\r\n    midi inputs                       List MIDI inputs\r\n    midi outputs                      List MIDI outputs\r\n\r\n  Options:\r\n    --help                            Print this help message\r\n    --version                         Print the version information\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n## TODO\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003e\u003cstrong\u003eExpand TODO\u003c/strong\u003e\u003c/summary\u003e\r\n\r\n- There's a lot to do... please help. 😅\r\n- IO piping\r\n- Tab completion\r\n- Much more work on the `desktop` module\r\n- Typescriptify everything\r\n- Work on internationalization system and translations; RTL support\r\n- Decoupling of most built-in modules into their own packages\r\n- Unified WASM handling\r\n- Rewrite expensive core modules using Emscripten\r\n- Improve security/isolation\r\n- Some apps are just placeholders; flesh them out\r\n- Modify command interfaces to conform to IEEE Std 1003.1-2017\r\n- Add more things to the TODO list\r\n\r\n\u003c/details\u003e\r\n\r\n## Can it do *thing*?\r\n\r\nIf it's not in this README or not readily apparent in the included apps, the answer is probably not **yet**. PR's are always welcome and encouraged. Let's talk about it on [Discord](https://discord.gg/yA4M83fXn9)! But remember, you can always just use Javascript!\r\n\r\nBetter yet, if you can make it do the thing, please [submit a PR](https://github.com/web3os-org/kernel/blob/master/CONTRIBUTING.md)! This project will never grow without a thriving community of developers!\r\n\r\n## Further Documentation\r\n\r\nYou can find the full API reference and other tutorials at [https://docs.web3os.sh](https://docs.web3os.sh)\r\n\r\nQuestions? Check out the [discussion forums](https://github.com/orgs/web3os-org/discussions)\r\n\r\nProblems? Search the [issues](https://github.com/web3os-org/kernel/issues)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3os-org%2Fkernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3os-org%2Fkernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3os-org%2Fkernel/lists"}