claudeers.

🔓 unclaimed — this page was auto-generated from GitHub. Are you the creator?

Claim this page →
// Education & Learning

claude-export

Browser script to share and export Anthropic Claude chat logs to Markdown, JSON, or as Image (PNG)

// Education & Learning[ api ][ web ][ claude ]#claude#anthropic#claude-3#claude-ai#claude3#educationNOASSERTION$open-sourceupdated 15 days ago
Dormant
0/100
last commit almost 2 years ago
last release none
releases 0
open issues 4
// install
git clone https://github.com/ryanschiang/claude-export

Export/Download Claude Conversations (claude-export)

This browser script formats and downloads Anthropic Claude conversations to markdown, JSON, and PNG for sharing and exporting chat logs.

You can export the active Claude chat log directly from the browser console, entirely locally. No data is sent to any server.

Supports the latest Claude web UI as of September 24, 2024.

Usage

  1. Navigate to claude.ai.
  2. Open the chat thread you'd like to export.
  3. Open the browser console (how to open console: Chrome, Firefox, Safari)
  4. Follow the below steps depending on which output type you'd like.

[!IMPORTANT]
Always be careful when pasting code into the console. Only paste code from trusted sources, as it can be used to execute malicious code. You can explore this repository and verify the code before pasting it into the console, or clone and build the code yourself.

JSON

  1. Copy contents of /dist/json.min.js
  2. Paste into browser console

Example output (JSON):

{
    "meta": {
        "exported_at": "2024-03-19 16:03:09",
        "title": "Sending Javascript Requests"
    },
    "chats": [
        {
            "index": 0,
            "type": "prompt",
            "message": [
                {
                    "type": "p",
                    "data": "How can I send a request in Javascript?"
                }
            ]
        },
        {
            "index": 1,
            "type": "response",
            "message": [
                {
                    "type": "p",
                    "data": "In JavaScript, you can send a request using the built-in fetch function or the XMLHttpRequest object. Here's an example using fetch:"
                },
                {
                    "type": "pre",
                    "language": "javascript",
                    "data": "fetch('https://api.example.com/data')\n  .then(response => response.json())\n  .then(data => {\n    // Handle the response data\n    console.log(data);\n  })\n  .catch(error => {\n    // Handle any errors\n    console.error('Error:', error);\n  });"
                },
                {
                    "type": "p",
                    "data": "In this example, fetch sends a GET request to the specified URL (https://api.example.com/data). The then block is used to handle the response. The first then converts the response to JSON format using response.json(), and the second then receives the parsed JSON data, which you can then process as needed."
                },
            ]
        },
    ]
}

Markdown

  1. Copy contents of /dist/md.min.js
  2. Paste into browser console

Example output (Markdown):

# Sending Javascript Requests
`2024-03-19 16:04:20`

_Prompt_:
How can I send a request in Javascript?

_Claude_:
In JavaScript, you can send a request using the built-in fetch function or the XMLHttpRequest object. Here's an example using fetch:

```javascript
fetch('https://api.example.com/data')
.then(response => response.json())
.then(data => {
    // Handle the response data
    console.log(data);
})
.catch(error => {
    // Handle any errors
    console.error('Error:', error);
});
```

In this example, fetch sends a GET request to the specified URL (https://api.example.com/data). The then block is used to handle the response. The first then converts the response to JSON format using response.json(), and the second then receives the parsed JSON data, which you can then process as needed.

Image (.PNG)

  1. Copy contents of /dist/image.min.js
  2. Paste into browser console

[!NOTE]
Downloading as an image uses the html2canvas library to take a screenshot of the chat log. This may take a few seconds to process.

Example output (Image Export):

alt text

Limitations

This is a trivial implementation as Claude currently does not support sharing or exporting conversations. It may break with future changes.

It currently supports:

  • Paragraphs / Text
  • Lists
  • Code blocks
  • Tables

Acknowledgements

  • html2canvas - Used to take a screenshot of the chat log and export as a PNG.

You May Also Like

chatgpt-export - Export OpenAI ChatGPT conversations to markdown, JSON, and PNG for sharing and exporting chat logs.

Future Development

  • Nested code blocks (within lists)
  • Nested lists
  • Fix syntax highlighting
  • Trim whitespace on exported images

// compatibility

Platformsapi, web
Operating systems
AI compatibilityclaude
LicenseNOASSERTION
Pricingopen-source
LanguageJavaScript

// faq

What is claude-export?

Browser script to share and export Anthropic Claude chat logs to Markdown, JSON, or as Image (PNG). It is open-source on GitHub.

Is claude-export free to use?

claude-export is open-source under the NOASSERTION license, so it is free to use.

What category does claude-export belong to?

claude-export is listed under devtools in the Claudeers registry of Claude-compatible tools.

0 views
166 stars
unclaimed
updated 15 days ago

// embed badge

claude-export on Claudeers
[![Claudeers](https://claudeers.com/api/badge/claude-export.svg)](https://claudeers.com/claude-export)

// retro hit counter

claude-export hit counter
[![Hits](https://claudeers.com/api/counter/claude-export.svg)](https://claudeers.com/claude-export)

// reviews

// guestbook

0/500

// related in Education & Learning

🔓

Skills for Real Engineers. Straight from my .claude directory.

// educationmattpocock/Shell161,354MIT[ claude ]
🔓

A collection of learning resources for curious software engineers

// educationcharlax/Python51,218MIT[ claude ]
🔓

Powerful AI Client

// educationchatboxai/TypeScript40,855GPL-3.0[ claude ]
🔓

Course to get into Large Language Models (LLMs) with roadmaps and Colab notebooks.

// educationmlabonne/80,762Apache-2.0[ claude ]
→ see how claude-export connects across the ecosystem