Move CLI site data to dedicated config file#2731
Draft
bcotrim wants to merge 1 commit intostu-1350-decoupled-configfrom
Draft
Move CLI site data to dedicated config file#2731bcotrim wants to merge 1 commit intostu-1350-decoupled-configfrom
bcotrim wants to merge 1 commit intostu-1350-decoupled-configfrom
Conversation
Split site data from appdata-v1.json into a new CLI-owned config at ~/.studio/cli.json. Studio now reads sites exclusively via `studio site list` and _events. The CLI is the source of truth for site configuration. Auth tokens, snapshots, locale remain in appdata. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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.
Related issues
How AI was used in this PR
TBD
Proposed Changes
Splits CLI site configuration from
appdata-v1.jsoninto a dedicated~/.studio/cli.jsonfile. Site data is now CLI-owned; Studio reads sites exclusively viastudio site listand_eventscommand, making the CLI the single source of truth.Key changes:
apps/cli/lib/cli-config.tsmodule handles CLI-specific site config (version 1, sites array)getSiteByFolder,getSiteUrl,updateSiteLatestCliPid,clearSiteLatestCliPid,updateSiteAutoStart,removeSite~/.studio/cli.json.lockprevents blocking between site and auth operationsArchitecture benefits:
Testing Instructions
npm test -- apps/cli/npm run cli:build node dist/cli/main.js site create --name "test-site" node dist/cli/main.js site list --format json node dist/cli/main.js site delete~/.studio/cli.jsoninstead of appdataPre-merge Checklist