Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
import { createRequire } from 'node:module'
// Resolve the CLI version from the package's own package.json at runtime rather
// than hardcoding it, so `spree --version` always reports the installed release.
// `../package.json` resolves the same whether this runs as the bundled
// `dist/index.js` or as `src/` source (tests), and npm always ships
// package.json in the published tarball.
const requirePackage = createRequire(import.meta.url)
export const VERSION: string = (requirePackage('../package.json') as { version: string }).version