@creative-locator/create-locator
v0.1.1
Published
Scaffold a new headless Creative Locator project. Run `pnpm create @creative-locator/locator my-app` to bootstrap a Next.js / 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, 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 / 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 | 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. |
Templates
| Name | Stack | Locator package |
| ------------ | ---------------------------------- | -------------------------------------- |
| next | Next.js 15 (App Router) + React 19 | @creative-locator/react |
| astro | Astro 5 + @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:
.env(created from.env.example) holdingLOCATOR_API_URLandLOCATOR_LICENSE_TIER.- 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
