feat: add prismic init --no-setup to skip framework scaffolding#206
Merged
Conversation
Runs init normally but skips `Adapter.setupProject()` and dependency installation, so no `@prismicio/*` packages are added and no framework files are created. The repository, prismic.config.json, model sync, and type generation still run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tomaboro
approved these changes
Jul 1, 2026
# Conflicts: # src/commands/init.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #202
Description
Adds a
--no-setupflag toprismic initthat runs the full init flow but skips the framework scaffolding step, so it does not add the@prismicio/*packages or generate the framework files. This is for projects that write the Prismic client, pages, and route handlers by hand.--no-setupskips exactly whatprismic gen setupdoes:Adapter.setupProject()and dependency installation. Everything else still runs — creating or connecting the repository, writingprismic.config.json, migrating a legacyslicemachine.config.json, syncing models, and generating types.Checklist
Preview
How to QA 1
Run
prismic init --no-setupin a project. It should create the repository andprismic.config.json, sync models, and generate types, without adding@prismicio/*packages or creating framework files.Note
Low Risk
Opt-in CLI flag with default init behavior unchanged; only skips scaffolding and install when explicitly requested.
Overview
Adds
prismic init --no-setupfor hand-rolled Prismic integrations: init still connects or creates the repo, writesprismic.config.json, migrates legacy Slice Machine config when present, syncs models, and generates types, but skips framework scaffolding andnpm install.Adapter.initProjectnow accepts{ setup?: boolean }(defaulttrue). Whensetupis false,setupProject()is not called; slice index creation andonProjectInitialized()still run.An integration test asserts
--no-setupleavesprismic.config.jsonin place and does not add@prismicio/clientor run install (nopackage-lock.json).Reviewed by Cursor Bugbot for commit 3677d2d. Bugbot is set up for automated code reviews on this repo. Configure here.
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩