Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatMark

A personal, native macOS menu-bar app for saving Claude Code and Codex conversations as Markdown. Requires macOS 13 or later. No API keys, network requests, or dependencies.

Free and open source under the MIT License, including commercial use, modification, and redistribution. ChatMark is an independent project, not affiliated with OpenAI or Anthropic.

ChatMark turns local Codex and Claude Code conversations into clean Markdown

After launching, look for MD in the macOS menu bar.
The ChatMark MD icon highlighted in the macOS menu bar

Run

zsh scripts/build.sh
open dist/ChatMark.app

Click MD beside the speech bubble in the menu bar. Select a conversation and click Save Markdown. Right-click the menu-bar item to quit ChatMark without opening the popover. Exports default to ~/Documents/ChatMark; Change… picks and remembers another folder. Click the folder path to open it in Finder. Open opens the last export in your default Markdown app; Show in Finder reveals it. The gear menu includes Launch at Login, a configurable recent-session limit, and Quit.

Refresh (⌘R), beside the Sessions/Watched tabs, updates the session list when you want. Search and the All/Codex/Claude filters apply to the active tab. Click Watch on any session to move it to Watched and immediately save a Markdown file. While ChatMark runs, watched transcripts are checked every three seconds and new messages extend that same file. Watches and their file paths survive restarting the app. Open MD opens the live note; Unwatch stops tracking and keeps the saved file. Changing the export folder starts new tracked copies there and keeps the previous notes. If you edit a tracked Markdown file yourself, syncing pauses for that note to preserve your edits; Unwatch and Watch again creates a fresh copy.

The preview is one read-only text view containing the complete exported Markdown, with direct ⌘A and ⌘C support for selecting and copying the entire document. Selecting a session, including reselecting the current one, scrolls to the end. The interface uses the accent color #61a4ad.

For a permanent installation, copy dist/ChatMark.app into ~/Applications. Enable Launch at Login after installing it at its permanent location.

Behavior

  • Reads ~/.codex/sessions and ~/.claude/projects, sorted by transcript modification time. Shows the latest 30 nonempty main sessions by default; the gear menu can change the limit to 10, 30, 50, 100, or 200.
  • Discovers sessions once at launch, then only on Refresh. Opening the panel does not refresh or reorder Recent. Only watched sessions are checked automatically. Reads appended bytes on a background queue; complete records only, so active writes do not break parsing.
  • Uses Codex's session index and Claude's saved titles when present; otherwise derives a title from the first real user question. No AI service receives your conversations.
  • Exports the full locally available conversation, retaining original Markdown, including code blocks, tables and links. Omits tool calls/results, hidden reasoning, injected instructions, command output, and compaction summaries. Assistant progress messages are included because they are visible conversation text.
  • Image and document attachments appear as placeholders; this version exports text, not binary attachments. Chats available only on the Claude website are not local Claude Code transcripts.
  • Repeated manual saves create numbered files without overwriting existing notes. Saving takes a fresh snapshot of the growing transcript. Watched notes use a stable path and are extended automatically with atomic writes; unchanged notes are not rewritten. Truncated sources and externally edited notes are preserved and reported in the Watched column.
  • Transcript schemas are internal. Provider adapters are isolated in TranscriptParser.swift. Unrecognized event types are ignored; malformed completed records are counted and shown as a warning.

Verification

CLANG_MODULE_CACHE_PATH="$PWD/.build/clang-module-cache" swift run --disable-sandbox ChatCoreChecks
dist/ChatMark.app/Contents/MacOS/ChatMark --diagnose

--diagnose --export-to /path/to/folder also exports the most recent conversation from each provider, useful for checking against your actual logs.

Architecture: ChatCore handles streaming JSONL parsing, discovery and safe Markdown export; the Chat2MD source target provides ChatMark's AppKit menu-bar host and SwiftUI interface.

Privacy and contributing

Exports preserve visible conversation text, including any secrets or personal information in that text. ChatMark does not redact secrets or encrypt exported Markdown. Review notes before sharing them, and choose an export folder outside this repository. A folder synced by iCloud or another service may upload your notes independently of ChatMark.

Diagnostics can contain local paths. The UI smoke test reads real local sessions and creates conversation exports and a screenshot; keep those artifacts private. Use synthetic examples in issues, screenshots, and tests. See SECURITY.md for privacy boundaries and publication checks, and AGENTS.md for development instructions.

About

Native macOS menu-bar app that exports local Codex and Claude Code conversations to Markdown

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages