morphyjs-cli
v0.1.4
Published
✨ Drop-in page transitions for React — works with Next.js, Vite, TanStack Router, and more
Maintainers
Readme
Morphy CLI (morphyjs-cli)
✨ Drop-in page transitions for React — shadcn-style component distribution.
morphyjs-cli is the official CLI to scaffold Morphy page transitions directly into your codebase. You own the code; no black-box dependencies.
🚀 Quick Start
1. Initialize Morphy in your project
Works with npm, pnpm, yarn, and bun:
# npm
npx morphyjs-cli init
# pnpm
pnpm dlx morphyjs-cli init
# yarn
yarn dlx morphyjs-cli init
# bun
bunx morphyjs-cli initThe interactive wizard will:
- Ask you to choose your framework adapter:
- Next.js App Router (
app/directory withFrozenRouter) - Next.js Pages Router (
pages/_app.tsx) - React Router / Vite (
react-router-dom) - TanStack / Universal (framework-agnostic)
- Next.js App Router (
- Ask where to place components (e.g.
components/morphyorsrc/components/morphy) - Let you pick which transitions to install (or select all 33 transitions)
- Check if required dependencies (
react,react-dom,framer-motion) are installed and offer to install missing ones - Scaffold the components and generate barrel exports (
index.ts) with helpful quickstart instructions
📦 Commands
morphyjs-cli init
Run the full setup wizard to configure Morphy in a project.
npx morphyjs-cli initmorphyjs-cli add [transitions...]
Chain-install additional transitions into an existing Morphy setup.
# Add specific transitions
npx morphyjs-cli add cube flip origami-unfold
# Add all transitions from a category
npx morphyjs-cli add --category spatial
npx morphyjs-cli add --category portal
npx morphyjs-cli add --category flow
# Add all 33 available transitions
npx morphyjs-cli add --allmorphyjs-cli list
List all 33 available transitions categorized with descriptions and emoji tags.
npx morphyjs-cli list🔄 Syncing CLI Templates
For contributors and maintainers:
To synchronize the CLI's templates and transition catalog with the latest source code in frontend/components/morphy:
cd cli
pnpm sync # or: npx tsx scripts/sync.ts
pnpm buildThis will:
- Recursively sync all core files, adapters, and transitions to
cli/templates/ - Re-scan metadata from transition
.tsxfiles - Automatically generate
cli/src/data/transitions.ts - Rebuild the single-file distribution bundle in
cli/dist/
