Skip to content

feat(cli): add timeline --format md - #182

Open
abhinav-phi wants to merge 2 commits into
mex-memory:mainfrom
abhinav-phi:feat/timeline-md-format
Open

feat(cli): add timeline --format md#182
abhinav-phi wants to merge 2 commits into
mex-memory:mainfrom
abhinav-phi:feat/timeline-md-format

Conversation

@abhinav-phi

Copy link
Copy Markdown
Contributor

Resolves #55.

What

mex timeline --format md renders the (already-filterable — --since, --type, --limit all compose) timeline as a Markdown table:

| Date | Type | Event | Files |
|---|---|---|---|
| 2026-09-09 | decision | chose the bounded resolver | `ROUTER.md` |
  • Messages are escaped (pipes → \|, line breaks → spaces) so a message cannot break the table; file paths render as inline code.
  • An empty log emits _No events found._ — valid Markdown, still readable when pasted.
  • --json takes precedence (unchanged); the default terminal output is byte-identical when --format is absent.

Tests

Three new cases in test/events.test.ts: table shape + escaping with a pipe-bearing message and a file column, empty-log placeholder, and default output unchanged. npm run typecheck green.

Renders the filtered timeline as a Markdown table (Date, Type, Event,
Files) suitable for piping into reports and standup notes. Pipes and
line breaks inside a message are escaped so it cannot break the table;
an empty log emits an italic placeholder. The default terminal output
is untouched when --format is absent.

Resolves mex-memory#55
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.

Add mex timeline --format md

1 participant