Skip to content

fix: improve CLI text output formatting - #21

Merged
julianschiavo merged 1 commit into
mainfrom
julian/fix-search-cli-formatting
Mar 13, 2026
Merged

fix: improve CLI text output formatting#21
julianschiavo merged 1 commit into
mainfrom
julian/fix-search-cli-formatting

Conversation

@julianschiavo

@julianschiavo julianschiavo commented Mar 13, 2026

Copy link
Copy Markdown
Member
  • improve xcdocs search output with bold headings, labeled metadata, and index-based indentation
  • align xcdocs get output with the same renderer without leading indentation
  • add regression tests for styled search and get text output

Note

Low Risk
Low risk: changes are limited to CLI text formatting (ANSI styling/indentation) and add regression tests; no changes to search/get data fetching or JSON output paths.

Overview
Improves xcdocs text output by replacing the ad-hoc search/get printing with a shared renderTextEntry renderer that adds labeled metadata (Kind, Relevance, ID), consistent spacing/blank lines, and index-based indentation for aligned multi-line results.

Adds conditional ANSI bold styling when the terminal supports it (or when CLICOLOR_FORCE=1, respecting NO_COLOR/TTY/TERM=dumb) and introduces regression tests covering styled search output, double-digit index alignment, and get output without leading indentation.

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

@julianschiavo
julianschiavo merged commit 2cc0c1f into main Mar 13, 2026
3 checks passed
@julianschiavo
julianschiavo deleted the julian/fix-search-cli-formatting branch March 13, 2026 07:36

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 2 potential issues.

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

Comment thread Tests/XCDocsCLITests/SearchTextOutputTests.swift
Comment thread Sources/XCDocsCLI/CLIOutput.swift
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