Metadata-Version: 2.4
Name: mkdocs-copy-to-llm
Version: 0.1.0
Summary: MkDocs plugin to add 'Copy to LLM' buttons to documentation
Home-page: https://github.com/leonardocustodio/mkdocs-copy-to-llm
Author: Leonardo Custodio
Author-email: leonardo@custodio.me
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/leonardocustodio/mkdocs-copy-to-llm
Project-URL: Bug Tracker, https://github.com/leonardocustodio/mkdocs-copy-to-llm/issues
Keywords: mkdocs,plugin,documentation,llm,copy
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Documentation
Classifier: Topic :: Text Processing
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mkdocs>=1.2
Dynamic: author-email
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# MkDocs Copy to LLM Plugin

A MkDocs plugin that adds "Copy to LLM" buttons to your documentation, making it easy to copy code blocks and entire pages in formats optimized for Large Language Models (LLMs).

## Features

- **Copy to LLM buttons for code blocks** - Adds a button next to each code block to copy the code with context
- **Copy entire page** - Adds a split button at the top of each page with multiple copy options:
  - Copy page content as markdown
  - Copy markdown link
  - Open in ChatGPT
  - Open in Claude
  - View raw markdown
- **Smart formatting** - Automatically formats content with proper context for LLM consumption
- **Visual feedback** - Shows success indicators and toast notifications
- **Mobile responsive** - Works seamlessly on all device sizes

## Installation

Install the plugin using pip:

```bash
pip install mkdocs-copy-to-llm
```

## Configuration

Add the plugin to your `mkdocs.yml`:

```yaml
plugins:
  - search
  - copy-to-llm
```

### Options

The plugin supports the following configuration options:

```yaml
plugins:
  - copy-to-llm:
      enabled: true  # Enable/disable the plugin (default: true)
      code_blocks: true  # Add buttons to code blocks (default: true)
      page_button: true  # Add button to page headers (default: true)
```

## How It Works

The plugin automatically:
1. Injects the necessary JavaScript and CSS files
2. Adds copy buttons to code blocks
3. Adds a split button to the main page title
4. Handles all copy operations with proper formatting

## Customization

The plugin uses CSS variables from your MkDocs theme. It integrates seamlessly with Material for MkDocs theme.

## License

Apache License 2.0
