Project Setup
Setting up a new blocklet project is the first step in the development workflow. The Blocklet CLI provides two primary commands to help you get started, each suited for a different scenario. You can either bootstrap a new project from a template or initialize an existing directory as a blocklet.
Use this simple chart to decide which command is right for you:
Create Project#
The blocklet create
command is the fastest way to start a new blocklet. It bootstraps a complete project for you from a variety of starter templates. This is the recommended path if you are not converting an existing application.
This command will guide you through selecting a template and setting up the initial project structure and dependencies, getting you ready to code in minutes.
See the full guide on Creating a Project.
Initialize Project#
If you already have a web application or a directory with source code, the blocklet init
command can turn it into a valid blocklet project. It runs an interactive wizard to generate the blocklet.yml
metadata file and creates other necessary assets like blocklet.md
and a default logo.png
.
This command does not create a new project folder but rather populates the current directory with the required blocklet configuration.
See the full guide on Initializing a Project.
After successfully creating or initializing your project, you'll have a directory ready for development. The next step is to run your blocklet in a local environment to start building.
Continue to the Local Development guide to learn how to start the dev server, test your blocklet, and more.