Skip to main content
The @tranthor/wizard CLI configures Tranthor in your codebase with a single command.

What It Does

  1. Authenticates your workspace in the browser and fetches your public write key.
  2. Detects your stack (Next.js App & Pages Router, React/Vite, Remix, Astro, SvelteKit, Nuxt/Vue, HTML/Blade/ERB templates, Node.js, iOS Swift, Android Kotlin, React Native).
  3. Configures your project:
    • Writes your public write key to .env or .env.local.
    • Adds the <script id="tr-tracker"> snippet (with automatic page and SPA route tracking) to your root layout.
    • Generates a zero-dependency typed helper (src/lib/tranthor.ts or .js) for identify, reset, canonical Commerce events (Product Viewed, Product Added, Cart Viewed, Checkout Started, Order Placed, Order Paid, TRANSACTION), and mobile push registration.
  4. Proposes event instrumentation diffs for your auth and checkout handlers, gated behind your confirmation in the terminal.
  5. Sends and verifies a test event end-to-end.

Commands & Flags

Using the Generated Helper