Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
🦋 Changeset detectedLatest commit: cccd999 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
wyattjoh
force-pushed
the
wyattjoh/effect-rewrite-cli
branch
from
December 1, 2026 09:43
de52f1d to
33a8de6
Compare
This was referenced Dec 1, 2026
wyattjoh
force-pushed
the
wyattjoh/effect-rewrite-cli
branch
from
December 1, 2026 14:53
c7f7b89 to
e01bbf4
Compare
wyattjoh
force-pushed
the
wyattjoh/effect-rewrite-cli
branch
from
December 1, 2026 15:36
e01bbf4 to
29cd236
Compare
…4.1.7 The native effect/cli commands rely on Flag.withOptionalValue and the terminal and spawn types that arrived in effect 4.1.
Each command group is now an effect/cli Command built with Command.make, Flag and Argument, and effect/cli parses the command line, renders help and generates the shell completion scripts. Prompts render through effect/cli's prompt module, so commander, @commander-js/extra-typings and @clack/prompts are gone, along with the hidden __complete command. lib/command.ts holds the global flags and the action wrapper that runs the startup work (telemetry, --verbose, --mode, the environment banner and the update notice) around every handler. cli.ts still answers --version before Effect loads. The extras package exports plain command data so cli-core can add it to the tree without a parser dependency. BREAKING CHANGE: usage errors exit 2 with a usage_error envelope, help has a new layout, completion is a static script, and several flag spellings and aliases change; the changeset lists each one.
The surface snapshots record every command's help text, the command tree and the generated completion scripts, so a change to a flag, alias or description shows up as a reviewable diff. oxfmt skips the snapshot directory so the recorded text stays byte-for-byte. The unit and integration tests move from Commander's program to the effect/cli root command, and the prompt tests drive the effect/cli renderer through a shared terminal fixture.
AGENTS.md, the rules and the command READMEs now describe commands defined with effect/cli, the action wrapper in lib/command.ts, the static completion scripts and the new help and flag conventions.
One major changeset covers the whole move from Commander and @clack/prompts to effect/cli, including the effect 4.1.7 upgrade.
… completion header
wyattjoh
force-pushed
the
wyattjoh/effect-rewrite-cli
branch
from
December 1, 2026 16:03
29cd236 to
cccd999
Compare
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.
Stacked on #660.
Summary
Commander and
@clack/promptsare gone. Every command is aneffect/cliCommand, andeffect/cliparses the command line, renders help and prompts, and generates the completion scripts. Effect moves to 4.1.7 for the flag and terminal APIs this needs.A few shims remain where
effect/clihas no equivalent that agent mode, scripts or telemetry can rely on: the--versionfast path, exit 1 for a bare group, theusage_errorenvelope (which keeps the CLI's own value-parser messages unwrapped, and reads--modeoff the line when parsing fails),--input-jsonexpansion, the scan of the command line that tells telemetry which flags were set, two patches to the help formatter, and the completion script header.Commits: effect 4.1.7 bump → native commands → tests and surface snapshots → docs and rules → changeset → follow-up fixes from review.
Evidence
clerk whoami --bogusprinted Commander's plain-text error and exited 1; help usedUsage:/Options:/Commands:.After:
packages/cli-core/src/test/surface/__snapshots__/record every command's help, the command tree and every shell's completion script, so any later surface change is a reviewable diff.check:patches, build and the e2e listing all pass locally.Merge Danger
Door: two-way
Reverting restores Commander; nothing persistent (config, credentials, telemetry schema) changes shape. Users who regenerated completion scripts would need to regenerate them again after a revert.
Blast Radius: wide
Every command's parsing and help change, and this ships as a major release. Scripts and agents that depend on exit codes, flag spellings or help text can break:
usage_errorJSON envelope in agent mode, instead of exiting 1 with plain text. The error messages are worded differently.DESCRIPTION,USAGE,FLAGS,GLOBAL FLAGS,SUBCOMMANDSandEXAMPLESsections replaceUsage:,Options:andCommands:. Flags are listed in declaration order, and a switch that defaults on is shown as--xwith its--no-xform implied.clerk help <command>and thehelpsubcommand of command groups (clerk migrate help) are gone: useclerk <command> --help.-hor--helpanywhere before--prints help for the most specific command named, even after--versionor where a flag's value was expected.clerk -hvprints help.clerk completion <shell>) after upgrading. The hiddenclerk __completecommand is gone, and values that came from the CLI at completion time (mcp install --client,migrate --sourceand similar hints) are no longer completed.clerk completionwith no shell is a usage error.clerk auth loginkeepssignin(signupandsign-inare gone) andclerk auth logoutkeepssignout(sign-outis gone).--keys(clerk config pull,clerk config schema),--for(clerk enable billing,clerk disable billing) and--android-fingerprint(clerk init,clerk doctor) take one value per flag: repeat the flag or separate values with commas.--keys a bno longer works.--helpand-h(clerk --help --help) and--versionwritten with a value (--version=true --version=true); a bareclerk --version --versionstill prints the version (with any other word on the line, such as--mode agent, it is a usage error).--helpand--versionanswer whatever form they are written in:--no-help,--help=false,--no-versionand--version=falseprint help or the version and exit 0, instead of failing as unknown options.clerk open helpno longer prints help:helpis read as a dashboard subpath. Useclerk open --help.clerk feedback --outcomeoutside the allowed values (an empty or space-padded one included) is rejected while parsing: the usage error is worded differently, carries no examples, and sends no usage telemetry event.-X POST, not-XPOST. A value that starts with-must be attached with=(--attempted=-v printed nothing); as the next word it is read as a flag, except a negative number (--limit -5). An--input-jsonvalue always reaches its flag, whatever it looks like.clerk users --app app_1 listandclerk users list --app app_1both work), but a flag a subcommand does not take is a usage error. The duplicate copies of a parent's flag on its children are gone:clerk impersonate revoke --openis now a usage error.clerk deploy runis gone: runclerk deploy, which usage telemetry still records asdeploy run.clerk deploy status --domainreports an unknown flag.--=<value>(a flag with no name) is read as an argument: a usage error where the command takes none, and the endpoint where one is expected (clerk api --=users).clerk mcp runno longer passes its flags through: it still prints the removed-command error, but a flag after it is now a usage error.--modevalue is a usage error raised before the command starts, so it sends no usage telemetry event.--input-jsonreplaces the JSON key of the same name instead of being appended after it.