Skip to content

feat(instant-start): setup starter provisioned repo on init - #245

Merged
jomifepe merged 25 commits into
mainfrom
jp/instant-start-github-starter
Aug 4, 2026
Merged

feat(instant-start): setup starter provisioned repo on init#245
jomifepe merged 25 commits into
mainfrom
jp/instant-start-github-starter

Conversation

@jomifepe

@jomifepe jomifepe commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extend prismic init --repo to complete Instant Start local handoff for existing degit'd projects: reconnect config, sync models (skipping the whole sync when reconnect has update/delete conflicts), remove documents/, swap hosted preview for local Development preview, set the slice simulator URL, rename package.json to the repo when the starter package matches, and mark the onboarding step done
  • read starter provenance from the Repository API (starter.id, starter.revision, starter.framework, starter.deploymentUrl)
  • remove the prismic starter download command and GitHub archive zip extraction flow
  • use adapter-local preview and simulator URLs as the single source of truth during handoff (Next.js, Nuxt, SvelteKit)

Test plan

  • npm run test (lint, types, unit)
  • npm run unit -- test/init.test.ts (reconnect, model-conflict warnings, and Instant Start handoff e2e via website-generator/instant-start)

Made with Cursor

jomifepe and others added 15 commits July 20, 2026 17:45
Provide a single CLI flow to provision or export an Instant Start repository, download the starter, and set up local development.

Co-authored-by: Cursor <cursoragent@cursor.com>
Inline the command handler, use synchronous ZIP extraction, and drop the mock-heavy orchestration test while keeping focused API and filesystem coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: José Pereira <jomifepe@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the standalone init command and move the paired starter handoff into a dedicated starter download namespace with repository validation, pinned GitHub download, local preview setup, and post-extract documents cleanup.

Co-authored-by: Cursor <cursoragent@cursor.com>
Check for an existing localhost preview before adding one so rerunning the command does not create duplicate preview configs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep starter download independent from Website Generator while incorporating the latest CLI improvements.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the GitHub archive URL from persisted starter provenance instead of a hardcoded commit, and reject repositories without recorded revision metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
Build the GitHub archive URL directly from repository metadata and only reject repositories without starter provenance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/lib/starter.ts Outdated
@jomifepe
jomifepe marked this pull request as draft July 30, 2026 12:34
jomifepe and others added 4 commits July 30, 2026 16:38
Mark the Instant Start onboarding step complete only after the starter has been downloaded and configured locally, without failing setup if tracking fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
Read the deployment URL from repository starter metadata so download removes the exact preview configured during provisioning.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move Instant Start local setup to `prismic init --repo` for existing
projects, removing the dedicated starter download command and zip flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jomifepe jomifepe changed the title refactor(starter): download repository's pinned GitHub revision feat(instant-start): download repository's pinned GitHub revision Jul 31, 2026
@jomifepe jomifepe changed the title feat(instant-start): download repository's pinned GitHub revision feat(instant-start): setup starter provisioned repo on init Jul 31, 2026
These exports were removed during the starter download cleanup but are still
required by completeStarterHandoff, which broke TypeScript and runtime preview setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jomifepe jomifepe self-assigned this Jul 31, 2026
@jomifepe
jomifepe marked this pull request as ready for review July 31, 2026 17:50

@angeloashmore angeloashmore left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this! I found a few implementation issues, but the overall behavior checks out.

⚠️ #issue: Some of the code/file organization doesn't follow the project standards. I realize these aren't written anywhere, so I opened #249 to add them. I also opened a PR on top of this one to apply the organization changes: #250.

Comment thread src/lib/starter.ts Outdated
Comment thread src/commands/init.ts Outdated
…entions (#250)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1db41c1. Configure here.

Comment thread src/commands/init.ts
Comment thread src/commands/init.ts
Comment thread src/commands/init.ts
Comment thread src/commands/init.ts Outdated
jomifepe and others added 2 commits August 3, 2026 11:48
Derive local preview and simulator URLs from adapter config instead of
hardcoding Next.js values. Rename package.json to the repo when the local
project matches the starter template after handoff completes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jomifepe
jomifepe requested a review from angeloashmore August 3, 2026 12:07
Unskip starter handoff coverage now that instant-start provisioning
returns starter provenance in production, and delete seeded documents
before removing custom types in the no-models scenario.

Co-authored-by: Cursor <cursoragent@cursor.com>

@angeloashmore angeloashmore left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I left a few comments, but nothing blocking.

Comment thread src/commands/init.ts
Comment thread src/commands/init.ts Outdated
Comment thread src/lib/prismic/clients/repository.ts Outdated
Merge origin/main for #249 file organization. Keep starter schema on
slim repository client, move instantStart onboarding to onboarding.ts,
drop z.pipe transform in favor of z.nullish, and use dedent for model
conflict warning in init.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jomifepe
jomifepe merged commit 74454bd into main Aug 4, 2026
15 checks passed
@jomifepe
jomifepe deleted the jp/instant-start-github-starter branch August 4, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants