Proposal: Official CLI for a smoother transition from Web Editor to local development
Increasing access
An official CLI would lower the barrier for beginners transitioning from the Web Editor to local development. Currently, the setup friction of managing local files, folder structures, and dependencies can be a major "drop-off" point for new coders. By providing a standardized tool, we make local development more approachable and consistent for all users, regardless of their technical background.
Most appropriate sub-area of p5.js?
- [ ] Accessibility
- [ ] Color
- [ ] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [ ] Typography
- [ ] Utilities
- [ ] WebGL
- [x] Build process
- [ ] Unit testing
- [ ] Internationalization
- [ ] Friendly errors
- [ ] Other (specify if possible)
Feature request details
I propose an official, lightweight p5.js CLI tool to provide a unified path from the Web Editor to local development.
Key Features:
-
Project Scaffolding: Instantly generate a project folder with a local copy of p5.js, a ready-to-run index.html, sketch.js, and style.css.
-
Sensible Defaults: Templates that mirror Web Editor behavior for canvas sizing and DOM organization to ensure sketches "just work" when moved locally.
-
Editor Agnostic: Works in any terminal, allowing users to choose their own IDE (VS Code, Sublime, Vim, etc.) without losing the simplicity of the p5.js environment.
Implementation Strategy: The project could begin by auditing the existing VS Code Project Generator and other community tools to identify the most useful functionality. A lightweight Node.js scaffolding tool could then be developed to generate structures and manage the local p5.js dependency.
Welcome! š Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms.
For guidance on contributing, check out our contributing guidelines and other resources for contributors. š¬ If you have questions or need support, feel free to join the Processing Foundation Forum or visit our Community page. š Please also review our Code of Conduct to understand our community standards. Thank You!
Hey @Danyccsf is this available for contribution?
Thanks @yashgoyal0110 ! Iām checking with the maintainers/community about the next steps and will update the issue.
Thanks @yashgoyal0110 ! Iām checking with the maintainers/community about the next steps and will update the issue.
thanks @Danyccsf
Hi, thank you for the idea!
For any community-developed tools, you can create them separately (for example, @SableRaf made https://github.com/SableRaf/create-p5js which might be of interest as CLI p5.js project creation tool; the VS Code extensions are also community maintained). At the moment, I believe this is outside of the scope of the p5.js repository (which is focused on the library) and the p5.js editor repository (which is focused on the editor). If you do make a community-maintained tool, it could be added to the tools/add-ons directory (https://p5js.org/libraries/directory/) or to the education resources directory (https://p5js.org/education-resources/). Please note before making a PR tp the p5.js-website repository that the proposed resource or tool should work well, be usable out of the box, and preferably be used in the community. You are welcome to share your WIP or find collaborators in the community-tools section.
I also checked in with maintainer @davepagurek and @limzykenneth and we agree this can start as a community-developed tool. Additionally, most of the usecases are covered already by https://github.com/SableRaf/create-p5js . ~I'll keep this issue open for now, though, for other perspectives.~ EDIT: Given the coverage by existing tool, we decided to close this one as not planned.