upload
The blocklet upload command uploads a packaged blocklet to a specified Blocklet Store, making it available for publication. This is a crucial step for distributing your blocklet to users. Before running this command, ensure you have already bundled your project using blocklet bundle and configured the target store with blocklet config.
Upload Workflow#
The upload process involves authenticating with the Blocklet Store and sending the packaged blocklet artifact. The CLI handles reading your local configuration and the blocklet's metadata to complete the request.
Usage#
blocklet upload [metaFile] [options]Arguments & Options#
Name | Type | Description |
|---|---|---|
|
| Optional. The path to the blocklet's metadata file ( |
|
| Your personal access token for authenticating with the Blocklet Store. This flag overrides any token set in the local configuration. |
|
| Specifies a configuration profile to use for the upload. This determines which store URL and credentials are loaded from your config file. Defaults to |
Authentication#
To upload a blocklet, you must provide a valid accessToken and have the storeUrl configured.
- Set the Store URL: Configure the target Blocklet Store you wish to upload to.
blocklet config set store https://store.arcblock.io - Provide an Access Token: An access token is required to authorize the upload. You can get this token from your developer profile page on the Blocklet Store. You can provide it in two ways:
blocklet config set accessToken <your-access-token>blocklet upload --access-token <your-access-token> - Option 1 (Recommended for local use): Set it globally in your CLI configuration.
- Option 2 (Ideal for CI/CD): Pass it directly as a command-line option.
If the token is missing or invalid, you will encounter a [NO-ACCESS] error.
Examples#
Standard Upload#
After bundling your blocklet, run upload from the project's root directory. The CLI will automatically find the necessary files and use your default configuration profile.
blocklet uploadExample Response (Successful Upload)
Upon a successful upload, the blocklet is staged in the store but not yet public. You need to publish it manually.
ℹ Upload using profile default to store https://store.arcblock.io
✔ Blocklet my-first-blocklet 1.0.0 successfully uploaded to https://store.arcblock.io!
ℹ Tips: You need to publish the blocklet at https://store.arcblock.io/developer/blocklets to make it public accessibleExample Response (Auto-Published)
If the store is configured to auto-publish uploads, you will see the following message.
✔ Blocklet my-first-blocklet 1.0.0 auto published successfully: https://store.arcblock.io/blocklets/z8iZufgru...wqsXh2NNext Steps#
Once your blocklet is uploaded, the next step is to publish it unless it was done automatically. For a complete overview of the distribution process, see the Publish a Blocklet guide.