@replohq/sdk is the package a Replo site imports to load store data, run a cart, emit analytics, and inject tracking scripts. Every Replo site is a Next.js app, and the SDK is what connects that app to your store.
You need it when you are editing site code directly, either by cloning the site’s repository or by pointing a coding agent at it. If you only build through chat, Replo writes these imports for you and you never touch the package.
Every import is a subpath
The SDK has no root export. Import from the specific module instead:ERR_PACKAGE_PATH_NOT_EXPORTED, including a path that points at a real source file but is not part of the published surface. When you are unsure, check the reference rather than guessing from the repository layout.
Do not add a file extension. @replohq/sdk/loaders/product-loader is correct; @replohq/sdk/loaders/product-loader.tsx is not.
What is in it
Setup
ReploProvider, siteConfig, and the Next.js glue every site mounts once.Data loaders
Products, collections, reviews, loyalty, and recommendations.
Cart
Add to cart, buy now, discount codes, and cart state.
Consent and scripts
Inject tracking scripts and gate them on visitor consent.
Working alongside the rest of the monorepo
A published site only has the SDK and its npm dependencies installed. Import types and values from@replohq/sdk and never from Replo’s internal packages, even when your editor offers them as a completion. An import from an internal package type-checks locally and then fails once the site builds on its own.
A few types cross an internal boundary and can appear widened in editor tooltips. Where that happens, the SDK re-exports its own version of the type, such as
FullProduct from @replohq/sdk/loaders/loader-schemas. Prefer those.Next steps
Install and upgrade
How the SDK reaches your site, and how versions move.
Clone your site
Get the repository on your machine to start editing.