@shashank-portfolio/cli
v0.5.0
Published
Copy portfolio UI components into your Next.js or Vite + React project
Maintainers
Readme
@shashank-portfolio/cli
Copy portfolio UI components into Next.js or Vite + React projects — similar to shadcn/ui and React Bits.
Quick start
# One-off — no install required
npx @shashank-portfolio/cli add text-invert --framework next
# Or install globally and use shashank-ui
npm i -g @shashank-portfolio/cli
shashank-ui add text-invert --framework nextThen install peer dependencies (the CLI prints the exact command):
npm install gsap @gsap/reactAvailable components
| Component | Description |
|-----------|-------------|
| text-invert | Scroll-driven headline color wipe (GSAP + CSS) |
| portrait-morph | WebGL hover image transition (OGL) |
| letter-swap | 3D per-character hover letter flip |
| stack | Physics-driven draggable tech chips (Matter.js) |
| customer-stats | Avatar pill with animated counter |
| tech-loop | Expandable tech stack pills with logos |
| contact-button | Hover-reveal copy email CTA |
| infinity-card-swap | GSAP card stack swap interaction |
Commands
npx @shashank-portfolio/cli list
npx @shashank-portfolio/cli add <component> --framework next
npx @shashank-portfolio/cli add <component> --framework viteOptions
| Flag | Description |
|------|-------------|
| --framework next \| vite | Target framework (auto-detected when possible) |
| --cwd <path> | Project root |
| --alias @ | Import alias prefix (default: @) |
| --force | Overwrite existing files |
Config (optional)
shashank-ui.json in your project root:
{
"framework": "vite",
"alias": "@"
}Local development
cd packages/cli
npm run build
node dist/index.js list
node dist/index.js add portrait-morph --framework next --cwd /path/to/test-app --forcePublish to npm
npm login
npm publishpublishConfig.access is set to public for the scoped package.
Registry structure
Each component lives under registry/<name>/:
registry/text-invert/
├── manifest.json # files, targets, dependencies
├── split-text.ts
├── text-invert.ts
├── use-text-invert.ts
└── text-invert.cssAdd a new component by copying source files + a manifest.json, bump the version, and npm publish.
