fix(cli): re-sync adopted gate on re-init and complete per-command help - #25
Merged
Merged
Conversation
- gateEnabled defaulted to state A only, so re-running init on an already-adopted repo (state C) never re-synced the gate config and printed nothing; init now detects the existing cospec: task and re-syncs, with a never-silent receipt hint on every path. - An empty mise.toml write (no gate config previously present) is now reported instead of silently succeeding with no output. - Per-command --help now lists that command's own flags instead of the generic top-level flag list. - `cospec <cmd> help` is now equivalent to `cospec <cmd> --help`, and init rejects a bare `help` positional instead of treating it as a target directory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4 tasks
replygirl
added a commit
that referenced
this pull request
Jul 16, 2026
* fix(cli): show templates --schema flag in per-command help The COMMANDS table entry for `templates` had no `options` field, so `cospec templates --help` never showed its real --schema <name> flag (PR #25 missed this one). Add the missing options metadata and a regression test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: archive templates-help-schema-flag Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <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.
Root cause
gateEnableddefaulted to detecting only state A (fresh init). Re-runningcospec initon a repo that had already adopted the gate (state C — anexisting `cospec:` task in `mise.toml`) never re-synced the gate config
and printed nothing, making PR #24's merge-into-existing-`mise.toml` fix
unreachable on re-init.
Fixes
and re-syncs the gate config on re-init, with a never-silent receipt
hint printed on every path (fresh init, re-sync, no-op).
with no prior `mise.toml` content is now reported instead of silently
succeeding with no output.
of the generic top-level flag list.
`init` rejects a bare `help` positional instead of treating it as a
target directory.
Tests
apps/cli/test/integration/gate.test.ts— re-init re-sync path.apps/cli/test/unit/cli.test.ts,apps/cli/test/unit/init/init.test.ts.Docs
apps/docs/guide/installation.md,apps/docs/reference/commands.md.Out of scope (follow-ups)
mise-merge.tsfalse-unparseable on dotted-key TOML.commands.mdschema-row flags need a similar per-command pass.🤖 Generated with Claude Code