Answers about cli
Questions and answers from the Croct community about cli.
What version syntax can I use for slots in croct.json5?
ours has a plain "3" for a couple of slots and I want to know what else the version field accepts. Can I give a range, or a list of specific versions? And…
What does croct install actually do, and why a postinstall hook?
I ran the Croct CLI and noticed that croct install registered a postinstall hook in the project. Anything that hooks into the install step gets scrutiny from…
Running the Croct CLI in CI keeps asking me to log in, how do I automate it?
Trying to add a Croct CLI step to our pipeline and the step stops dead waiting for an interactive login. That obviously does not work in a headless runner, it…
Does croct init work on a Hydrogen storefront or do I wire everything manually?
We are starting a new Hydrogen storefront (Hydrogen 2026.4.0, Node 22.12) and I am evaluating Croct for personalization. The quick start mentions npx…
Should I commit the generated slots.d.ts or let it regenerate on each build?
Project uses typed slot content. The CLI generates a slots.d.ts file. Deciding between two options. gitignore it and regenerate in CI, or commit it. Not sure…
Modeling staging and production as separate environments in croct.json5
Setting up Croct for our two ecommerce brands and I want to get the environment model right from day one. The main requirement: experiments running on staging…
How long does it actually take to get a first personalized block live on Sanity?
I am comparing a few options for our Sanity stack and trying to be realistic about onboarding effort. We just came off a heavier tool that took the better…
How should croct.json5 version specifiers and slots.d.ts play with CI builds?
Setting up CI for a Next.js project and I want the Croct typing story fully deterministic. Three questions: How exactly do version specifiers in croct.json5…
Duplicate a proven experience setup into another workspace?
We run several brands, each in its own workspace. For brand A we have a returning-visitor experience that took real iteration to get right: the component, the…
CROCT_API_KEY ended up in a shared log, how do I rotate it without downtime?
On 2026-06-16 we found CROCT_API_KEY printed in a CI log from a debug step added in April. The log is internal but shared across teams, so per our policy the…
Upgrading @croct/plug-next across a major version, what usually breaks?
I maintain a Next.js app that has been on the same @croct/plug-next version for about a year. Reading through the changelogs before jumping the major, I can…
What exactly does the Sanity personalization template scaffold, and how do I extend it?
I ran the Sanity personalization template and it works, but I never ship a scaffold I do not understand, so I have been going through it file by file. What I…