Repository navigation
Open
Labels
Description
Parent Epic: #1841
Overview
Consolidate CLI and Desktop flags onto a single, non-overlapping flag per concern across STDOUT (data results + live progress) and STDERR (diagnostic logs), removing redundant/conflicting flags (-v/-vv/-vvv, --debug, -q/--quiet, --log-output, and per-command --json).
Target Flag & Stream Contract
| Concern | Stream | Canonical Flag | Environment Variable (BindEnv) |
Allowed Values | Default |
|---|---|---|---|---|---|
| Log Verbosity | STDERR |
--log-level |
DEVSY_LOG_LEVEL (fallback: context LOG_LEVEL) |
error, warn, info, debug, trace |
warn (CLI) / info (remote agent) |
| Log Encoding | STDERR |
--log-format |
DEVSY_LOG_FORMAT |
auto, text, json, logfmt (alias: plain -> text) |
auto (text on TTY, json when piped / DEVSY_UI=true / internal) |
| Result Format | STDOUT |
--result-format |
DEVSY_RESULT_FORMAT |
auto, text, plain, json |
auto (plain/text on TTY, json when piped / DEVSY_UI=true) |
| Live Progress | STDOUT |
--no-status |
DEVSY_NO_STATUS |
true, false |
false |
Subtasks & Engineering Specifications
-
Task 0.1: Consolidate Global Logging Flags (
--log-level,--log-format) & Remove-v,--debug,-q,--log-output(size/m)- Target Files:
cmd/flags/flags.gocmd/root.go,cmd/root_test.go,cmd/flag_aliases_test.gopkg/flags/names/names.go,pkg/flags/names/names_test.go,pkg/flags/env_test.gopkg/config/env.gopkg/log/logger.go,pkg/log/levels.go,pkg/log/logger_test.go
- Implementation Details:
- In
cmd/flags/flags.go:- Remove
Verbosity,Quiet,Debug, andLogOutputfromGlobalFlags. - Keep
LogLevel string,LogFormat string(default"auto"),ResultFormat string(default"auto"), andNoStatus bool. - Update
bindGlobalEnvVars(pkgflags.BindEnv) to bindDEVSY_HOME,DEVSY_CONTEXT,DEVSY_PROVIDER,DEVSY_LOG_LEVEL,DEVSY_LOG_FORMAT,DEVSY_RESULT_FORMAT, andDEVSY_NO_STATUS.
- Remove
- In
cmd/root.go:- Validate
--log-formatagainstauto | text | plain | json | logfmt. - Resolve
"auto"to"json"whenisMachineConsumer(isInternal,DEVSY_UI=true, or non-TTYos.Stderr), otherwise"text". This fixes the bug whererootPreRunoverwrote"json"with"text"when--log-outputdefaulted to"text".
- Validate
- In
pkg/log/logger.goandpkg/log/levels.go:- Add
log.InitProvider(providerName string)that readsDEVSY_LOG_LEVEL(default"info") andDEVSY_LOG_FORMAT(default"json"). - Keep
VerbosityandDebugas// Deprecated:compatibility fields onlog.Config(and havelog.Init(cfg)automatically fall back toos.Getenv("DEVSY_LOG_LEVEL")andos.Getenv("DEVSY_LOG_FORMAT")whencfg.Level == ""/cfg.Format == "") so that bumpinggithub.com/devsy-org/devsyin the 12 external Go provider repositories (aws,gcloud,azure,digitalocean,civo,terraform,lima,orbstack,kubernetes,ecs,dockerless,ssh) never breaks compilation before theircmd/root.gois updated. - Add
log.InfoEnabled() boolalongsidelog.DebugEnabled() boolandlog.TraceEnabled() bool. - Replace
cmd.Verbosity > 0 || cmd.Debugincmd/workspace/up/up.goandcmd/workspace/stop.gowithlog.InfoEnabled().
- Add
- In
- Target Files:
-
Task 0.2: Update All Internal Child Subprocess & Desktop CLI Invocations to
--log-leveland--log-format(size/m)- Target Files:
cmd/workspace/up/agent.go,cmd/workspace/logs.go,cmd/workspace/ssh.go,cmd/workspace/gpg_tunnel.go,cmd/machine/ssh.gopkg/agent/agent.go,pkg/client/clientimplementation/workspace_client.go,pkg/devcontainer/setup.gopkg/dotfiles/dotfiles.go,pkg/gpg/forward.go,pkg/tunnel/browser.go,pkg/tunnel/container.go,pkg/ide/opener/browser_tunnel.godesktop/src/main/cli.ts,desktop/src/main/__tests__/cli.test.ts,desktop/e2e/no-status-protocol.e2e.ts
- Implementation Details:
- Add
log.ForwardFlagArgs() []stringreturning[]string{"--log-level", log.LevelString()}when non-default, and replace all--debugchild-process flag forwarding acrosscmd/andpkg/. - Remove invalid
--log-output=rawarguments frompkg/dotfiles/dotfiles.go,pkg/gpg/forward.go, andpkg/tunnel/browser.go. - Update
desktop/src/main/cli.ts(argsWithProtocolandcommandNeedsSecret) and Desktop tests to pass--log-formatinstead of--log-output.
- Add
- Target Files:
-
Task 0.3: Standardize All Subcommand
STDOUTOutput on--result-format& Unifytext/plainValue Names (size/s)- Target Files:
pkg/output/mode.go,pkg/output/mode_test.gopkg/status/render.go,pkg/status/render_test.gocmd/provider/versions.go,cmd/provider/versions_test.gocmd/feature/outdated.go,cmd/feature/outdated_test.gocmd/machine/describe.go,cmd/machine/inspect.gocmd/ci/status.go
- Implementation Details:
- In
pkg/output/mode.goandpkg/status/render.go, accept"text"alongside"plain"(mapping both to human-readable output), and inpkg/log/logger.goaccept"plain"as an alias for"text", soauto|text|jsonworks identically across both--log-formatand--result-format. - Remove
--json(names.JSON) fromdevsy provider versionsand useoutput.ResolveMode(cmd.ResultFormat)(ModeJSONvsModePlain). - Add
output.ResolveMode(cmd.ResultFormat)support tofeature outdated,machine describe,machine inspect, andci.
- In
- Target Files:
Verification & Acceptance Criteria
mise run cli:testandmise run desktop:testpass with zero CLI flag references to--log-output,--verbose,-v/-vv/-vvv,-q/--quiet, or--debug.--log-format=autoemits JSON logs onSTDERRwhenos.Stderris non-TTY orDEVSY_UI=true, and human-readable text when interactive.- Both
--log-format=textand--result-format=text(as well asplain) are accepted across CLI commands.
Reacted by coderabbitai
Activity
coderabbitai commentedon Nov 15, 2026
🔗 Related PRs
#1736 - feat(cli): add progress visibility control [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!