feat(bootstrap): create-zachflow auto-runs init wizard (M-3) - #27
Merged
Merged
Conversation
Collapses the three-step Quick start (npx → cd → bash) into a single command. The npx wrapper now spawns scripts/init-project.sh directly when stdin is a TTY; CI / piped stdin / explicit --no-init retains the previous "print guidance, exit" behavior. Add tests/create-zachflow-smoke.sh covering both --no-init and non-TTY paths via an offline local bare clone. Wire it into ci.yml alongside a node --check syntax gate. Addresses M-3 from the install/setup UX review — the cd + bash second step was the most common drop-off in the three-step flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR builds detach HEAD via actions/checkout, so `git symbolic-ref --short HEAD` exited 128 across all three OS runners. Materialize a local branch ref (`refs/heads/ci-smoke-head`) in the bare clone pointed at the current SHA instead — works for both detached and attached checkouts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI runners (Ubuntu/Windows) and fresh dev machines hit 'fatal: unable to auto-detect email address' on the initial commit because `git config --global user.name/email` was never run. create-zachflow now probes for git user.name/user.email (and the GIT_AUTHOR_* env vars), and injects 'zachflow init <init@zachflow.local>' only when neither is present. Users with an existing identity see no change to authorship. New smoke step 4/4 simulates the fresh-machine case (empty HOME, no system config, no env overrides) and asserts the commit lands. Co-Authored-By: Claude Opus 4.7 (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
npx create-zachflow my-projectnow auto-runsscripts/init-project.shwhen stdin is a TTY — collapses the three-step Quick start into a single command.--no-initflag preserve the old "print guidance, exit" behavior. CI-flow example in README/MANUAL updated to use--no-init.tests/create-zachflow-smoke.sh) covers both--no-initand non-TTY paths via a local bare clone. Wired into CI alongside anode --checkgate.Why
Install/setup UX review surfaced M-3 — the
cd <dir> && bash scripts/init-project.shsecond step is the most common drop-off in the three-command Quick start. Benchmark frameworks (hermes/ruflo/deer-flow) all run setup in one motion; zachflow now matches.Test plan
tests/create-zachflow-smoke.sh(new) — passes locally, both branchestests/init-project-smoke.sh— unchanged, still passesnode --check packages/create-zachflow/index.js— cleannpx create-zachflow ../scratch-testin an interactive terminal → wizard runs end-to-endBackwards-compat
npx create-zachflow ... && cd ... && bash ...keep working — stdin is non-TTY in pipes, so they automatically hit the old code path (with the same "Next steps:" output).--no-initis the documented way to keep the old behavior interactively.🤖 Generated with Claude Code