Skip to content

Align init/config UX with atlassian-cli patterns #43

@rianjs

Description

@rianjs

Summary

Align hubspot-cli init and config commands with the UX patterns established in atlassian-cli (jtk and cfl).

Changes Required

1. Refactor init command to use huh forms

  • Add github.com/charmbracelet/huh dependency
  • Replace bufio prompts with styled huh form
  • Keep connection verification logic
  • Pre-populate form fields from existing config (already partially done)

File: internal/cmd/initcmd/initcmd.go

2. Add --force flag and confirmation to config clear

  • Add --force / -f flag to clear subcommand
  • When --force is not provided, show confirmation prompt before deletion
  • Current behavior silently deletes without confirmation

File: internal/cmd/configcmd/configcmd.go

3. Remove config set command

  • Delete set subcommand entirely
  • Users should use hspt init to change configuration values
  • Init command pre-populates from existing config, so users can selectively update

File: internal/cmd/configcmd/configcmd.go

4. Fix token masking format

  • Change from first4...last4 to first4********last4 (8 asterisks)
  • Provides consistent masking across all CLIs

File: internal/cmd/configcmd/configcmd.go

Acceptance Criteria

  • hspt init shows styled huh form with validation
  • hspt init pre-populates form with existing config values
  • hspt config clear prompts for confirmation (unless --force)
  • hspt config set command no longer exists
  • hspt config show masks token as first4********last4
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions