Metadata-Version: 2.4
Name: ventwig
Version: 0.1.0
Summary: Vendor git source directories into your project tree
Project-URL: Homepage, https://github.com/brianpond/ventwig
Project-URL: Repository, https://github.com/brianpond/ventwig
Project-URL: Bug Tracker, https://github.com/brianpond/ventwig/issues
Author-email: Brian Pond <brian@datahenge.com>
License: MIT License
        
        Copyright (c) 2026 Brian Pond
        
        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:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        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.
License-File: LICENSE
Keywords: dependencies,git,source,vendor,vendoring
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: tomli-w>=1.0
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: twine>=5.0; extra == 'dev'
Description-Content-Type: text/markdown

# ventwig

Vendors source directories from a git repository into your project — as plain files, not as a submodule or package dependency.

## Problem

If you maintain several small CLI tools that share configuration and logging boilerplate, the options are:

- Add a runtime PyPI dependency on that boilerplate — which anyone forking the tool has to explain
- Copy the files by hand — which drifts

ventwig is a third option: a dev-time tool that clones a canonical upstream repo, copies a designated subdirectory into your project tree, and tracks a content hash so it can detect if the local copy has been hand-edited since the last sync.

## Install

```
pip install ventwig
```

ventwig is a dev-time tool. Do not list it in `[project.dependencies]`.

## Configure

In your project's `pyproject.toml`:

```toml
[[tool.ventwig.sources]]
name          = "appkit"
local_path    = "vendor/appkit"
upstream      = "https://github.com/you/appkit.git"
upstream_path = "src/appkit"    # optional — defaults to repo root
ref           = "main"          # branch name or tag
```

Multiple `[[tool.ventwig.sources]]` entries are allowed. ventwig requires the consuming project to be inside a git working tree.

## Use

```
ventwig sync              # sync all configured sources
ventwig sync appkit       # sync one source by name
ventwig sync --dry-run    # preview changes without writing anything
ventwig sync --force      # overwrite even if local content has drifted

ventwig status            # show sync state for all sources
ventwig status appkit     # show sync state for one source
```

After a successful sync, ventwig writes `.ventwig.lock` alongside your `pyproject.toml`. Commit it — it records the synced commit hash and a content tree hash used for drift detection on the next sync.

## What it is not

- Not a package manager. It vendors files, not installed packages.
- Not bidirectional. Edits always happen upstream; ventwig only pulls.
- Not `git subtree` or `git submodule`. The vendored directory is plain tracked content with no git history coupling.
