matter2 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. matter2-0.3.0/.gitattributes +14 -0
  2. matter2-0.3.0/.github/workflows/claude-code-review.yml +44 -0
  3. matter2-0.3.0/.github/workflows/claude.yml +50 -0
  4. matter2-0.3.0/.github/workflows/publish.yml +43 -0
  5. matter2-0.3.0/.github/workflows/tests.yml +28 -0
  6. matter2-0.3.0/.gitignore +163 -0
  7. matter2-0.3.0/.idea/.gitignore +8 -0
  8. matter2-0.3.0/.idea/Matter2.iml +14 -0
  9. matter2-0.3.0/.idea/inspectionProfiles/profiles_settings.xml +6 -0
  10. matter2-0.3.0/.idea/misc.xml +7 -0
  11. matter2-0.3.0/.idea/modules.xml +8 -0
  12. matter2-0.3.0/.idea/vcs.xml +6 -0
  13. matter2-0.3.0/CLAUDE.md +61 -0
  14. matter2-0.3.0/LICENSE.txt +9 -0
  15. matter2-0.3.0/PKG-INFO +106 -0
  16. matter2-0.3.0/README.md +76 -0
  17. matter2-0.3.0/docs/architecture.md +103 -0
  18. matter2-0.3.0/docs/superpowers/plans/2026-04-08-matter2-redesign.md +4104 -0
  19. matter2-0.3.0/docs/superpowers/specs/2026-04-08-matter2-redesign-design.md +395 -0
  20. matter2-0.3.0/matter/__about__.py +1 -0
  21. matter2-0.3.0/matter/__init__.py +4 -0
  22. matter2-0.3.0/matter/cli/__init__.py +0 -0
  23. matter2-0.3.0/matter/cli/commands/__init__.py +0 -0
  24. matter2-0.3.0/matter/cli/commands/branch.py +112 -0
  25. matter2-0.3.0/matter/cli/commands/diff.py +21 -0
  26. matter2-0.3.0/matter/cli/commands/history.py +61 -0
  27. matter2-0.3.0/matter/cli/commands/identity.py +48 -0
  28. matter2-0.3.0/matter/cli/commands/portability.py +35 -0
  29. matter2-0.3.0/matter/cli/commands/repo.py +45 -0
  30. matter2-0.3.0/matter/cli/commands/staging.py +51 -0
  31. matter2-0.3.0/matter/cli/display.py +49 -0
  32. matter2-0.3.0/matter/cli/main.py +43 -0
  33. matter2-0.3.0/matter/diff/__init__.py +0 -0
  34. matter2-0.3.0/matter/diff/llm.py +31 -0
  35. matter2-0.3.0/matter/diff/text.py +61 -0
  36. matter2-0.3.0/matter/engine/__init__.py +0 -0
  37. matter2-0.3.0/matter/engine/branch.py +27 -0
  38. matter2-0.3.0/matter/engine/cache.py +41 -0
  39. matter2-0.3.0/matter/engine/commit.py +104 -0
  40. matter2-0.3.0/matter/engine/identity.py +104 -0
  41. matter2-0.3.0/matter/engine/merge.py +89 -0
  42. matter2-0.3.0/matter/engine/staging.py +38 -0
  43. matter2-0.3.0/matter/engine/status.py +78 -0
  44. matter2-0.3.0/matter/metadata/__init__.py +0 -0
  45. matter2-0.3.0/matter/metadata/database.py +22 -0
  46. matter2-0.3.0/matter/metadata/models.py +83 -0
  47. matter2-0.3.0/matter/repository.py +316 -0
  48. matter2-0.3.0/matter/storage/__init__.py +0 -0
  49. matter2-0.3.0/matter/storage/delta.py +32 -0
  50. matter2-0.3.0/matter/storage/objects.py +51 -0
  51. matter2-0.3.0/matter/storage/zip_handler.py +61 -0
  52. matter2-0.3.0/pyproject.toml +75 -0
  53. matter2-0.3.0/test2.txt +1 -0
  54. matter2-0.3.0/tests/__init__.py +0 -0
  55. matter2-0.3.0/tests/conftest.py +44 -0
  56. matter2-0.3.0/tests/diff/__init__.py +0 -0
  57. matter2-0.3.0/tests/diff/test_text.py +34 -0
  58. matter2-0.3.0/tests/engine/__init__.py +0 -0
  59. matter2-0.3.0/tests/engine/test_branch.py +62 -0
  60. matter2-0.3.0/tests/engine/test_cache.py +45 -0
  61. matter2-0.3.0/tests/engine/test_commit.py +92 -0
  62. matter2-0.3.0/tests/engine/test_identity.py +59 -0
  63. matter2-0.3.0/tests/engine/test_merge.py +106 -0
  64. matter2-0.3.0/tests/engine/test_staging.py +45 -0
  65. matter2-0.3.0/tests/engine/test_status.py +67 -0
  66. matter2-0.3.0/tests/metadata/__init__.py +0 -0
  67. matter2-0.3.0/tests/metadata/test_models.py +101 -0
  68. matter2-0.3.0/tests/storage/__init__.py +0 -0
  69. matter2-0.3.0/tests/storage/test_delta.py +33 -0
  70. matter2-0.3.0/tests/storage/test_objects.py +55 -0
  71. matter2-0.3.0/tests/storage/test_zip_handler.py +94 -0
  72. matter2-0.3.0/tests/test_cli.py +83 -0
  73. matter2-0.3.0/tests/test_export_import.py +57 -0
  74. matter2-0.3.0/tests/test_repository.py +144 -0
@@ -0,0 +1,14 @@
1
+ # Set the default behavior to LF EOL
2
+ * text=auto eol=lf
3
+
4
+ # Explicitly declare text files you want to always be normalized and converted
5
+ # to native line endings on checkout.
6
+ *.c text
7
+ *.h text
8
+
9
+ # Declare files that will always have LF line endings on checkout.
10
+ *.sln text eol=lf
11
+
12
+ # Denote all files that are truly binary and should not be modified.
13
+ *.png binary
14
+ *.jpg binary
@@ -0,0 +1,44 @@
1
+ name: Claude Code Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, ready_for_review, reopened]
6
+ # Optional: Only run on specific file changes
7
+ # paths:
8
+ # - "src/**/*.ts"
9
+ # - "src/**/*.tsx"
10
+ # - "src/**/*.js"
11
+ # - "src/**/*.jsx"
12
+
13
+ jobs:
14
+ claude-review:
15
+ # Optional: Filter by PR author
16
+ # if: |
17
+ # github.event.pull_request.user.login == 'external-contributor' ||
18
+ # github.event.pull_request.user.login == 'new-developer' ||
19
+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20
+
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: read
24
+ pull-requests: read
25
+ issues: read
26
+ id-token: write
27
+
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 1
33
+
34
+ - name: Run Claude Code Review
35
+ id: claude-review
36
+ uses: anthropics/claude-code-action@v1
37
+ with:
38
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
+ plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
40
+ plugins: 'code-review@claude-code-plugins'
41
+ prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
42
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
43
+ # or https://code.claude.com/docs/en/cli-reference for available options
44
+
@@ -0,0 +1,50 @@
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ pull-requests: read
24
+ issues: read
25
+ id-token: write
26
+ actions: read # Required for Claude to read CI results on PRs
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 1
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
+
39
+ # This is an optional setting that allows Claude to read CI results on PRs
40
+ additional_permissions: |
41
+ actions: read
42
+
43
+ # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
+ # prompt: 'Update the pull request description to include a summary of changes.'
45
+
46
+ # Optional: Add claude_args to customize behavior and configuration
47
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
+ # or https://code.claude.com/docs/en/cli-reference for available options
49
+ # claude_args: '--allowed-tools Bash(gh pr:*)'
50
+
@@ -0,0 +1,43 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ id-token: write
9
+
10
+ jobs:
11
+ build:
12
+ name: Build distribution
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.12"
19
+ - name: Install build tools
20
+ run: pip install build
21
+ - name: Build package
22
+ run: python -m build
23
+ - name: Upload dist artifacts
24
+ uses: actions/upload-artifact@v4
25
+ with:
26
+ name: dist
27
+ path: dist/
28
+
29
+ publish:
30
+ name: Publish to PyPI
31
+ needs: build
32
+ runs-on: ubuntu-latest
33
+ environment: pypi
34
+ permissions:
35
+ id-token: write
36
+ steps:
37
+ - name: Download dist artifacts
38
+ uses: actions/download-artifact@v4
39
+ with:
40
+ name: dist
41
+ path: dist/
42
+ - name: Publish to PyPI
43
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: pip install -e ".[dev,diff]"
26
+
27
+ - name: Run tests
28
+ run: pytest tests -v
@@ -0,0 +1,163 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ #.idea/
161
+
162
+ # Just in case we created a matter repo in the root during testing, ignore it.
163
+ .matter/
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.venv" />
6
+ </content>
7
+ <orderEntry type="jdk" jdkName="Python 3.10 (Matter2)" jdkType="Python SDK" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ <component name="PyDocumentationSettings">
11
+ <option name="format" value="PLAIN" />
12
+ <option name="myDocStringFormat" value="Plain" />
13
+ </component>
14
+ </module>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="Python 3.10" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (Matter2)" project-jdk-type="Python SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/Matter2.iml" filepath="$PROJECT_DIR$/.idea/Matter2.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,61 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ Matter2 is a purpose-built VCS for office documents (DOCX, PPTX, PDF, etc.). CLI-first tool (like Git) with a clean library interface. ZIP-aware storage unpacks office formats for efficient delta storage. Hash-based document identity tracking across renames. No ML dependencies in core.
8
+
9
+ ## Build & Development
10
+
11
+ ```bash
12
+ pip install -e ".[dev,diff]"
13
+ ```
14
+
15
+ ## Testing
16
+
17
+ ```bash
18
+ pytest tests # all tests
19
+ pytest tests/storage/test_objects.py # single file
20
+ pytest tests/test_repository.py::TestClass::test_method # single test
21
+ pytest tests -v # verbose
22
+ ```
23
+
24
+ Tests use pytest with `tmp_path` fixtures. Test DOCX/ZIP files are created programmatically via helpers in `tests/conftest.py` (`make_zip`, `make_docx`).
25
+
26
+ ## Linting
27
+
28
+ ```bash
29
+ ruff check .
30
+ black --check .
31
+ ```
32
+
33
+ Line length: 120. Target: Python 3.10+.
34
+
35
+ ## Architecture
36
+
37
+ ### Layer Diagram
38
+
39
+ ```
40
+ CLI (Click/Rich) -> Repository -> Engine -> Storage + Metadata
41
+ ```
42
+
43
+ - **`matter/storage/`** — Content-addressed object store. ZIP-aware: unpacks office formats, stores internal files individually with dedup. Objects sharded by SHA-256 prefix.
44
+ - **`matter/metadata/`** — SQLite via Peewee ORM. Tables: Checkpoint (commits), Branch, TreeEntry, Document (stable UUID), RepoState.
45
+ - **`matter/engine/`** — Business logic: status detection, staging, commit creation, branch management, merge with conflict detection, document identity/rename tracking.
46
+ - **`matter/diff/`** — Text extraction + unified diff. Optional LLM summaries.
47
+ - **`matter/cli/`** — Click commands + Rich display. Never touches storage/metadata directly.
48
+ - **`matter/repository.py`** — `Repository` class, the sole public API. No interactive prompts.
49
+
50
+ ### Git & VCS Rules
51
+
52
+ - Never mention Claude, Anthropic, or any AI assistant in commit messages, PR titles, PR descriptions, or any VCS artifact. No Co-Authored-By lines, no "Generated by" footers, nothing.
53
+
54
+ ### Key Design Rules
55
+
56
+ - Storage and metadata layers are independent of each other
57
+ - The engine layer connects them
58
+ - The CLI only talks to Repository
59
+ - The library never prompts the user — conflicts/choices returned as data
60
+ - ZIP internals treated as opaque bytes, never parsed/validated
61
+ - All paths in metadata are relative to repo root
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present JSv4 <scrudato@umich.edu>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
matter2-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: matter2
3
+ Version: 0.3.0
4
+ Summary: A version control system for office documents
5
+ Project-URL: Source, https://github.com/JSv4/Matter2
6
+ Project-URL: Issues, https://github.com/JSv4/Matter2/issues
7
+ Author-email: JSv4 <scrudato@umich.edu>
8
+ License-Expression: MIT
9
+ License-File: LICENSE.txt
10
+ Keywords: documents,vcs,version-control
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: click>=8.0
19
+ Requires-Dist: peewee>=3.16
20
+ Requires-Dist: rich>=13
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest-tmp-files>=0.0.2; extra == 'dev'
23
+ Requires-Dist: pytest>=7.0; extra == 'dev'
24
+ Provides-Extra: diff
25
+ Requires-Dist: pypdf>=3.12; extra == 'diff'
26
+ Requires-Dist: python-docx>=0.8.11; extra == 'diff'
27
+ Provides-Extra: llm
28
+ Requires-Dist: anthropic>=0.20; extra == 'llm'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # Matter2
32
+
33
+ A version control system for office documents.
34
+
35
+ [![PyPI - Version](https://img.shields.io/pypi/v/matter2.svg)](https://pypi.org/project/matter2)
36
+
37
+ ## What is Matter?
38
+
39
+ Matter is a VCS designed for office documents (DOCX, PPTX, PDF, etc.) rather than source code. It provides:
40
+
41
+ - **ZIP-aware storage** — Office formats are unpacked and stored efficiently. A one-word edit to a DOCX doesn't duplicate the entire file.
42
+ - **Document identity tracking** — Rename a file and Matter knows it's the same document.
43
+ - **Branch and merge** — Branch document collections for review cycles. Conflicts are surfaced as side-by-side files for manual resolution.
44
+ - **Portable format** — Export a repository as a self-contained archive.
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ pip install matter2
50
+ ```
51
+
52
+ With optional diff support (DOCX/PDF text extraction):
53
+
54
+ ```bash
55
+ pip install matter2[diff]
56
+ ```
57
+
58
+ ## Quick Start
59
+
60
+ ```bash
61
+ # Initialize a repository
62
+ matter init
63
+
64
+ # Add and commit documents
65
+ matter add contract.docx proposal.pdf
66
+ matter commit -m "Initial documents" -a user@example.com
67
+
68
+ # Check status
69
+ matter status
70
+
71
+ # View history
72
+ matter log
73
+
74
+ # Branch for review
75
+ matter branch client-review
76
+ matter switch client-review
77
+
78
+ # Merge back
79
+ matter switch main
80
+ matter merge client-review
81
+
82
+ # Track a document across renames
83
+ matter track contract.docx
84
+
85
+ # Export for sharing
86
+ matter export backup.tar.gz
87
+ ```
88
+
89
+ ## Library Usage
90
+
91
+ ```python
92
+ from matter import Repository
93
+
94
+ repo = Repository.init("/path/to/repo")
95
+ repo.add(["contract.docx"])
96
+ cp = repo.commit(message="Add contract", author="user@example.com")
97
+ content = repo.restore(cp.id, "contract.docx")
98
+ ```
99
+
100
+ ## Architecture
101
+
102
+ See [design spec](docs/superpowers/specs/2026-04-08-matter2-redesign-design.md) for the full architecture.
103
+
104
+ ## License
105
+
106
+ MIT
@@ -0,0 +1,76 @@
1
+ # Matter2
2
+
3
+ A version control system for office documents.
4
+
5
+ [![PyPI - Version](https://img.shields.io/pypi/v/matter2.svg)](https://pypi.org/project/matter2)
6
+
7
+ ## What is Matter?
8
+
9
+ Matter is a VCS designed for office documents (DOCX, PPTX, PDF, etc.) rather than source code. It provides:
10
+
11
+ - **ZIP-aware storage** — Office formats are unpacked and stored efficiently. A one-word edit to a DOCX doesn't duplicate the entire file.
12
+ - **Document identity tracking** — Rename a file and Matter knows it's the same document.
13
+ - **Branch and merge** — Branch document collections for review cycles. Conflicts are surfaced as side-by-side files for manual resolution.
14
+ - **Portable format** — Export a repository as a self-contained archive.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install matter2
20
+ ```
21
+
22
+ With optional diff support (DOCX/PDF text extraction):
23
+
24
+ ```bash
25
+ pip install matter2[diff]
26
+ ```
27
+
28
+ ## Quick Start
29
+
30
+ ```bash
31
+ # Initialize a repository
32
+ matter init
33
+
34
+ # Add and commit documents
35
+ matter add contract.docx proposal.pdf
36
+ matter commit -m "Initial documents" -a user@example.com
37
+
38
+ # Check status
39
+ matter status
40
+
41
+ # View history
42
+ matter log
43
+
44
+ # Branch for review
45
+ matter branch client-review
46
+ matter switch client-review
47
+
48
+ # Merge back
49
+ matter switch main
50
+ matter merge client-review
51
+
52
+ # Track a document across renames
53
+ matter track contract.docx
54
+
55
+ # Export for sharing
56
+ matter export backup.tar.gz
57
+ ```
58
+
59
+ ## Library Usage
60
+
61
+ ```python
62
+ from matter import Repository
63
+
64
+ repo = Repository.init("/path/to/repo")
65
+ repo.add(["contract.docx"])
66
+ cp = repo.commit(message="Add contract", author="user@example.com")
67
+ content = repo.restore(cp.id, "contract.docx")
68
+ ```
69
+
70
+ ## Architecture
71
+
72
+ See [design spec](docs/superpowers/specs/2026-04-08-matter2-redesign-design.md) for the full architecture.
73
+
74
+ ## License
75
+
76
+ MIT