Skip to content

feat(cli): status formatter + CLI gallery docs#56

Merged
PatrickSys merged 2 commits intomasterfrom
feat/phase2e-cli-gallery
Mar 1, 2026
Merged

feat(cli): status formatter + CLI gallery docs#56
PatrickSys merged 2 commits intomasterfrom
feat/phase2e-cli-gallery

Conversation

@PatrickSys
Copy link
Owner

What / Why

Explain the change briefly.

Release notes

This repo uses an automated release flow.

  • Please use a Conventional-Commits style PR title (we squash-merge): feat: ..., fix: ..., docs: ..., chore: ..., refactor: ...
  • If this should not appear in release notes, say so here

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3368d5422e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"relatedMemories": ["Always use HttpInterceptorFn (0.97)"]
}
```
For scripting and automation, every CLI command accepts `--json` for machine output (stdout = JSON; logs/errors go to stderr).

Choose a reason for hiding this comment

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

P2 Badge Narrow the --json guarantee to commands that emit JSON

This new README contract says every CLI command produces machine JSON on stdout with --json, but the memory add/memory remove paths still always print plain text (Added.../Removed...) and never branch on --json (src/cli-memory.ts, add/remove branches). In automation, calling those subcommands with --json will return non-JSON output and break parsers, so the docs should either scope the promise to supported commands or the subcommands should implement JSON output.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link

greptile-apps bot commented Mar 1, 2026

Greptile Summary

Added formatStatus function with terminal-adaptive output (Unicode/ASCII fallback via CODEBASE_CONTEXT_ASCII=1) and created comprehensive CLI gallery documentation in docs/cli.md.

Key changes:

  • Implemented glyph abstraction system supporting both Unicode box-drawing and ASCII fallback characters
  • Added formatStatus function to render index status in human-readable format
  • All existing formatters (formatPatterns, formatSearch, formatRefs, formatCycles, formatMetadata, formatStyleGuide) updated to use glyph system
  • New docs/cli.md provides CLI examples for onboarding and debugging
  • README enhanced with CLI preview section showing formatted output examples
  • Test coverage added for status command with environment variable handling

Confidence Score: 5/5

  • This PR is safe to merge with no issues identified
  • Clean implementation with proper abstractions, comprehensive test coverage, well-structured documentation, and adherence to project constraints (zero-infra, framework-agnostic, no any types). All formatters consistently use the new glyph system with proper fallbacks.
  • No files require special attention

Important Files Changed

Filename Overview
src/cli-formatters.ts Added status formatter with ASCII/Unicode glyph system for terminal compatibility - clean implementation with proper fallbacks
src/cli.ts Added environment variable documentation and connected status command to formatter - minimal, focused changes
tests/cli.test.ts Added test coverage for status command with proper environment variable cleanup - well-structured test
docs/cli.md New CLI gallery documentation with clear examples and ASCII fallback instructions - comprehensive and well-organized
docs/capabilities.md Updated CLI reference and documented impact.details field with backward compatibility note
README.md Added CLI gallery preview section and improved documentation structure - formatting improvements and clearer onboarding flow

Last reviewed commit: 3368d54

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@PatrickSys PatrickSys merged commit b7bc5cc into master Mar 1, 2026
3 checks passed
@PatrickSys PatrickSys deleted the feat/phase2e-cli-gallery branch March 2, 2026 13:09
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