{"id":20065018,"url":"https://github.com/sawyerhood/windows9x","last_synced_at":"2026-03-14T05:34:44.585Z","repository":{"id":246177006,"uuid":"796378768","full_name":"SawyerHood/windows9x","owner":"SawyerHood","description":"It is windows, but all of the apps are ai generated.","archived":false,"fork":false,"pushed_at":"2024-08-12T22:18:25.000Z","size":15031,"stargazers_count":173,"open_issues_count":2,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T01:31:43.370Z","etag":null,"topics":["ai","llm","nextjs","react","windows"],"latest_commit_sha":null,"homepage":"https://windows9x.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SawyerHood.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-05T19:01:12.000Z","updated_at":"2025-03-20T06:01:17.000Z","dependencies_parsed_at":"2024-06-26T10:21:01.042Z","dependency_job_id":"9e84f8c4-2b72-4e56-aea1-0d379c1c9562","html_url":"https://github.com/SawyerHood/windows9x","commit_stats":null,"previous_names":["sawyerhood/windows9x"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SawyerHood%2Fwindows9x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SawyerHood%2Fwindows9x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SawyerHood%2Fwindows9x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SawyerHood%2Fwindows9x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SawyerHood","download_url":"https://codeload.github.com/SawyerHood/windows9x/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252719976,"owners_count":21793736,"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":["ai","llm","nextjs","react","windows"],"created_at":"2024-11-13T13:48:41.209Z","updated_at":"2026-03-14T05:34:44.525Z","avatar_url":"https://github.com/SawyerHood.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Windows9x\n\nWindows9X is the operating system of future's past. What if Windows 98 could generate any application that you wanted on the fly? You enter the description of a program you want inside of the run dialog and the OS creates that for you on the fly. This is an experiment in end user programming and seeing what it could be like if an OS could write applications for you as you need them.\n\nhttps://github.com/SawyerHood/windows9x/assets/2380669/19c91f20-cdf5-47f9-b6fc-b7a606b9d7b3\n\n## Getting started\n\nCreate a `.env` file with the following in the root directory:\n\n```\nANTHROPIC_API_KEY=\u003cyour-anthropic-api-key\u003e\nNEXT_PUBLIC_LOCAL_MODE=true\n# Optional Replicate API key for icon generation\nREPLICATE_API_TOKEN=\u003cyour-replicate-api-token\u003e\n```\n\n\u003e Note: NEXT_PUBLIC_LOCAL_MODE disables the use of 3rd party services other than your modal provider.\n\n1. Install [node](https://nodejs.org/en) v21 or greater\n2. Install [bun](https://bun.sh/docs/installation)\n3. Run `bun install`\n4. Run `bun run dev`\n5. Navigate to `http://localhost:3000`\n\n## How does this work?\n\nWhen you enter a description of an application, an LLM is prompted to generate an HTML file that looks like a windows 98 application. This is done by injecting 98.css into the page as we stream in the result. This is rendered inside of an iframe that is rendered inside of a window.\n\nIn addition applications have access to a limited OS API that allows for saving/reading files, reading/writing from the registry, and prompting an LLM.\n\n## OS API\n\nThis is the api that applications have access to in case it helps with prompting:\n\n```typescript\ndeclare global {\n  // Chat lets you use an LLM to generate a response.\n  var chat: (\n    messages: { role: \"user\" | \"assistant\" | \"system\"; content: string }[]\n  ) =\u003e Promise\u003cstring\u003e;\n  var registry: Registry;\n\n  // If the application supports saving and opening files, register a callback to be called when the user saves/opens the file.\n  // The format of the file is any plain text format that your application can read. If these are registered the OS will create\n  // the file picker for you. The operating system will create the file menu for you.\n\n  // The callback should return the new content of the file\n  // Used like this:\n  // registerOnSave(() =\u003e {\n  //   return \"new content\";\n  // });\n  var registerOnSave: (callback: () =\u003e string) =\u003e void;\n\n  // Register a callback to be called when the user opens the file\n  // The callback should return the content of the file\n  // Used like this:\n  // registerOnOpen((content) =\u003e {\n  //   console.log(content);\n  // });\n  var registerOnOpen: (callback: (content: string) =\u003e void) =\u003e void;\n}\n\n// Uses for the registry:\n// - To store user settings\n// - To store user data\n// - To store user state\n// - Interact with the operating system.\n//\n// If the key can be written by other apps, it should be prefixed with \"public_\"\ninterface Registry {\n  get(key: string): Promise\u003cany\u003e;\n  set(key: string, value: any): Promise\u003cvoid\u003e;\n  delete(key: string): Promise\u003cvoid\u003e;\n  listKeys(): Promise\u003cstring[]\u003e;\n}\n```\n\n## Thanks\n\nI want to thank the following people:\n\n- [Scratch](https://x.com/DrBriefsScratch) - Inspired me by getting Windows 98 to run inside of a VM inside of Websim.\n- [Nate](https://x.com/nateparrott) - Nate and I independently started building the same project. Nate gave me the idea of \"chatting with the developer\" to change the program.\n- [Jordan](https://x.com/jdan) - Make 98.css which is the basis that makes this look like Windows 98.\n\n## Demos\n\nHere are a few examples of applications that can be created:\n\n\u003e Everything in Windows9X is a file you can generate a program to generate another program\n\nhttps://github.com/SawyerHood/windows9x/assets/2380669/cb6f5189-9276-4526-a517-7d84b3331ba7\n\n\u003e Here is an example of an application that is generated that in turn can generate websites.\n\nhttps://github.com/SawyerHood/windows9x/assets/2380669/7a9a0a32-d52d-4901-8f33-d7e148e8bee3\n\n\u003e Creating a natural language SQL prompter\n\nhttps://github.com/SawyerHood/windows9x/assets/2380669/ab404aa7-7018-4d07-96b4-4678ca388d10\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsawyerhood%2Fwindows9x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsawyerhood%2Fwindows9x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsawyerhood%2Fwindows9x/lists"}