Skip to content

feat(bootstrap): create-zachflow auto-runs init wizard (M-3) - #27

Merged
hx2ryu merged 3 commits into
mainfrom
feat/v15-npx-auto-init
May 15, 2026
Merged

hx2ryu merged 3 commits into
mainfrom
feat/v15-npx-auto-init

Conversation

@hx2ryu

@hx2ryu hx2ryu commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • npx create-zachflow my-project now auto-runs scripts/init-project.sh when stdin is a TTY — collapses the three-step Quick start into a single command.
  • Non-TTY contexts (CI, piped stdin) and the new --no-init flag preserve the old "print guidance, exit" behavior. CI-flow example in README/MANUAL updated to use --no-init.
  • New offline smoke test (tests/create-zachflow-smoke.sh) covers both --no-init and non-TTY paths via a local bare clone. Wired into CI alongside a node --check gate.

Why

Install/setup UX review surfaced M-3 — the cd <dir> && bash scripts/init-project.sh second 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 branches
  • tests/init-project-smoke.sh — unchanged, still passes
  • node --check packages/create-zachflow/index.js — clean
  • CI passes on PR
  • Manual: npx create-zachflow ../scratch-test in an interactive terminal → wizard runs end-to-end

Backwards-compat

  • Users who scripted 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-init is the documented way to keep the old behavior interactively.

🤖 Generated with Claude Code

hx2ryu and others added 3 commits May 15, 2026 15:11
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>
@hx2ryu
hx2ryu merged commit 7bf1038 into main May 15, 2026
3 checks passed
@hx2ryu
hx2ryu deleted the feat/v15-npx-auto-init branch May 15, 2026 06:42
@hx2ryu hx2ryu mentioned this pull request May 15, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant