feat: plaintext output mode and Effect-native help/logging#19
Open
jundai-godaddy wants to merge 6 commits intomainfrom
Open
feat: plaintext output mode and Effect-native help/logging#19jundai-godaddy wants to merge 6 commits intomainfrom
jundai-godaddy wants to merge 6 commits intomainfrom
Conversation
…TPUT Co-Authored-By: Claude <noreply@anthropic.com>
- Replace custom help subcommands with Effect's --help (via `help` → `--help` positional rewrite) - Add Console layer that collapses 3+ blank lines in Effect's help output - Add Effect Logger that routes Effect.log* to stderr, formatted as JSON or plaintext based on outputFormat - Wire -v/-vv/-vvv to --log-level info/debug/trace so Effect's runtime logger respects verbosity - Remove makeHelpSubcommand from all command files and delete help.ts Co-Authored-By: Claude <noreply@anthropic.com>
Remove the verbose per-option metadata lines Effect's renderer injects
("A true or false value.", "This setting is optional.", "One of the
following: ...") and collapse the orphaned blank lines that remain,
producing tight two-line option blocks (name + description).
Co-Authored-By: Claude <noreply@anthropic.com>
When -v, -vv, -vvv, or --log-level is passed, emit a human-friendly line to stderr before command output indicating the active log level. Co-Authored-By: Claude <noreply@anthropic.com>
- Expand --log-level=X (equals form) to two-token form in normalizeVerbosityArgs; @effect/cli only accepts the space-separated form, so the equals form was being passed through unparsed and producing different output than running without a log-level flag. Verbosity levels are absorbed into the counter to avoid duplication. - Remove the standalone command-name title line Effect renders at the top of help output (e.g. "godaddy\n\ngodaddy 0.2.3"), leaving just the version line as the first thing shown. Co-Authored-By: Claude <noreply@anthropic.com>
- Parse Effect's help text into {version, usage, description, options, commands}
when output format is json, instead of a raw help string
- Add --plaintext as the long-form alias for -p (mirrors --json/-j symmetry)
Co-Authored-By: Claude <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
--output=plaintext/-p/--plaintext/GODADDY_CLI_OUTPUT=plaintextfor human-readable output instead of JSON envelopes--output=json/-j/--jsonto explicitly force JSON (overrides env var)helpsubcommand system with Effect's built-in--help, withhelpas a positional alias-j/--jsonis active,--helpemits a structured JSON envelope with{version, usage, description, options, commands}instead of raw text-v/-vv/-vvvand--log-level=X(equals form) to--log-level info/debug/traceso Effect's runtime logger respects verbosityLog level has been set to: debug)Effect.log*calls to stderr, formatted as JSON or plaintext based on output formatTest plan
godaddy --help/godaddy -h— Effect's root help, no excessive blank linesgodaddy help— same (positional alias)godaddy env help/godaddy auth -h— subcommand helpgodaddy -j --help— structured JSON:{ok, command, result: {version, usage, description, options, commands}, next_actions}godaddy env get— JSON output (default)godaddy -p env get/godaddy --plaintext env get— plaintext outputGODADDY_CLI_OUTPUT=plaintext godaddy env get— plaintext via env vargodaddy -j env get— JSON (overrides env var)godaddy -v auth status— prints "Log level has been set to: info", sets log-level=infogodaddy -vv env get— sets log-level=debuggodaddy -vvv env get— sets log-level=tracegodaddy --log-level=debug env get— same as-vv(equals form normalised)godaddy --log-level debug env get— same as above (space form)🤖 Generated with Claude Code