@crela/init
v1.0.1
Published
Set up Crela license verification in a Node.js or Electron project with one command.
Maintainers
Readme
@crela/init
Setup wizard for Crela creators: wires the licence SDK into a Node.js or Electron project in one step.
Usage
Run it in your project directory:
npx @crela/initThe tool:
- Detects your entry point and bundler
- Asks for your Crela API key (create one at crela.io/dashboard/creator/keys)
- Lists your tools to pick from
- Fetches the SDK marker via the API
- Injects
verifyOrExit()into your entry file - Writes
.envwithCRELA_SDK_MARKER - Patches
vite.config.tsautomatically (for Vite projects)
After that, just run npm run build.
Supported projects
- Node.js (CommonJS and ESM)
- Electron
- Vite-based projects (config patched automatically)
- esbuild / Webpack (instructions are printed)
For Rust and Tauri, use the crela-license crate directly. For any other language (.NET, Java, Python, C++, Go) there is no SDK — embed the marker as a compile-time constant, see crela.io/creator-guidelines#sdk.
API key via environment variable
export CRELA_API_KEY="crela_..."
npx @crela/init # no longer prompts for the keyDifferent API URL (for self-hosting)
export CRELA_API_URL="http://localhost:3010"
npx @crela/initLicence
MIT
