@neilunderwood/e25sbl
v0.3.1
Published
CLI to install prebuilt website sections for Next.js projects
Maintainers
Readme
@neilunderwood/e25sbl
CLI to install prebuilt website sections for Next.js projects.
Installation
No installation required! Use with npx:
npx @neilunderwood/e25sbl initHow It Works
This CLI fetches components from a remote registry hosted on GitHub:
- Registry Repository: github.com/neilunderwood-e25/e25sbl-registry
- Browse Sections: e25sbl-registry.vercel.app (coming soon)
Components are always up-to-date - no need to reinstall the CLI to get new sections!
Usage
List available sections
See all sections in the registry:
npx @neilunderwood/e25sbl listInitialize your project
Create a components.json configuration file and install base styles:
npx @neilunderwood/e25sbl initThis will:
- Create
components.jsonwith default configuration - Install all style files from the registry to
app/styles/ - Set up component path:
components/ui - Configure import alias:
@/components - Link to registry: GitHub repository
Install a section
Install a section using either syntax:
npx @neilunderwood/e25sbl <section-id>or
npx @neilunderwood/e25sbl add <section-id>The section will be:
- Fetched from GitHub
- Transformed based on your config
- Installed to the configured path
- Assets (if any) copied to
public/assets/
Update styles
Re-download the latest styles from the registry:
npx @neilunderwood/e25sbl update-stylesThis will:
- Fetch all style files from the registry
- Update existing files with the latest versions
- Add any new style files that were added to the registry
- Show which files were updated vs newly added
Available Sections
Run npx @neilunderwood/e25sbl list to see all available sections from the registry.
Configuration
The components.json file controls where sections are installed and how imports are transformed:
{
"componentPath": "components/ui",
"aliases": {
"components": "@/components"
},
"registry": {
"url": "https://raw.githubusercontent.com/neilunderwood-e25/e25sbl-registry",
"branch": "main"
}
}You can manually edit this file to customize:
componentPath- Where to install sections (relative to project root)aliases.components- Import alias for component pathsregistry.url- Custom registry URL (for forks or private registries)registry.branch- Branch to fetch from (main, dev, etc.)
Caching
The CLI caches fetched components in .cache/e25sbl/ to work offline. The cache is automatically used if GitHub is unreachable.
Development
# Install dependencies
npm install
# Build the CLI
npm run build
# Test locally
node dist/cli.js init
node dist/cli.js add <section-id>License
MIT
