Metadata-Version: 2.4
Name: matter2
Version: 0.3.0
Summary: A version control system for office documents
Project-URL: Source, https://github.com/JSv4/Matter2
Project-URL: Issues, https://github.com/JSv4/Matter2/issues
Author-email: JSv4 <scrudato@umich.edu>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: documents,vcs,version-control
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: click>=8.0
Requires-Dist: peewee>=3.16
Requires-Dist: rich>=13
Provides-Extra: dev
Requires-Dist: pytest-tmp-files>=0.0.2; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Provides-Extra: diff
Requires-Dist: pypdf>=3.12; extra == 'diff'
Requires-Dist: python-docx>=0.8.11; extra == 'diff'
Provides-Extra: llm
Requires-Dist: anthropic>=0.20; extra == 'llm'
Description-Content-Type: text/markdown

# Matter2

A version control system for office documents.

[![PyPI - Version](https://img.shields.io/pypi/v/matter2.svg)](https://pypi.org/project/matter2)

## What is Matter?

Matter is a VCS designed for office documents (DOCX, PPTX, PDF, etc.) rather than source code. It provides:

- **ZIP-aware storage** — Office formats are unpacked and stored efficiently. A one-word edit to a DOCX doesn't duplicate the entire file.
- **Document identity tracking** — Rename a file and Matter knows it's the same document.
- **Branch and merge** — Branch document collections for review cycles. Conflicts are surfaced as side-by-side files for manual resolution.
- **Portable format** — Export a repository as a self-contained archive.

## Installation

```bash
pip install matter2
```

With optional diff support (DOCX/PDF text extraction):

```bash
pip install matter2[diff]
```

## Quick Start

```bash
# Initialize a repository
matter init

# Add and commit documents
matter add contract.docx proposal.pdf
matter commit -m "Initial documents" -a user@example.com

# Check status
matter status

# View history
matter log

# Branch for review
matter branch client-review
matter switch client-review

# Merge back
matter switch main
matter merge client-review

# Track a document across renames
matter track contract.docx

# Export for sharing
matter export backup.tar.gz
```

## Library Usage

```python
from matter import Repository

repo = Repository.init("/path/to/repo")
repo.add(["contract.docx"])
cp = repo.commit(message="Add contract", author="user@example.com")
content = repo.restore(cp.id, "contract.docx")
```

## Architecture

See [design spec](docs/superpowers/specs/2026-04-08-matter2-redesign-design.md) for the full architecture.

## License

MIT
