Skip to content

fix: standardize cli io#76

Merged
giuseppegrieco merged 3 commits intomainfrom
34-standardize-cli-io
Feb 3, 2026
Merged

fix: standardize cli io#76
giuseppegrieco merged 3 commits intomainfrom
34-standardize-cli-io

Conversation

@giuseppegrieco
Copy link
Copy Markdown
Member

@giuseppegrieco giuseppegrieco commented Feb 2, 2026

Summary by cubic

Standardizes CLI input/output and UX across commands, focusing on simple text output and consistent interactive flows. Adds a top-level describe command and streamlines ports translation. Addresses Linear 34.

  • New Features

    • Added top-level "describe" to show product info, then ports and connections.
    • Ports/connections describe and remove now use consistent interactive selectors and themed output.
    • Ports translate supports multiple ports and --all; prompts for ports/format/output when missing; prints written file paths.
  • Migration

    • Removed -o/--output (json|yaml) from ports|connections list/describe; output is text only.
    • Ports translate flags:
      • --name accepts comma-separated names; --all added.
      • --output is the output directory (replaces --output-dir); per-port single-file --output removed.
      • -f shorthand for --format removed.
    • Ports list shows connections as name:location and drops the schema type column; ports describe shows a connections table.

Written for commit d02c9e5. Summary will update on new commits.

@giuseppegrieco giuseppegrieco linked an issue Feb 2, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

3 issues found across 17 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="internal/prompts/ports_describe.go">

<violation number="1" location="internal/prompts/ports_describe.go:28">
P2: Truncating the description by byte index can split multibyte UTF-8 characters, producing invalid or corrupted labels. Use rune-based slicing instead.</violation>
</file>

<file name="internal/commands/connections_describe.go">

<violation number="1" location="internal/commands/connections_describe.go:96">
P2: String truncation using byte indexing can corrupt multi-byte UTF-8 characters. Use `utf8.RuneCountInString()` for length check and `[]rune` conversion for safe slicing.</violation>
</file>

<file name="internal/prompts/ports_translate.go">

<violation number="1" location="internal/prompts/ports_translate.go:30">
P2: Missing empty check for `ports` map. The code validates that `formats` is not empty before creating the select field (line 55-57), but doesn't apply the same validation for `ports` before creating the multi-select. If `ports` is empty, users will see an empty multi-select with no options.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread internal/prompts/ports_describe.go Outdated
Comment thread internal/commands/connections_describe.go Outdated
Comment thread internal/prompts/ports_translate.go
Copy link
Copy Markdown
Member

@gummiorri gummiorri left a comment

Choose a reason for hiding this comment

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

LGTM

@giuseppegrieco giuseppegrieco merged commit 24fe652 into main Feb 3, 2026
9 of 17 checks passed
@giuseppegrieco giuseppegrieco deleted the 34-standardize-cli-io branch February 3, 2026 11:16
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.

Standardize CLI I/O

2 participants