feat: add prismic env commands and active environment state#218
Draft
angeloashmore wants to merge 1 commit into
Draft
feat: add prismic env commands and active environment state#218angeloashmore wants to merge 1 commit into
prismic env commands and active environment state#218angeloashmore wants to merge 1 commit into
Conversation
Introduce CLI-owned active-environment state keyed by project path, stored in environments.json, plus the `prismic env set/unset/active/list` commands to manage it. `resolveEnvironment` is kept for now; existing commands are migrated to the new state in a follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2244cc0 to
bacccda
Compare
This was referenced Jul 8, 2026
prismic env commands and active environment resolutionprismic env commands and active environment state
This was referenced Jul 8, 2026
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:
Note
Base of a 3-PR stack that splits the environments work for reviewability:
prismic envcommands and active environment state #218 (this PR) — active-environment state +prismic envcommandsprismic/env/register#220 —prismic/env/registerpreload for running apps (stacked on feat: resolve commands against the active environment #219; itspr-220prerelease carries the full flow for testing)Description
Adds a
prismic envcommand group to choose which Prismic environment a project targets, and the state model behind it.A Prismic environment is a separate repository domain, so the active environment is just the repo domain the CLI targets by default. The CLI stores it in its config dir, keyed by project path. It does not touch
.envfiles.Commands
State
A flat
project path → environment domainmap:This PR only introduces the state and the management commands. Wiring the active environment into
push/pull/status/etc. is #219, and the app-side preload is #220.resolveEnvironmentis kept here and removed in #219.Checklist
Preview
How to QA 1
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. ↩