API ReferenceΒΆ

libvcs exposes three public subsystems – URL parsing, command execution, and repository synchronization – plus a pytest plugin for test fixtures.

All APIs are pre-1.0 and may change between minor versions. Pin to a range: libvcs>=0.39,<0.40.

SubsystemsΒΆ

URL Parsing

Detect, validate, and normalize Git / Hg / SVN URLs. Typed dataclasses with pip- and npm-style support.

URL Parser - libvcs.url
Commands

Thin Python wrappers around git, hg, and svn CLIs. Fine-grained control over individual VCS operations.

Commands - libvcs.cmd
Sync

High-level clone-and-update for local repositories. One call to fetch or create a working copy.

Sync - libvcs.sync
pytest Plugin

Session-scoped fixtures for Git, SVN, and Mercurial repositories. Drop-in test isolation.

api/pytest-plugin