@creative-locator/create-locator
v0.2.2
Published
Scaffold a new headless Creative Locator project. Run `pnpm create @creative-locator/locator my-app` to bootstrap a Next.js / Nuxt / Astro / SvelteKit / SolidStart starter wired to a Creative Locator REST backend.
Maintainers
Readme
@creative-locator/create-locator
Scaffold a new headless Creative Locator project — Next.js, Nuxt, Astro, SvelteKit, or SolidStart.
A tiny CLI that gives you a working starter project pre-wired against a Creative Locator REST backend. Pick a framework, point it at your WordPress install, run pnpm dev.
Quick start
pnpm create @creative-locator/locator my-locatorThe CLI prompts for:
- Project name — becomes the target directory.
- Starter template — Next.js / Nuxt / Astro / SvelteKit / SolidStart.
- API URL — your Creative Locator REST endpoint (e.g.
https://example.com/wp-json/creative-locator/v1). - License tier —
free(default) orpro.
Then it writes the starter into ./my-locator/. From there:
cd my-locator
pnpm install
pnpm devNon-interactive
Pass every prompt as a flag and the CLI skips interaction entirely. Useful for CI scripts and AI scaffolding agents:
pnpm create @creative-locator/locator my-app \
--template next \
--api-url https://example.com/wp-json/creative-locator/v1 \
--license-tier pro| Flag | Short | Type | Notes |
| ----------------------- | ----- | --------------- | ---------------------------------------------------------- |
| --template <name> | -t | string | next | nuxt | astro | sveltekit | solidstart |
| --api-url <url> | -a | URL | Creative Locator REST base URL. |
| --license-tier <tier> | -l | free | pro | Defaults to free. |
| --help | -h | boolean | Show help text. |
| --version | -v | boolean | Show version. |
| --no-interactive | | boolean | Never prompt; a missing required flag is an error. |
Templates
| Name | Stack | Locator package |
| ------------ | ---------------------------------- | -------------------------------------- |
| next | Next.js 15 (App Router) + React 19 | @creative-locator/react |
| nuxt | Nuxt 4 + Vue 3.5 | @creative-locator/vue |
| astro | Astro 6 + @astrojs/react | @creative-locator/react (via island) |
| sveltekit | SvelteKit 2 + Svelte 5 (runes) | @creative-locator/svelte |
| solidstart | SolidStart + Solid.js | @creative-locator/solid |
Each starter is a runnable project with:
- A
.env.exampleholding the locator API URL + license tier under the framework's public-env naming (NEXT_PUBLIC_*,NUXT_PUBLIC_*,PUBLIC_*, …) — copy it to.envto override the scaffolded defaults. - A single
<DealerLocator />mount, gated to the client where the framework requires it (Leaflet is browser-only). - A
README.mdwalking through dev / build / deploy.
License
GPL-2.0-or-later
