Conversation
Move the platform-aware browser-open helper from login.ts to src/utils/browser.ts so it can be reused by the new connect command. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New interactive command that links a local repository to a Contentrain Studio project in a single flow: 1. Authenticate (resolveStudioClient) 2. Select or auto-detect workspace 3. Check GitHub App installation, open browser setup if missing 4. Detect git remote and match against accessible repos 5. Scan repository for .contentrain/ configuration 6. Create project and save workspace/project defaults Additions: - 5 new types: GitHubInstallation, GitHubRepo, ScanResult, CreateProjectPayload, GitHubSetupUrl - 5 new StudioApiClient methods: createProject, listGitHubInstallations, getGitHubSetupUrl, listGitHubRepos, scanRepository - connect.ts command with --workspace and --json flags - parseGitHubRepoFromUrl helper (SSH + HTTPS) - 14 new tests (5 client + 9 command/parser) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace 80 sequential git-branch process spawns with a single git update-ref --stdin call via spawnSync. The test was timing out at 30s and consuming excessive resources; it now completes in ~4s. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Root README: add studio login/connect to quick reference - CLI README: add connect to commands table and Studio Integration - docs/packages/cli.md: add Connecting a Repository section with 5-step flow, flags, and tip box - docs/studio.md: add Connecting from the CLI section - docs/getting-started.md: add connect to Team Workflows section Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for contentrain-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Summary
contentrain studio connect— new interactive command that links a local repo to a Contentrain Studio project in one flow: workspace selection → GitHub App installation → git remote detection →.contentrain/scan → project creationcreateProject,listGitHubInstallations,getGitHubSetupUrl,listGitHubRepos,scanRepositoryGitHubInstallation,GitHubRepo,ScanResult,CreateProjectPayload,GitHubSetupUrlopenBrowserrefactor — extracted fromlogin.tstosrc/utils/browser.tsfor reusegit branchspawns with singlegit update-ref --stdincall (30s timeout → ~4s)studio connectadded to root README, CLI README,docs/packages/cli.md,docs/studio.md,docs/getting-started.mdCommits
refactor(cli)— extract openBrowser to shared utilityfeat(cli)— add studio connect command + types + client methods + testsfix(cli)— batch branch creation in validate integration testdocs— add studio connect documentation across all doc layerschore— add changeset for cli minorTest plan
npx tsc --noEmit— 0 errorsnpx oxlint src/ tests/— 0 warnings, 0 errorsnpx vitest run— 117/117 tests pass (23 files, including 14 new tests)🤖 Generated with Claude Code