Repository navigation
feat(init): print a closing summary instead of logging each step - #865
Open
morinokami wants to merge 4 commits into
Open
morinokami wants to merge 4 commits into
morinokami wants to merge 4 commits into
Conversation
Init records the files it creates or changes and prints them once, right before the success line: one line for a new starter, the changed files for an existing project, or "No files changed". Next steps such as the Git hint and the DATABASE_URL note follow as "→" lines. A run that stops early, on a cancelled prompt or a failed step, prints what it had already changed as a warning. Skills are linked once per folder, so agents that share .agents/skills are all named and a conflict warns once. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8F8mZkyRDommrR2VQzcuN
setupTsconfig() recorded each change before it wrote the file, so a failed write still listed tsconfig.json as changed. It now records the changes once the write succeeds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8F8mZkyRDommrR2VQzcuN
This branch has not been deployed
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.
This PR changes how
void initreports its work. Init used to print one line for each step as it ran. It now records what it does and prints a short summary right before the success line.This follows #853 and #860. The dependency install still prints its full output here. More PRs will follow to shorten the rest of the
void initoutput in the style ofvp create.Changes
A summary instead of one line per step
Init printed a gray
◇line for every file it created or changed. Answered questions use the same◇, so the output did not show which lines were the user's answers and which were init's work. A new project also printed about 20 of these lines, most of them for the starter's files, which are all new.Steps now record their file changes, and init prints them once at the end:
+, then changed files with~and what changed in each.Warnings, and the notes that ask the user to do something by hand, still print where they did.
Next steps as
→linesHints for the user were spread through the log, as blue
●lines, as a box, or at the end of a◇line: theGit (optional)command, theDATABASE_URLnote of a PostgreSQL or MySQL starter, "Don't forget to install typescript", the lockfile hint, and theenv.tshints. Init used the same●for status lines and skipped steps, so the hints did not stand out. They now follow the summary as→lines. The lockfile hint is left out when init installs the dependencies itself."Bundled Void docs: node_modules/void/docs/" is gone. A new project's
AGENTS.mdpoints to the same docs, and so does the line that init prints when it skipsAGENTS.mdwithout a terminal.One line for linked skills
Init printed a header for each detected agent and a line for each skill. Amp, Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode read the same
.agents/skillsfolder, so with two of them the second block only said "already linked". Init now links each folder once and prints one line, such as "Linked Void skills for Codex and Cursor". A path that is in the way warns once, with its path.A run that stops early says what it changed
Without the step lines, a run that stops before the summary would leave its changes unmentioned. That matters in an existing project, which init configures before it asks its first question. When a prompt is cancelled or a step fails, init now prints a warning with the files it changed so far, or with the starter it created. It prints nothing if it changed nothing.
Before / after
Blank lines are omitted, and the starter's file lines and the install output are shortened.
New project, answering every question:
An existing Vite app with a
.claudefolder:void initagain in the same app:Ctrl+C at the first question of an existing app:
A new project whose install fails:
With
--framework vue --starter postgresql, theDATABASE_URLbox becomes a next step:Design decisions
InitReportthatrunInitCommand()passes down. Output that other commands share is unchanged: the Cloudflare and Void platform setup, and the config migration.void.config.tsappears once, with+. Files that the config migration creates are listed the same way.package.jsonsays "added void" where the old line said "Void dependencies and Vite scripts" for an app that already had both scripts.output.tsgetsprintDone(green✓) andprintNextStep(blue→). The last line is stillprintSuccess.process.exit()in several modules, so anexitlistener prints the early-stop warning. A failed step prints it before the error is rethrown, which keeps the error as the last line.--tsconfigand--githubruns check only part of the setup. When they change nothing, they print "No files changed." without "Void is already set up"..void-wrangler.jsonc, which Git ignores, the summary listsvoid.lock.json, which records the same change.Checked
init.test.ts(a new "init summary" group), and the newinit-report.test.tsandskills.test.tsvp checkandvp run check:typesvp test run): 824 files passed, 1 skippednode --test .github/scripts/packed-*.test.mjs, and the packed consumer with npm and pnpm (React) and with Vite+ (pnpm, React)void@1.10.0from npm) and after, for the flows above🤖 Generated with Claude Code