Skip to content

feat: update misc CLI output with semantic colors and remove strip-ansi#3499

Merged
eablack merged 10 commits into
v11.0.0from
eb/color-migration-add-colors
Jan 29, 2026
Merged

feat: update misc CLI output with semantic colors and remove strip-ansi#3499
eablack merged 10 commits into
v11.0.0from
eb/color-migration-add-colors

Conversation

@eablack
Copy link
Copy Markdown
Contributor

@eablack eablack commented Jan 28, 2026

Summary

Enhances CLI output by adding semantic colors to currently uncolorized text in various commands and also fixing misc color use instances. It also replaces strip-ansi with ansis.strip and removes strip-ansi as a dependency.

Type of Change

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Testing

Notes:
Changes only affect color styling - no behavioral changes. Visual verification recommended.

Steps:

  1. Build passes: npm run build
  2. Verify space state colors: heroku spaces
  3. Verify app rename output: heroku apps:rename --app test newname
  4. Verify domain hostname color: heroku domains --app test
  5. Verify OAuth client colors: heroku clients:create "Test" https://example.com

Related Issues

https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07EE00002T2hvTYAR/view

@eablack eablack requested a review from a team as a code owner January 28, 2026 18:13
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 19:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 19:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 19:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 19:06 — with GitHub Actions Inactive
@eablack eablack changed the title feat: add semantic colors to uncolorized CLI output feat: add semantic colors to uncolorized CLI output and remove strip-ansi Jan 28, 2026
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:06 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:57 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:57 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:57 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 20:57 — with GitHub Actions Inactive
@eablack eablack changed the title feat: add semantic colors to uncolorized CLI output and remove strip-ansi feat: fix misc CLI output with semantic colorsand remove strip-ansi Jan 28, 2026
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:35 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:35 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:35 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:35 — with GitHub Actions Inactive
@eablack eablack force-pushed the eb/color-migration-add-colors branch from 84aeafc to f2ed1ee Compare January 28, 2026 21:37
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:37 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:37 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:37 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:37 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:43 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:43 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:43 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 28, 2026 21:43 — with GitHub Actions Inactive
@eablack eablack changed the title feat: fix misc CLI output with semantic colorsand remove strip-ansi feat: fix misc CLI output with semantic colors and remove strip-ansi Jan 28, 2026
Copy link
Copy Markdown
Contributor

@michaelmalave michaelmalave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and works as expected. Only one dependency comment.

Comment thread packages/cli/package.json Outdated
Copy link
Copy Markdown
Contributor

@michaelmalave michaelmalave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Enhance CLI output by adding semantic colors to currently uncolorized text:

- spaces/index.ts: Add state-based colors (success/warning/failure) to space states, use color.team() for team references
- apps/rename.ts: Add color.info() to URLs and color.name() to git remote names
- domains/index.ts: Add color.info() to heroku domain hostname
- config/index.ts: Add color.label() to config var keys in shell output
- releases/info.ts: Add color.label() to config var keys in shell output
- clients/{create,info,rotate}.ts: Add color.label() to OAuth env var names and color.info() to values

This improves readability and consistency by colorizing entity references and important information that previously lacked color.
Systematically fix color usage issues identified in COLOR_AUDIT_REPORT.md:

HIGH PRIORITY FIXES:
- Replace color.cyan.bold() with color.code() for inline command references
- Replace color.cyan() with color.name() for resource IDs (backup IDs, versions)
- Replace color.cyan/green() with color.info() for URLs
- Replace color.green/yellow() with color.success/warning() for dyno states
- Replace color.green() with color.name() for config var keys
- Replace color.green() with color.datastore() for database names
- Replace color.red/yellow/gray() with color.failure/warning/inactive() for release statuses
- Replace color.green/cyan/yellow() with color.label/info() for dyno types/sizes

FILES MODIFIED:
- pg/backups/index.ts: Command examples, backup IDs, database names
- pg/backups/info.ts: Backup IDs, command examples
- pg/backups/schedules.ts: Schedule names, command examples
- pg/info.ts: Config var keys
- ps/index.ts: URLs, dyno states, dyno types/sizes
- apps/create.ts: URLs
- apps/info.ts: URLs
- config/set.ts: Config var keys
- releases/info.ts: Release statuses, version numbers
- spaces/index.ts: Space states with state-based colors

This addresses all high-priority issues from the audit report, improving color consistency and semantic meaning throughout the CLI.
This commit addresses medium-priority color inconsistencies identified
in the color audit, converting remaining cyan/green/yellow colors to
semantic color functions:

- Removed role colors (metadata doesn't need emphasis)
- Fixed email colors to use color.user()
- Fixed token/authorization colors to use color.name()
- Fixed region colors to use color.info()
- Fixed buildpack colors to use color.info()
- Fixed error message colors in config:set
- Fixed dyno type colors to use color.label()
- Fixed info-level error colors to use color.info()
- Added conditional status colors (pending → warning, active → success)
Addresses final high-priority color audit issue:
- Change command example from color.cyan.bold() to color.code()
- Change backup schedule name from color.green() to color.name()
@eablack eablack temporarily deployed to AcceptanceTests January 29, 2026 17:33 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 29, 2026 17:33 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 29, 2026 17:33 — with GitHub Actions Inactive
@eablack eablack temporarily deployed to AcceptanceTests January 29, 2026 17:33 — with GitHub Actions Inactive
@eablack eablack changed the title feat: fix misc CLI output with semantic colors and remove strip-ansi feat: update misc CLI output with semantic colors and remove strip-ansi Jan 29, 2026
@eablack eablack merged commit e2cd850 into v11.0.0 Jan 29, 2026
13 checks passed
@eablack eablack deleted the eb/color-migration-add-colors branch January 29, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants