Skip to content

Remove pcio package and --quiet flag#74

Open
austin-denoble wants to merge 2 commits intomainfrom
adenoble/remove-pcio-package
Open

Remove pcio package and --quiet flag#74
austin-denoble wants to merge 2 commits intomainfrom
adenoble/remove-pcio-package

Conversation

@austin-denoble
Copy link
Collaborator

@austin-denoble austin-denoble commented Mar 19, 2026

Problem

Describe the purpose of this change. What problem is being solved and why?

Solution

remove pcio package and --quiet flag entirely. update all usages of pcio. to fmt. to standardize output

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Describe specific steps for validating this change.


Note

Medium Risk
Removes the --quiet global flag and the pcio output shim, which is a CLI-breaking interface change and may subtly alter stdout/newline behavior for scripts relying on previous output suppression or formatting.

Overview
Removes the custom pcio I/O wrapper and standardizes CLI output on fmt/os.Stdout. All commands/presenters that previously printed via pcio now write directly to stdout/stderr and use fmt.Errorf for errors.

Drops global --quiet support. root no longer wires a quiet option, the pcio package is deleted, spinner output is routed to os.Stdout, and test helpers that silenced pcio output (plus several per-package TestMains) are removed/updated accordingly.

Written by Cursor Bugbot for commit 80271a8. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

if options.json {
json := text.IndentJSON(apiKey)
pcio.PrintJSON(json)
fmt.Fprint(os.Stdout, json)
Copy link

Choose a reason for hiding this comment

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

JSON output missing trailing newline in two commands

Medium Severity

The old pcio.PrintJSON used fmt.Fprintln which appends a newline. These two call sites replace it with fmt.Fprint(os.Stdout, json) which does not append a newline, while every other replacement in the PR correctly uses fmt.Println(json). Since text.IndentJSON doesn't include a trailing newline, api-key describe --json and api-key update --json will output JSON without a final newline, breaking piping to tools like jq and causing the shell prompt to render on the same line as the output.

Additional Locations (1)
Fix in Cursor Fix in Web

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.

1 participant