Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

docs(v2): update CLI references to use @mercurjs/cli@canary

vholik0cbc8c66b05b
diff --git a/apps/docs/v2/developer-guide/api-client.mdx b/apps/docs/v2/developer-guide/api-client.mdx
index 3f89c55c0..30a24c1b0 100644
--- a/apps/docs/v2/developer-guide/api-client.mdx
+++ b/apps/docs/v2/developer-guide/api-client.mdx
@@ -25,7 +25,7 @@ export const client = createClient<Routes>({
```
<Info>
- The `Routes` type is generated from your backend using `@mercurjs/cli
+ The `Routes` type is generated from your backend using `@mercurjs/cli@canary
codegen`. This gives the client full type safety with zero manual type
definitions.
</Info>
diff --git a/apps/docs/v2/developer-guide/blocks.mdx b/apps/docs/v2/developer-guide/blocks.mdx
index 9e739ee04..f83d04d30 100644
--- a/apps/docs/v2/developer-guide/blocks.mdx
+++ b/apps/docs/v2/developer-guide/blocks.mdx
@@ -10,8 +10,8 @@ Blocks are the unit of distribution in Mercur. Each block is a self-contained fe
## Installing blocks
```bash
-npx @mercurjs/cli add reviews
-npx @mercurjs/cli add wishlist product-import-export
+npx @mercurjs/cli@canary add reviews
+npx @mercurjs/cli@canary add wishlist product-import-export
```
The CLI fetches the block from the [registry](/v2/developer-guide/registry), resolves dependencies, transforms imports to match your project's path aliases, and copies the files into the right directories.
@@ -70,20 +70,20 @@ After adding a block, the CLI shows setup instructions. Typically you need to:
1. **Register the module** in `medusa-config.ts`
2. **Add middlewares** to your `api/middlewares.ts`
3. **Run migrations** with `npx medusa db:generate` and `npx medusa db:migrate`
-4. **Regenerate types** with `npx @mercurjs/cli codegen`
+4. **Regenerate types** with `npx @mercurjs/cli@canary codegen`
## Updating blocks
Check for changes against the registry:
```bash
-npx @mercurjs/cli diff reviews
+npx @mercurjs/cli@canary diff reviews
```
If there are updates you want, re-install with the overwrite flag:
```bash
-npx @mercurjs/cli add reviews --overwrite
+npx @mercurjs/cli@canary add reviews --overwrite
```
Since blocks are source code in your project, you control when and how updates are applied.
@@ -93,12 +93,12 @@ Since blocks are source code in your project, you control when and how updates a
Search the registry to see what's available:
```bash
-npx @mercurjs/cli search
-npx @mercurjs/cli search --query wishlist
+npx @mercurjs/cli@canary search
+npx @mercurjs/cli@canary search --query wishlist
```
View details about a specific block:
```bash
-npx @mercurjs/cli view reviews
+npx @mercurjs/cli@canary view reviews
```
diff --git a/apps/docs/v2/developer-guide/cli.mdx b/apps/docs/v2/developer-guide/cli.mdx
index 6dcf85743..cfa43fbe0 100644
--- a/apps/docs/v2/developer-guide/cli.mdx
+++ b/apps/docs/v2/developer-guide/cli.mdx
@@ -5,12 +5,12 @@ description: "Install blocks, scaffold projects, and generate types from the com
<Snippet file="canary-warning.mdx" />
-The Mercur CLI (`@mercurjs/cli`) manages your marketplace project — creating projects, installing blocks, generating types, and checking for updates.
+The Mercur CLI (`@mercurjs/cli@canary`) manages your marketplace project — creating projects, installing blocks, generating types, and checking for updates.
## Installation
```bash
-npm install -g @mercurjs/cli
+npm install -g @mercurjs/cli@canary
```
## Commands
@@ -20,7 +20,7 @@ npm install -g @mercurjs/cli
Scaffold a new Mercur project from a template.
```bash
-npx @mercurjs/cli create my-marketplace
+npx @mercurjs/cli@canary create my-marketplace
```
The CLI will prompt you for database credentials and install dependencies automatically.
@@ -37,7 +37,7 @@ The CLI will prompt you for database credentials and install dependencies automa
Initialize an existing project by creating a `blocks.json` configuration file.
```bash
-npx @mercurjs/cli init
+npx @mercurjs/cli@canary init
```
This sets up path aliases so the CLI knows where to place blocks in your project:
@@ -65,8 +65,8 @@ This sets up path aliases so the CLI knows where to place blocks in your project
Install blocks from the registry into your project.
```bash
-npx @mercurjs/cli add wishlist
-npx @mercurjs/cli add product-review order-tracking
+npx @mercurjs/cli@canary add wishlist
+npx @mercurjs/cli@canary add product-review order-tracking
```
Blocks are copied directly into your project as source code. The CLI resolves dependencies, transforms imports to match your path aliases, and installs required packages.
@@ -82,7 +82,7 @@ Blocks are copied directly into your project as source code. The CLI resolves de
Find available blocks in the registry.
```bash
-npx @mercurjs/cli search --query wishlist
+npx @mercurjs/cli@canary search --query wishlist
```
| Option | Description |
@@ -95,7 +95,7 @@ npx @mercurjs/cli search --query wishlist
Display detailed information about a block.
```bash
-npx @mercurjs/cli view wishlist
+npx @mercurjs/cli@canary view wishlist
```
### diff
@@ -103,13 +103,13 @@ npx @mercurjs/cli view wishlist
Compare local blocks against registry versions to check for updates.
```bash
-npx @mercurjs/cli diff wishlist
+npx @mercurjs/cli@canary diff wishlist
```
If there are changes you want, update with:
```bash
-npx @mercurjs/cli add wishlist --overwrite
+npx @mercurjs/cli@canary add wishlist --overwrite
```
### codegen
@@ -117,7 +117,7 @@ npx @mercurjs/cli add wishlist --overwrite
Generate TypeScript types from your API routes. Used by the [API Client](/v2/developer-guide/api-client) for type-safe requests.
```bash
-npx @mercurjs/cli codegen
+npx @mercurjs/cli@canary codegen
```
| Option | Description |
@@ -129,7 +129,7 @@ npx @mercurjs/cli codegen
Build a custom registry from a `registry.json` file.
```bash
-npx @mercurjs/cli build
+npx @mercurjs/cli@canary build
```
| Option | Description |
@@ -142,7 +142,7 @@ npx @mercurjs/cli build
Display project configuration and diagnostics.
```bash
-npx @mercurjs/cli info
+npx @mercurjs/cli@canary info
```
### telemetry
@@ -150,8 +150,8 @@ npx @mercurjs/cli info
Control anonymous usage data collection.
```bash
-npx @mercurjs/cli telemetry --disable
-npx @mercurjs/cli telemetry --enable
+npx @mercurjs/cli@canary telemetry --disable
+npx @mercurjs/cli@canary telemetry --enable
```
## Custom registries
@@ -170,5 +170,5 @@ Add custom block registries to your `blocks.json`:
Use `{name}` as a placeholder for block names. Reference custom registries with the `-r` flag:
```bash
-npx @mercurjs/cli search --query review --registry @my-registry
+npx @mercurjs/cli@canary search --query review --registry @my-registry
```
diff --git a/apps/docs/v2/developer-guide/overview.mdx b/apps/docs/v2/developer-guide/overview.mdx
index 915f5f9c8..059db49d9 100644
--- a/apps/docs/v2/developer-guide/overview.mdx
+++ b/apps/docs/v2/developer-guide/overview.mdx
@@ -160,7 +160,7 @@ This means:
- There are no hidden abstractions or version conflicts
- Updates are explicit — you diff and apply changes from the registry
-The CLI (`@mercurjs/cli`) manages this process: scaffolding projects, installing blocks, searching the registry, and comparing local changes against upstream versions.
+The CLI (`@mercurjs/cli@canary`) manages this process: scaffolding projects, installing blocks, searching the registry, and comparing local changes against upstream versions.
## Design principles
diff --git a/apps/docs/v2/developer-guide/registry.mdx b/apps/docs/v2/developer-guide/registry.mdx
index 12903ac31..d67d6770a 100644
--- a/apps/docs/v2/developer-guide/registry.mdx
+++ b/apps/docs/v2/developer-guide/registry.mdx
@@ -9,7 +9,7 @@ A registry is a collection of blocks that can be installed into any Mercur proje
## How it works
-A registry is a set of JSON files — one per block — served over HTTP. When you run `npx @mercurjs/cli add`, the CLI fetches the block's JSON, resolves its dependencies, and copies the source files into your project.
+A registry is a set of JSON files — one per block — served over HTTP. When you run `npx @mercurjs/cli@canary add`, the CLI fetches the block's JSON, resolves its dependencies, and copies the source files into your project.
```
registry/
@@ -64,7 +64,7 @@ The `registry.json` file defines your registry and all its blocks:
| Property | Description |
| ---------------------- | -------------------------------------------------------------- |
-| `name` | Block identifier used in `npx @mercurjs/cli add` |
+| `name` | Block identifier used in `npx @mercurjs/cli@canary add` |
| `description` | Short description shown in search results |
| `dependencies` | NPM packages to install |
| `registryDependencies` | Other blocks this block depends on (e.g. `@mercurjs/wishlist`) |
@@ -93,7 +93,7 @@ These map to the aliases defined in the consumer's `blocks.json`.
Build your registry into distributable JSON files:
```bash
-npx @mercurjs/cli build
+npx @mercurjs/cli@canary build
```
This reads `registry.json`, resolves all imports for each block, embeds the file contents, and outputs one JSON file per block to the `r/` directory.
@@ -124,7 +124,7 @@ Add your registry to `blocks.json` in any Mercur project:
Use `{name}` as a placeholder for block names. Then install blocks from it:
```bash
-npx @mercurjs/cli add @my-org/reviews
+npx @mercurjs/cli@canary add @my-org/reviews
```
### Authentication
diff --git a/apps/docs/v2/getting-started/concepts.mdx b/apps/docs/v2/getting-started/concepts.mdx
index 94d71bf25..5c39be09c 100644
--- a/apps/docs/v2/getting-started/concepts.mdx
+++ b/apps/docs/v2/getting-started/concepts.mdx
@@ -59,7 +59,7 @@ A registry is a collection of blocks available for installation. The official Me
## CLI
-The [Mercur CLI](/v2/developer-guide/cli) (`@mercurjs/cli`) manages your project — scaffolding from templates, installing blocks, searching registries, generating types, and diffing local changes against upstream versions.
+The [Mercur CLI](/v2/developer-guide/cli) (`@mercurjs/cli@canary`) manages your project — scaffolding from templates, installing blocks, searching registries, generating types, and diffing local changes against upstream versions.
## Dashboard SDK
@@ -67,4 +67,4 @@ The [Dashboard SDK](/v2/developer-guide/extending-panels) (`@mercurjs/dashboard-
## API Client
-The [API Client](/v2/developer-guide/api-client) (`@mercurjs/client`) provides type-safe access to all Mercur API endpoints. Types are generated from your actual API routes using `npx @mercurjs/cli codegen`, so requests and responses are always in sync with your backend.
+The [API Client](/v2/developer-guide/api-client) (`@mercurjs/client`) provides type-safe access to all Mercur API endpoints. Types are generated from your actual API routes using `npx @mercurjs/cli@canary codegen`, so requests and responses are always in sync with your backend.
diff --git a/apps/docs/v2/getting-started/installation.mdx b/apps/docs/v2/getting-started/installation.mdx
index 0231e11d4..564658c06 100644
--- a/apps/docs/v2/getting-started/installation.mdx
+++ b/apps/docs/v2/getting-started/installation.mdx
@@ -16,7 +16,7 @@ description: "Install Mercur and set up your marketplace project."
Use the Mercur CLI to scaffold a new project:
```bash
-npx @mercurjs/cli create my-marketplace
+npx @mercurjs/cli@canary create my-marketplace
```
The CLI will guide you through template selection and database configuration.
@@ -26,7 +26,7 @@ The CLI will guide you through template selection and database configuration.
If you have an existing Medusa project, initialize Mercur in it:
```bash
-npx @mercurjs/cli init
+npx @mercurjs/cli@canary init
```
This creates a `blocks.json` configuration file in your project.
@@ -36,13 +36,13 @@ This creates a `blocks.json` configuration file in your project.
Install blocks from the registry:
```bash
-npx @mercurjs/cli add <block-name>
+npx @mercurjs/cli@canary add <block-name>
```
Browse available blocks:
```bash
-npx @mercurjs/cli search
+npx @mercurjs/cli@canary search
```
## Run database migrations