Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

Core Concepts


To use the Blocklet CLI effectively, it helps to understand a few fundamental concepts. This section provides an overview of the essential building blocks: how a Blocklet project is structured, how it's packaged for deployment, the standard development workflow, and how to manage configuration.

A solid grasp of these concepts will help you build, manage, and deploy your applications more efficiently.

The following diagram illustrates how these core concepts relate to each other within the development lifecycle:

Development Workflow

Foundation

Defines the application

Configures the environment

Provides target info

Provides registry info

From scratch or template

Generates project files

Ready for distribution

Packages the blocklet

Deploy to a Blocklet Server

Publish to Blocklet Store

Project Structure (blocklet.yml)

Configuration (config.yml, blocklet config)

Start a Project

blocklet init / create

blocklet dev (Develop & Test)

blocklet bundle

Deploy or Publish

blocklet deploy

blocklet upload


Project Structure#

Every Blocklet project is organized around a central manifest file, blocklet.yml. This file defines your application's metadata, dependencies, capabilities, and required interfaces. The CLI uses this file to understand how to build, run, and manage your Blocklet. A standardized directory layout ensures that components and assets are located consistently.

For a detailed look at the file layout and the blocklet.yml schema, see the Project Structure guide.

Bundling#

Before a Blocklet can be deployed, its source code, assets, and dependencies must be packaged into a distributable format. This process is called bundling. The Blocklet CLI provides several bundling modes—simple, zip, and compact—each designed for different use cases, from lightweight dependencies to self-contained applications.

To learn which mode is right for your project, refer to the Bundling guide.

Development Workflow#

The Blocklet CLI is designed to support the entire development lifecycle. A typical workflow starts with creating a new project using blocklet init or blocklet create, followed by local development using blocklet dev for features like hot-reloading. Once development is complete, you bundle the project and then deploy it to a Blocklet Server or upload it to a Blocklet Store.

For a step-by-step walkthrough, read the Development Workflow guide.

Configuration#

Configuration for Blocklet development is handled at two main levels. First, the CLI itself can be configured via blocklet config, where you can set your Blocklet Store endpoint and authentication keys. Second, the Blocklet Server instance where your applications run is managed by a config.yml file, which controls server-level settings like port, domain, and database connections.

To understand how to manage these settings, visit the Configuration guide.


With these concepts in mind, you are ready to start building. For a practical, hands-on tutorial, proceed to the Getting Started guide. To explore all available commands, see the Command Reference.