Skip to content

Compact CLI and MCP output defaults#2

Open
andrei-hasna wants to merge 1 commit into
mainfrom
codewith/compact-cli-output-pr-1782290500
Open

Compact CLI and MCP output defaults#2
andrei-hasna wants to merge 1 commit into
mainfrom
codewith/compact-cli-output-pr-1782290500

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Summary

  • make human CLI list/search/status-style output compact by default with truncation, row caps, pagination hints, and --verbose disclosure
  • add repos show / repos inspect detail aliases while keeping --json full-field behavior for machine consumers
  • make MCP list/search/detail tools return compact JSON summaries by default, with verbose: true for full records and validated/clamped limits
  • redact credential-like URL snippets in compact CLI/MCP output
  • document compact defaults and add focused regression tests

Before / After

Worst noisy command: repos repos --limit 3

Before, each repo printed name, full path, optional long description, and counts on separate lines:

platform-video-ben [hasnastudio] /home/hasna/Workspace/hasnastudio/platform/platform-video-ben
  <description when present>
  214 commits, 3 branches, 0 tags
...

After, the default is one compact row per repo plus a disclosure hint:

platform-video-ben [hasnastudio] 214 commits, 3 branches, 0 tags
platform-innovation-world [hasnastudio] 2 commits, 2 branches, 0 tags
platform-domogen [hasnastudio] 2 commits, 2 branches, 0 tags

Showing 3 repo(s). next page: --cursor 3. use `repos show <name>` for repo details. use --verbose for wider rows. use --json for full records.

Compact search output now redacts credential-like URL snippets:

https://***@github.com/hasna/repos.git

Validation

  • bun run typecheck
  • bun test (97 pass)
  • bun run build

Review Notes

Adversarial CLI/MCP review findings were reconciled before this PR: MCP limits are schema-validated and clamped, non-pageable outputs no longer advertise cursors, and compact get_repo redacts remote URLs.

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