Skip to main content

copilot-chat-transcribe

Convert Microsoft 365 Copilot chat sessions into clean, readable transcripts — a styled HTML file you can open in any browser, and a plain Markdown file for note-taking apps.

Two modes:

Mode When to use
File mode You already have a JSON export from the browser
--connect mode Let the tool fetch the conversation live from your signed-in Edge browser

Installation

pip install copilot-chat-transcribe

For --connect mode (live browser download via Playwright):

pip install "copilot-chat-transcribe[connect]"
playwright install msedge

No-install option (uv / uvx)

# one-off run
uvx --from copilot-chat-transcribe copilot-chat-transcribe --help

# with --connect support
uvx --from "copilot-chat-transcribe[connect]" copilot-chat-transcribe --connect

Quick start

Mode 1 — convert a JSON file

copilot-chat-transcribe conversation.json

You will be asked for an output folder name (the filename stem is suggested as the default). Skip the prompt by passing -o:

copilot-chat-transcribe conversation.json -o my-chat

Three files are written into the folder:

my-chat/
├── transcript.html    ← open in any browser
├── transcript.md      ← paste into Obsidian, Notion, etc.
└── conversation.json  ← original export, archived alongside

Open the HTML automatically when done:

copilot-chat-transcribe conversation.json -o my-chat --open

Mode 2 — live download (--connect)

This mode connects to your already-running Microsoft Edge browser using its remote debugging interface, so it can read your signed-in Copilot session without you needing to copy any cookies or tokens.

copilot-chat-transcribe --connect

Step-by-step walkthrough:

  1. The tool checks whether Edge is already listening on port 9222.
  2. If not, it asks:
    MSEdge not found on port 9222. Start it now? [Y/n]
    
    Press Enter (or Y) to launch Edge automatically with remote debugging enabled.
  3. Edge opens at chat.cloud.microsoft. Sign in if needed, then press Enter in the terminal.
  4. The tool fetches your latest 10 conversations and shows a numbered list:
    Latest 10 conversations:
     1. Python data pipeline question  (2026-03-28 14:32)
     2. Draft email to team            (2026-03-27 09:11)
     ...
    Select conversation [1]: 
    
  5. Press Enter to accept the default (most recent) or type a number.
  6. The conversation is downloaded, parsed, and written to the output folder.

Specify the output folder and open immediately:

copilot-chat-transcribe --connect -o my-chat --open

Starting Edge manually instead

If you prefer to start Edge yourself before running the tool:

Windows:

& "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --remote-debugging-port=9222

macOS:

/Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge --remote-debugging-port=9222

Then run copilot-chat-transcribe --connect as normal.


All options

copilot-chat-transcribe [-h] [--connect | input] [-o FOLDER] [--cdp-url URL] [--open] [--version]
Flag Default Description
input (positional) Path to a M365 Copilot JSON export file
--connect — Enable live browser download mode
-o / --output FOLDER (prompted) Output folder path
--cdp-url URL http://localhost:9222 Chrome DevTools Protocol endpoint
--open off Open transcript.html in the default browser when done
--version — Print version and exit

input and --connect are mutually exclusive — use one or the other.


Output format

transcript.html

  • Self-contained — one file, no internet connection needed, works offline
  • User messages — right-aligned blue speech bubbles
  • Copilot responses — left-aligned, rendered Markdown (headings, tables, code blocks with syntax highlighting)
  • Images — attached files embedded as inline base64 <img> tags
  • Timestamps — stored as UTC in the HTML, converted to your local time by the browser

transcript.md

  • ## You / ## Copilot headers separate each turn
  • Copilot responses are reproduced in their original Markdown
  • Images are not embedded (the filename is noted as a placeholder)
  • Suitable for pasting into Obsidian, Notion, Confluence, or any Markdown editor

Where does the JSON come from? (File mode)

If you want to export a conversation yourself without --connect:

  1. Open chat.cloud.microsoft in Edge or Chrome
  2. Open DevTools → Network tab
  3. Start a conversation or reload the page
  4. Filter requests by conversation — look for a GET request to
    https://m365.cloud.microsoft/chat/conversation/<uuid>
  5. Right-click the request → Copy → Copy response
  6. Paste into a .json file and run copilot-chat-transcribe that-file.json

Troubleshooting

Error: Playwright is required for --connect mode

Install the connect extra:

pip install "copilot-chat-transcribe[connect]"
playwright install msedge

Edge opens but the tool can't connect

Make sure Edge was launched with the debugging flag.
If Edge was already running before you ran the tool, close it fully (check the system tray) and let the tool start it, or start it manually with --remote-debugging-port=9222.

UnicodeEncodeError on Windows

Set the terminal encoding before running:

$env:PYTHONIOENCODING = "utf-8"
copilot-chat-transcribe conversation.json -o out

Or permanently in your PowerShell profile.

The conversation list is empty

The tool fetches the 10 most recent conversations from the Copilot nav pane API. Make sure you are signed in to chat.cloud.microsoft in the browser window that Edge opened.


Development

git clone https://github.com/your-org/copilot-chat-transcribe
cd copilot-chat-transcribe
uv venv
uv pip install -e ".[connect]"
playwright install msedge
copilot-chat-transcribe --help

Run against a sample file:

copilot-chat-transcribe path/to/export.json -o test-out --open

License

MIT

Metadata

Release files for copilot-chat-transcribe 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for copilot-chat-transcribe 1.0.1
File Size Uploaded
copilot_chat_transcribe-1.0.1.tar.gz 25.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for copilot-chat-transcribe 1.0.1
File Interpreter ABI Platform
copilot_chat_transcribe-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 42.0 kB

Release files / copilot_chat_transcribe-1.0.1.tar.gz

Download URL copilot_chat_transcribe-1.0.1.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
148bf7cb5b29c32c5025fd2202a98656f523d9c3b14fb3c57e12c7a1f1d934e9
BLAKE2b-256 checksum
How to use checksums
732ca84429c6225541a9276a11d0336bf6fe3b0ed76aacc3d469aa4c993bda18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.

Transparency log

Release files / copilot_chat_transcribe-1.0.1-py3-none-any.whl

Download URL copilot_chat_transcribe-1.0.1-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1609ef41e938268fe728ccbb276fb535389228603d33cd1678c3368123115dd
BLAKE2b-256 checksum
How to use checksums
56a0aea6bdd43fe5fbcdc31606b8fdf49541ab9dc8c34df06b8c38bd7c028cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page