PoC: Local onboarding flow for circleci init#1201
Open
Fab10-CircleCi wants to merge 1 commit intomainfrom
Open
PoC: Local onboarding flow for circleci init#1201Fab10-CircleCi wants to merge 1 commit intomainfrom
Fab10-CircleCi wants to merge 1 commit intomainfrom
Conversation
When run without authentication, `circleci init` now scans the repository, detects the tech stack, runs tests locally in Docker, generates a .circleci/config.yml, and suggests CI optimizations. - Add cmd/onboard.go with the full local onboarding flow (steps 2-8) - Modify cmd/init.go to auto-detect auth state and gate local vs remote flow - Use envbuilder from chunk-cli for stack detection and Dockerfile generation - Hide Docker output behind timed spinners, show tail on failure - Generate valid CircleCI 2.1 config from detected environment - Add --verbose flag to stream Docker output for troubleshooting - Only generate config when tests pass (or Docker is skipped) Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
circleci initnow scans the repo, detects the tech stack, runs tests locally in Docker, generates.circleci/config.yml, and suggests CI optimizationschunk-cli/envbuilderfor stack detection and Dockerfile generation (builds on PR Import envbuilder #1198)What it does (Phase 1 steps 2-8)
.circleci/config.yml(only if tests pass)New flags
--local— force local-only mode even when authenticated--skip-docker— skip Docker build/test steps--skip-config— skip config generation--verbose— stream full Docker output for troubleshooting--dir— scan a different directoryFiles changed
cmd/onboard.go— new — core local onboarding logiccmd/init.go— modified — wires local flow as pre-step, restructures auth gatinggo.mod/go.sum— modified — addschunk-clidependencyTest plan
circleci init --local --skip-docker --dir <project>— detects stack, generates configcircleci init --local --dir <project>— full flow with Docker build + testcircleci init --local --verbose --dir <project>— streams Docker output🤖 Generated with Claude Code