bahrawy
v0.2.0
Published
Add Bahrawy components to your project — copy, paste, ship.
Maintainers
Readme
bahrawy
CLI for installing components from the Bahrawy / Picks library straight into a shadcn-ready Next.js project.
Use
# pick interactively from every available component
npx bahrawy add
# or name them
npx bahrawy add halo profile-card schema
# list everything
npx bahrawy listnpx bahrawy add <name> does, for each component:
- Checks that your project has a shadcn setup (
components.jsonorcomponents/uimust exist — runnpx shadcn@latest initfirst if not). - Downloads the component source from this repo via raw.githubusercontent
into
components/bahrawy/<name>.tsx(orcomponents/bahrawy/<name>/for multi-file components). - Copies any missing shared files (
lib/utils.ts, etc.). - Installs the npm dependencies it needs (
framer-motion,three,ogl,gsap, etc.) using your detected package manager (bun / pnpm / yarn / npm). - Runs
shadcn addfor any required shadcn primitives.
Develop
# regenerate the registry from the actual component files in ../components/bahrawy
npm run generate
# compile to dist/
npm run build
# run the local source against any directory (useful for testing)
npm run dev -- add halo --cwd /path/to/test-projectPublish
The registry is auto-generated from the parent repo's components/bahrawy/*
on every build via the prepublishOnly hook, so the registry can't drift.
# from the repo root
cd cli
# bump the version
npm version patch # or minor / major
# publish to npm (requires `npm login`)
npm publish --access publicAfter publishing, anyone can run npx bahrawy add <component> against the
latest published version.
