blocklet connect
The blocklet connect command establishes a secure link between your local Blocklet CLI and a remote Blocklet Store. This authentication step is a prerequisite for publishing operations, such as blocklet upload.
The connection process uses DID Connect, ensuring that your credentials are handled securely through your DID Wallet without exposing any private keys to the CLI.
Usage#
blocklet connect <store_url> [options]Arguments#
Argument | Description |
|---|---|
| The full URL of the Blocklet Store you want to connect to. This must be a valid HTTPS or HTTP address. Example: |
Options#
Option | Description |
|---|---|
| Specifies a configuration profile for the connection. This allows you to manage multiple identities or store connections. If omitted, the |
Workflow#
The connection process involves a few steps, coordinating between the CLI and your browser for authentication.
Examples#
Connecting for the First Time#
To connect to the official Blocklet Store, run the following command:
blocklet connect https://store.blocklet.devThis command opens a new tab in your default web browser displaying a QR code. Use your DID Wallet to scan the code and approve the connection. Once you approve, the CLI will automatically receive the necessary credentials and save them to your local configuration.
Upon success, you will see a confirmation message in your terminal:
✔ Successfully connected, and now you are ready to upload blocklets to https://store.blocklet.dev
ℹ Tips: Use the following command to view the configuration: blocklet config listSwitching Stores or Reconnecting#
If you have already connected to a store and run the command again with a different store URL, the CLI will prompt you for confirmation before overwriting the existing settings.
blocklet connect https://store.example.comYou will see the following prompt:
? The store url has been set, do you need to overwrite it? (y/N)Enter y to proceed with the new connection, or n to cancel the operation and keep the existing configuration.
Configuration Management#
Upon a successful connection, the CLI saves the following information to your configuration file under the specified profile:
store: The URL of the connected Blocklet Store.accessToken: The secret key used for authenticated requests.developerDid: Your DID.name: Your name associated with the DID.email: Your email associated with the DID.
You can view your current configuration anytime by using the config command. For more details, refer to the blocklet config documentation.
blocklet config listAfter successfully connecting to a Blocklet Store, your CLI is authenticated and ready to interact with it. The next logical step is to package and upload your blocklet.
For more information, see the Publish a Blocklet guide or proceed directly to the blocklet upload command reference.