npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

motion-blocks

v0.1.0

Published

CLI for the Motion Blocks registry — install, build, and inspect animated Web Component items.

Readme

Motion Blocks CLI

Install animated Web Components from the Motion Blocks registry into Astro, React, Next.js, SvelteKit, Vue, or plain Vite projects.

The npm package is motion-blocks and it exposes the motion-blocks command.

Requirements

  • Node.js >=22.12.0
  • A project using pnpm, npm, yarn, or bun

Quick start

Run the CLI from your project root:

# pnpm
pnpm dlx motion-blocks init
pnpm dlx motion-blocks add magnetic

# npm
npx motion-blocks init
npx motion-blocks add magnetic

# yarn
yarn dlx motion-blocks init
yarn dlx motion-blocks add magnetic

# bun
bunx --bun motion-blocks init
bunx --bun motion-blocks add magnetic

motion-blocks init detects your framework and package manager, writes motion-blocks.json, and applies small project patches when needed.

motion-blocks add <name> downloads the component source files, resolves registry dependencies, installs required npm packages, and prints a usage snippet for your framework.

Commands

motion-blocks init

Create motion-blocks.json for the current project. When a config file already exists, the CLI prompts for confirmation unless you supply the --overwrite flag to force replacement. The --dry-run flag shows the overwrite action without writing, and --verbose prints diagnostic information.

Options:

  • --overwrite replaces an existing config file without prompting
  • --cwd <path> runs against another directory
  • --dry-run prints what would happen without writing files
  • --verbose prints diagnostic output
motion-blocks add magnetic
motion-blocks add magnetic card-stack

Install one or more registry items. After running, the CLI prints a summary showing counts grouped by outcome (created, updated, skipped, identical) so you know what to expect when installation completes.

Options:

  • --no-install skips package-manager dependency installation
  • --overwrite replaces existing installed files
  • --yes auto-confirms dependency installation without prompting
  • --diff [path] prints unified diffs for files that would change, then exits without writing; accepts an optional path parameter
  • --view [path] prints incoming file content (or asset metadata), then exits without writing; accepts an optional path parameter
  • --cwd <path> runs against another directory
  • --dry-run prints what would happen without writing files
  • --verbose prints diagnostic output

The add command detects non-interactive environments (CI or piped stdin) and will automatically skip writing conflicting files unless --overwrite is provided. For CI/CD workflows, include --overwrite to force file replacement.

motion-blocks list
motion-blocks list interaction
motion-blocks list --all
motion-blocks list --type registry:component

List items from the configured registry catalog.

motion-blocks info

Show detected project information and the active Motion Blocks configuration.

motion-blocks build
motion-blocks build --check

Maintainer command for registry authors. It validates source manifests and regenerates static registry payloads in public/r. Use --check to validate without writing files.

Configuration

The CLI reads motion-blocks.json from your project root.

{
  "$schema": "https://motionkit.org/schemas/motion-blocks.json",
  "registry": "https://motionkit.org/r",
  "framework": "astro",
  "packageManager": "pnpm",
  "componentsDir": "src/components/motion-blocks",
  "helpersDir": "src/lib/motion-blocks"
}

Fields:

  • registry: base URL for registry payloads
  • framework: astro, next, react, vue, nuxt, svelte, sveltekit, or plain
  • packageManager: pnpm, npm, yarn, or bun
  • componentsDir: where component source files are written
  • helpersDir: where shared helper files are written

Using installed components

Installed items are Web Components. Import the generated element module once in client-side code, then use the custom element in your markup.

import "./components/motion-blocks/magnetic-element";
<motion-magnetic>
  <button type="button">Hover me</button>
</motion-magnetic>

React and TypeScript projects may need custom element typings if JSX reports an unknown intrinsic element.

Common workflows

Preview what a command will change:

motion-blocks add magnetic --dry-run

Install without automatically installing npm dependencies:

motion-blocks add magnetic --no-install

Run against another project directory:

motion-blocks info --cwd ./templates/astro
motion-blocks add magnetic --cwd ./templates/astro

Inspect the public registry before installing:

motion-blocks list
motion-blocks list --all

Links

  • Docs: https://motionkit.org/docs
  • Registry: https://motionkit.org/r/registry.json
  • Package source: https://github.com/predo-soares/motion-kit/tree/main/packages/motion-blocks-cli