reviews block and follows it across each surface it appears on.
Blocks are copied, not installed as dependencies.
add writes the block’s source files into your project through the aliases in blocks.json. You own and can edit every file afterwards. Updates are opt-in through diff and add --overwrite. When you outgrow the catalog, build your own block.Goal
Install reviews as a block and confirm it runs everywhere it appears.Install the block
1
Discover the block
Search the registry and inspect what the block ships before you install it.
Terminal
view lists the block’s files by target (API, admin, vendor) and its dependencies.2
Install it
Run The CLI copies the source into the directories mapped by your
add to copy the block into your project.Terminal
blocks.json aliases and prints the block’s post-install instructions: module registration, middlewares, and migrations.3
Run migrations and codegen
The block introduced a reviews module. Generate and run its migrations, then refresh the typed route map.
Terminal
4
See it live
Start the project. Reviews now appear in the admin panel (moderation), the vendor portal (per-seller reviews), and the Store API (customer-facing review routes).
Verify
Check that the install landed cleanly:- Files: the block’s files exist in your repo under the alias-mapped paths.
- API: migrations ran cleanly and the API boots.
- Panels and store: the admin and vendor panels show their reviews pages, and the store review endpoints respond.
- No drift:
bunx @mercurjs/cli@latest diff reviewsreports no drift from the registry.
FAQ
What if I've already modified files the block wants to write?
What if I've already modified files the block wants to write?
The CLI asks before overwriting existing files, or you can force it with
--overwrite. If you have customized a page the block also ships, merge by hand. You are merging source, not resolving package versions.How do I update a block later?
How do I update a block later?
bunx @mercurjs/cli@latest diff reviews shows what changed in the registry since you installed. Take updates with add reviews --overwrite, then re-apply any local edits afterwards.