puter
puter copied to clipboard
Web OS IDE
This idea is inspired by a discussion that took place on Puter's Discord server:
Develop a fully-featured, web-native Integrated Development Environment (IDE) tailored for Puter. Optionally this project can be turned into a collaborative one that can also be integrated into other WebOS platforms.
Details
Rationale for Building from Scratch
- Customization Limitations: Existing solutions, primarily VS Code, are very complicated to customize, limiting the ability to deeply integrate with Puter or WebOS platforms in general.
- Licensing Issues: Alternatives such as Eclipse Theia come with complex licensing, which can be problematic for our use case.
- Specific Requirements: A custom solution allows for better integration with Puter's or other web OS's unique features and workflows that may not be easily achievable with existing solutions.
Key Features
- Web-based Editor Core: Develop a powerful, extensible web-based code editor, building upon open-source components like Monaco Editor (used in VS Code) or CodeMirror.
- Extension/Plugin System: Implement a robust system for themes and extensions/plugins that supports multiple formats:
- Web API-based Plugins: Allow plugins to be developed and integrated via a web API, enabling a wide range of functionality and easy integration with Puter and other web services.
- (Optional) VS Code Extension Compatibility: Maintain support for VS Code extensions to leverage the existing ecosystem.
- Settings / Customization: Develop a settings system that allows to customize the behavior and appearance of the IDE.
- VS Code Settings Compatibility: Support VS Code settings files (settings.json) to allow users to easily migrate their preferred configurations.
- Settings Sync: Implement a settings sync feature compatible with VS Code's Settings Sync, allowing users to synchronize their settings, keybindings, and installed extensions across Puter accounts or from a GitHub repository or gist.
- Puter Integration: Create deep integration with Puter's file system, app deployment system, and other platform-specific features.
- Terminal with Shell Integration: Include a terminal interface within the IDE providing deep integration with Phoenix, Puter's shell, allowing users to run commands, scripts, and manage their Puter environment seamlessly.
- Collaborative Features: Implement real-time collaborative editing (coding sessions) and other team-oriented features that leverage the web-based nature of the IDE, allowing multiple users to work on the same project (simultaneously).
- Built-in AI Assistant: Incorporate an AI coding assistant (similar to GitHub Copilot or Continue) with multiple selectable LLM endpoints, leveraging Puter's built-in AI capabilities, to provide intelligent coding assistance like code suggestions, explanations, and help with debugging. Inspiration for an AI-augmented code editor could be taken from projects like cursor-codemirror.
- Git Integration: Incorporate Git-based version control features, leveraging Puter's integrated Git support, to allow users to manage repositories directly within the IDE.
- Debugging Tools: Implement debugging capabilities for various languages and frameworks, leveraging VS Code debug extensions where possible.
- Extension Marketplace: Create an ecosystem for community-developed extensions and themes to expand the IDE's capabilities, including easy installation of extensions/plugins.
- For VS Code extensions: Consider integration with Open VSX, an open registry for VS Code extensions, to provide a wide range of compatible extensions.
Optional Collaborative Development Approach
While the Puter IDE can be developed independently, there's an option to make this a collaborative project, as this is a huge endeavor:
- Open Source: Develop the project under an open-source license that is compatible with various WebOS projects.
- Modular Architecture: Design the IDE with a modular architecture that allows other WebOS developers to easily integrate, customize, and extend functionality for their specific platforms.
- Shared Governance: If pursued collaboratively, establish a governance model that allows participating WebOS projects to have a voice in the direction and development of the IDE.
- Community Contributions: Encourage contributions from the broader developer community, including individual developers, other WebOS projects, and relevant open-source initiatives like OWTA.
Goal
To create a powerful, flexible, and extensible web-based IDE tailored for Puter, providing a rich, VS Code-like experience for end-users while deeply integrating with Puter's unique features. Additionally, to design the project in a way that optionally allows for collaboration with other WebOS platforms, potentially benefiting the broader WebOS ecosystem.
Potential Future Enhancements
- WebAssembly support for improved performance of language servers and other compute-intensive tasks
- Integration framework for cloud services and deployment platforms
- Advanced debugging tools compatible with Puter's environment
- Cross-WebOS collaborative features (if pursued collaboratively), allowing users on different WebOS platforms to work together seamlessly
- Live Preview: Offer a live preview feature for web development projects, automatically updating as code changes.
Related
- https://github.com/HeyPuter/puter/issues/373
- https://github.com/HeyPuter/puter/issues/108
Thanks for the detailed write-up of the discord discussion. It's becoming more and more clear to me that we need a purpose-built IDE for Puter for the reasons you've summarized above. I'm working on a few UI components that could make the development of the IDE easier but if somebody wants to start work on the IDE they should do so and not wait for the components.
Super exciting ✌️
Wow this is an amazingly well drafted and comprehensive write-up! If I had any comments I would say that compatibility / interop with VSCode might be a more nice to have feature vs a requirement. A lot of people will have familiarity with VSCode but it does many things in an ideomatic way that might not jive with Puter's web based sensibilites. I would say instead of using VSCode as a guidebook, look at popular web based tools and try to do things the web native way.
@triptych Thank you for your feedback! I really appreciate it. I've taken your thoughts into account and made some updates to the proposal.
@jelveh What do you think about the idea to turn this into a collaborative project between multiple web OS communities?
@jelveh What do you think about the idea to turn this into a collaborative project between multiple web OS communities?
I'm fine with that. Is there any web os out there with FS/KV/AI support? I'm wondering what the API looks like.
I'm fine with that. Is there any web os out there with FS/KV/AI support? I'm wondering what the API looks like.
Pluto (not the one by stretch07 :D), for example, is a relatively well-developed system. It has an FS lib available, but (currently) no native KV and AI support. AI should be implemented relatively easily, potentially your KV implementation, maybe with some minor modifications, too. So also Pluto could profit from this.
daedalOS uses BrowserFS as its FS API according to the README (deprecated; active fork: ZenFS).
anuraOS uses Filer as FS API. ^1
Idea: The IDE system could be designed so that certain services don't necessarily need to be supported by the parent OS. For OSes that don't natively support KV and/or AI, the IDE could supplement these services.
This is why we need something like POSIX for web operating systems.
This is why we need something like POSIX for web operating systems.
You're absolutely right!
In your opinion, which services and features besides KV and AI should this Web-POSIX cover?
Well, FS for sure! We're adding more drivers which would be nice if standardized but we're also learning as we go.
Well, FS for sure! We're adding more drivers which would be nice if standardized but we're also learning as we go.
Oh, forgot the most important one. 😀
Btw: I discussed potential Web OS standardization with @stretch07 some time ago. I will think about how to integrate ideas from that with a Web-POSIX.
I'm fine with that. Is there any web os out there with FS/KV/AI support? I'm wondering what the API looks like.
Pluto (not the one by stretch07 :D), for example, is a relatively well-developed system. It has an FS lib available, but (currently) no native KV and AI support. AI should be implemented relatively easily, potentially your KV implementation, maybe with some minor modifications, too. So also Pluto could profit from this.
Hi! Pluto now has a KV store through the new Registry API https://github.com/zeondev/pluto/blob/main/docs/libs-and-components.md#registry. As for the AI feature, Pluto currently does not support any AI features directly through an API. For the app to be compatible, the user would have to add their own ai provider (e.g. openai, meta, ollama, etc.) probably making the user add an API key. We hope to maybe talk more about a specialized webOS specification that me and my developers are working on. Let me know if you have any questions.
Hi @ItsLap! I'd really like to know more about the specification that you and your team are working on.
This is why we need something like POSIX for web operating systems.
Filesystem wise there is the html5 filesystem API, I saw anura mentioned earlier in this thread and wanted to mention anura v2.0 (not prod version but available on beta.anura.pro) has a filesystem API compatible interface at anura.fs.whatwgfs
https://fs.spec.whatwg.org/
I will say I'm not the biggest fan of the API, but it is the standard for the browser and chrome and Firefox actually have it built in at navigator.storage.getDirectory(), the API is like to get /working/foo.txt you have to do handle = await (await (await navigator.storage.getDirectory())).getDirectoryHandle("working")).getFileHandle("foo.txt")
Since it's already included in major browsers (and already an html standard, no longer just a draft) I personally forsee this being the standard for browsers going on and think web environments which serve to contain multiple web apps should be using it
Edit: I should mention anura currently uses Filer as a backend to anura.fs but it can actually run off of opfs or Filesystem access API as well
@jelveh What do you think about the idea to turn this into a collaborative project between multiple web OS communities?
I'm fine with that. Is there any web os out there with FS/KV/AI support? I'm wondering what the API looks like.
Anura has a nodejs like FS interface at anura.fs and a whatwg html5 filesystem fs interface at anura.fs.whatwgfs. It also has a key value store at anura.settings.get() and anura.settings.set().
The one thing it doesn't have is an AI mainly because it doesn't align much with our goals, anura doesn't depend on any cloud services by design (browser OS, not cloud OS) and has a target hardware of a Dell Chromebook 3100, so running a local LLM is mostly infeasible.
I mentioned this on Discord but I'll mention it here as well to keep things in sync. The description on issue #289 is relevant to anything related to filesystem adapters on Puter. Any discussion about that should happen under that issue so we can keep things organized. Files on Puter have unique identifiers which apps aren't allowed to change (this is by design, and in contrast with lower-level OSes; consider vim changing the inode number of a file because of swapping), which has clear advantages but also will require careful consideration for compatibility.