# track-changes
Extract track changes from a Word document.
## Synopsis
```
## Description
Extract tracked changes (revisions) from Microsoft Word documents (.docx). Returns the changes in HTML and/or markdown format, showing insertions, deletions, and comments.
---
## Arguments
| `<FILE\|URL>` | DOCX file path or URL |
---
## Options
### Output Options
| `--output-format <FORMATS>` | Output formats: `html`, `markdown` (comma-separated) | `html,markdown` |
| `--paginate` | Add page markers to output | - |
| `-o, --output <FILE>` | Write result to file | - |
### Cache Options
| `--skip-cache` | Skip local cache lookup |
### Advanced Options
| `--timeout <SECS>` | Request timeout in seconds | `300` |
---
## Examples
### Basic Usage
```bash
# Extract track changes (both HTML and markdown)
datalab track-changes document.docx
```
### HTML Only
```bash
datalab track-changes document.docx --output-format html
```
### Markdown Only
```bash
datalab track-changes document.docx --output-format markdown
```
### Save to File
```bash
datalab track-changes document.docx --output changes.json
```
### With Page Markers
```bash
datalab track-changes document.docx --paginate
```
---
## Output Schema
```json
{
"html": "<p>Original text <del>deleted text</del> <ins>inserted text</ins></p>",
"markdown": "Original text ~~deleted text~~ **inserted text**",
"metadata": {
"total_changes": 15,
"insertions": 8,
"deletions": 5,
"comments": 2,
"processing_time": 1.2
}
}
```
---
## Supported Change Types
| Insertions | `<ins>text</ins>` | `**text**` |
| Deletions | `<del>text</del>` | `~~text~~` |
| Comments | `<span class="comment">text</span>` | `[comment: text]` |
---
## Related Commands
- [`convert`](convert.md) - Convert documents without track changes
- [`create-document`](create-document.md) - Create new documents
---
## See Also
- [Output Formats](../concepts/output-formats.md)