@vzure/nextjs
v0.1.1
Published
Scaffolding CLI for the Vzure Next.js starter template — create a new app and generate pages, features, and components that follow the feature-based architecture.
Maintainers
Readme
@vzure/nextjs
Scaffolding CLI for the Vzure Next.js starter template. Generates pages, features, and components that follow the template's feature-based architecture, and can bootstrap a brand-new app.
Install
# one-off
npx @vzure/nextjs <command>
# or as a dev dependency in a project created from the template
npm i -D @vzure/nextjsCommands
Create a new app
npx @vzure/nextjs@latest create my-appOptions: --template <git-url>, --branch <name>, --pm <npm|pnpm|yarn>, --no-install, --force.
Add a page
Scaffolds a dashboard route plus its feature folder (api + endpoint, types, query hook) and a sidebar nav entry.
vzure add page # interactive
vzure add page --title "Invoices" --endpoint /invoices/ --yesMandatory: --title, --slug (defaults from title). Optional: --feature, --endpoint, --icon <LucideIcon>, --no-nav, --no-data.
Add a feature
vzure add feature billing --yesCreates features/<name>/{components,hooks,api.ts,types.ts}.
Add a component
vzure add component InvoiceRow --feature invoices
vzure add component PageHeader --shared --clientGlobal flags
--dry-run— print planned file writes/edits without touching disk.--force— overwrite existing files without prompting.--yes— accept default values for all optional prompts.--cwd <dir>— run against a specific directory instead of the current one.
How it finds your app
The add * commands look for the web app root — the nearest directory containing app/, features/, and components/ui/ (checks the current dir, then apps/web, then any apps/*). Create an optional vzure.config.json at the app or repo root to override:
{
"appDir": "apps/web",
"routeGroup": "(dashboard)",
"routeBase": "dashboard",
"defaultIcon": "FileText"
}