fix(cli): ANSI ESC byte + relative-time + login prompt + help grouping#1
Merged
Conversation
…ouping
Four CLI UX changes shipping together as @drdeploy/cli@0.1.5:
• fix: emit real ANSI ESC byte in paint() — 'drdeploy ls' was
printing literal '[36m...[39m' text instead of rendering color
in TTYs. The bug hid in CI because bun test is non-TTY, which
flips supportsColor=false at module load and short-circuits the
colored branch.
• feat: relative-time formatting for last_scanned_at — '2h ago',
'moments ago', 'never' replaces the raw ISO '2026-05-07T12:33:37Z'
in the LAST SCAN column. New relativeTime() helper in lib/fmt.ts
is exported for future commands (status, watch).
• feat: tighten 'drdeploy login' prompt — lead with the one-click
prefilled URL, tuck manual entry into a dimmed fallback line.
Same content, ~50% less vertical space.
• feat: group --help into AUTH / SITES / AI AGENTS / OTHER. Drop
the (planned) status + watch entries until they ship; listing
unimplemented commands made the CLI surface look bigger than it
actually is.
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.
Four CLI UX changes shipping together as
@drdeploy/cli@0.1.5(patch bump via changeset).What changed
fix(cli): real ANSI ESC byte inpaint()drdeploy lswas printing literal[36m...[39mtext instead of rendering color in TTYs.paint()was building[${open}m${s}[${close}mwithout the leading\x1bESC byte, so the terminal saw the bracket sequences as plain text. CI didn't catch it becausebun testis non-TTY, which flipssupportsColor=falseat module load and short-circuits the colored branch entirely.visibleLength's strip regex had the matching bug.feat(cli): relative-time formatting indrdeploy lsLAST SCAN column was rendering the raw ISO timestamp
2026-05-07T12:33:37Z. Now compact relative form:2h ago/moments ago/never. NewrelativeTime()helper exported fromlib/fmt.tsfor future commands. Tests pin past, future, null, and unparseable cases.feat(cli): tightendrdeploy loginpromptEarlier layout printed three URL+code blocks separated by blank lines, pushing users toward manual entry even though the prefilled URL is one click from Approve. New layout leads with the prefilled URL (cyan) and tucks the manual fallback into a dimmed line. Same content, ~50% less vertical space.
feat(cli): group--helpinto bucketsAUTH / SITES / AI AGENTS / OTHER. Dropped the
(planned)status+watchentries until they ship.Verification
bun run --cwd packages/cli test— 24 pass / 0 fail (4 newrelativeTimecases)bun run --cwd packages/cli typecheck— clean (afterbun run build:libs).changeset/cli-color-and-list-polish.md(patch)Release path
After merge, the
Releaseworkflow will pick up the changeset, open a 'Version Packages' PR bumping@drdeploy/clifrom 0.1.4 → 0.1.5. Merging that publishes the binaries + tags@drdeploy/cli@0.1.5. Homebrew tap formula needs a separate bump to point at the new SHAs.