Overview
The Blocklet Server Command Line Interface (CLI), packaged as @blocklet/cli
, is the primary tool for developers and administrators to manage Blocklet Server instances and individual blocklets from the command line. It provides a complete set of commands for the entire development and server management lifecycle.
The CLI is organized into two main command sets, each with a specific focus:
blocklet server
: For managing the Blocklet Server environment itself.blocklet
: For managing the lifecycle of individual blocklets (your applications).
This separation creates clear and distinct workflows for server administration and application development.
blocklet server
: Manage Your Server Instance#
The blocklet server
command set is used for administering the Blocklet Server node. It controls the core processes and the environment where your blocklets run.
Key functions include:
- Initialization: Setting up a new server with
blocklet server init
. - Process Control: Starting, stopping, and checking the status of the server daemon with
start
,stop
, andstatus
. - Maintenance: Viewing logs with
logs
, migrating the database withmigrate
, and upgrading the server to the latest version withupgrade
.
For a detailed guide, see the Server Management documentation.
blocklet
: Manage Individual Blocklets#
The blocklet
command is focused on the application development lifecycle. You will use these commands when creating, developing, packaging, and distributing your own blocklets.
Key functions are grouped by workflow:
- Project Setup: Bootstrap a project from a template with
create
or set up an empty project withinit
. - Local Development: Run a blocklet in a live-reloading development environment using
dev
. - Packaging & Versioning:
bundle
your blocklet's assets into a distributable package and manage its semantic version withversion
. - Distribution:
deploy
a blocklet directly to a server orupload
it to a Blocklet Store.
Explore these commands in the Blocklet Workflows section.
With these two command sets, you have full control over your Blocklet environment. To begin, proceed to the Getting Started guide to install the CLI and run your first server.