Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT App Copy Normalizer

A small macOS command line tool that turns the ChatGPT desktop app's normal Copy button pasteboard HTML into practical GitHub Flavored Markdown.

First Try The Built-In Option

Current ChatGPT macOS app versions can expose a built-in Markdown copy path: right-click the response Copy button and choose "Copy as Markdown".

Use that first when it is available. This tool is a fallback for cases where you used the normal Copy button, need a repeatable clipboard post-processing step, or want to normalize already-captured pasteboard HTML.

Motivation

The ChatGPT web app and the macOS ChatGPT app can copy different text for the same response.

In the macOS app, pressing a response's normal Copy button may place a pasteboard payload that looks like Markdown but does not behave like the web app's Markdown copy output. Observed artifacts include blockquotes copied as plain paragraphs, raw HTML tags or tables left in the copied text, and fragmented section headings.

I built this before noticing the right-click "Copy as Markdown" option, so the main built-in path should be preferred. This tool remains useful as a pasteboard-only fallback for the normal Copy button path, not as a replacement for the built-in option. The original motivation was also raised publicly in an X post from @bakemocho to @sama: https://x.com/bakemocho/status/2006376232766820740.

What It Does

  • Reads the current macOS pasteboard public.html payload.
  • Converts it to GitHub Flavored Markdown with pandoc.
  • Repairs observed ChatGPT app copy artifacts, including lost blockquotes, lingering raw HTML tables, escaped Markdown markers, and fragmented headings.
  • Writes the normalized Markdown back to the pasteboard, unless --dry-run is used.

What It Does Not Do

  • It does not patch, modify, or reverse engineer the ChatGPT app.
  • It does not read ChatGPT local cache, Keychain data, cookies, authenticated storage, or conversation databases.
  • It is not affiliated with OpenAI.

Upstream Report Draft

If you want to report the default Copy button behavior or discoverability of the built-in Markdown copy option, see docs/upstream-issue-draft.md. It is an evidence-first draft, not a submitted report.

Requirements

  • macOS
  • swift command line tool
  • pandoc

Install pandoc with Homebrew:

brew install pandoc

Install the CLI:

make install

Usage

After copying a response with the ChatGPT app's normal Copy button:

bin/chatgpt-app-copy-normalizer normalize

Inspect the pasteboard payload types:

bin/chatgpt-app-copy-normalizer inspect

Check dependencies:

bin/chatgpt-app-copy-normalizer doctor

Convert an HTML fixture or captured pasteboard HTML without touching the pasteboard:

bin/chatgpt-app-copy-normalizer convert-html fixtures/quote-loss.html

Polish an existing Markdown file that still contains raw HTML tables or common copy artifacts:

bin/chatgpt-app-copy-normalizer polish-file notes.md

Agent Intake Hint

If a user says they copied a ChatGPT app response, an agent can run:

bin/chatgpt-app-copy-normalizer normalize --json

Then the agent should read the clipboard as Markdown. This route intentionally uses only the current pasteboard payload; it should not infer the latest conversation by reading ChatGPT app cache files.

Development

Run fixture tests:

bash tests/run-fixtures.sh

Use environment variables to override tool paths:

CHATGPT_APP_COPY_NORMALIZER_PANDOC_BIN=/opt/homebrew/bin/pandoc \
CHATGPT_APP_COPY_NORMALIZER_SWIFT_BIN=/usr/bin/swift \
bin/chatgpt-app-copy-normalizer doctor

About

Fallback normalizer for ChatGPT macOS app normal Copy output into GitHub Flavored Markdown

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages