CLI
Install the NerionX CLI, configure credentials, and provision databases and env files for your pharmacy.
NerionX CLI
Configure Hub credentials once in ~/.nerionx/config.json, then provision each approved pharmacy. The CLI creates the Spoke database, runs migrations, and writes .env.<slug> with database URL, brand ID, and API key placeholders.
Workflow
- Build the CLI from the monorepo and set hubUrl + apiKey
- Run
nerionx provisionwith your approved slug - Load
.env.<slug>and start the Spoke dev server - Sync catalog via Hub API, then test checkout end-to-end
Commands & scripts
Install from monorepo
# From the NerionX repo root
pnpm install
pnpm --filter @nerionx/cli build
# Optional: link globally
node packages/cli/bin/nerionx.js --helpConfigure CLI
nerionx config set hubUrl http://localhost:9000
nerionx config set apiKey nx_live_your_key
nerionx config set defaultSlug city-pharmacy
nerionx config getProvision after approval
nerionx provision \
--slug city-pharmacy \
--locale en \
--domain city-pharmacy.localStart the brand server
env $(grep -v '^#' .env.city-pharmacy | xargs) \
pnpm --filter @nerionx/spoke devCommand reference
nerionx config set|get— Persist hubUrl, apiKey, and defaultSlug in ~/.nerionx/config.jsonnerionx provision— Post-approval deploy — Spoke DB, migrations, .env.<slug>, Hub wiringnerionx brand:create— Lower-level Spoke provisioning without Hub syncnerionx hub status— Verify Hub connectivity before provisioningnerionx ssl check|request— DNS and SSL checklist for production domainsnerionx theme export|import— Sync design tokens between dashboard and Brand Kit