Skip to content

[Audit] Standardize CLI output: migrate 41 chalk imports to onboarding helpers #87

@rohitg00

Description

@rohitg00

Problem

The CLI has inconsistent output patterns across 60 command files:

  • 41 commands import chalk directly instead of using colors/helpers from onboarding/
  • 1,900 raw console.log calls mixed with @clack/prompts output
  • Error output uses 3 different methods: console.error(), this.context.stderr.write(), and error() helper

This creates visual inconsistency — some commands show styled clack prompts, others show raw chalk text.

Proposed Solution

  1. Replace all direct chalk imports with colors, success(), warn(), error(), step() from onboarding/
  2. Replace console.log(chalk.*) with the appropriate helper
  3. Replace ora() spinners with the spinner() wrapper from onboarding

Scope

All 41 files in packages/cli/src/commands/ that import chalk directly, including the heaviest:

  • memory.ts (1,027 LOC), agent.ts (1,004 LOC), recommend.ts (733 LOC)
  • update.ts, translate.ts, publish.ts

Acceptance Criteria

  • Zero import chalk in packages/cli/src/commands/
  • All user-facing output uses onboarding helpers
  • Build passes, no visual regressions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions