Skip to content

refactor: Format CLI listings as markdown tables#327

Merged
edenreich merged 1 commit intomainfrom
refactor/cli-output-markdown-tables
Dec 10, 2025
Merged

refactor: Format CLI listings as markdown tables#327
edenreich merged 1 commit intomainfrom
refactor/cli-output-markdown-tables

Conversation

@edenreich
Copy link
Contributor

@edenreich edenreich commented Dec 10, 2025

Converts plain text output for list-agents, show-agent, and list-mcp commands to formatted markdown tables. Uses glamour library for terminal rendering. Improves readability with status icons and structured data presentation.

Summary of Changes:

  1. cmd/agents.go: Replaced plain text listings with markdown tables for both listAgents and showAgent functions
  2. cmd/mcp.go: Converted MCP server listing to markdown format with improved table structure
  3. Added renderMarkdown function using the glamour library for terminal rendering
  4. internal/shortcuts/custom.go: Added markdown detection to handle the new output format properly
  5. Uses status icons (✓/✗) for enabled/disabled states instead of text
  6. Better data organization with columns for key properties in tables

The refactoring maintains backward compatibility by falling back to raw markdown if rendering fails.

Benefits:

  • Improved visual presentation of CLI output
  • Better readability with structured tables
  • Status indicators using icons instead of plain text
  • Consistent formatting across all listing commands
  • Maintains backward compatibility

Closes #311

@edenreich edenreich merged commit 4418122 into main Dec 10, 2025
5 checks passed
@edenreich edenreich deleted the refactor/cli-output-markdown-tables branch December 10, 2025 20:23
ig-semantic-release-bot bot pushed a commit that referenced this pull request Dec 10, 2025
## [0.87.0](v0.86.3...v0.87.0) (2025-12-10)

### 🚀 Features

* Add conversations list command ([#331](#331)) ([e30eede](e30eede)), closes [#330](#330)
* Add max retries configuration for MCP servers ([171444e](171444e))

### ♻️ Code Refactoring

* Format CLI listings as markdown tables ([#327](#327)) ([4418122](4418122)), closes [#311](#311)
* Rename GitHub App to Github Action ([fcfdc98](fcfdc98))
@ig-semantic-release-bot
Copy link

🎉 This PR is included in version 0.87.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Improve the view of MCP and A2A servers using MD

1 participant

Comments