libvcs · Python Package License Code Coverage#

libvcs is a lite, typed, pythonic wrapper for git, hg, and svn. Powers vcspull.


$ pip install --user libvcs

Open up python:

$ python

Or for nice autocompletion and highlighting:

$ pip install --user ptpython
$ ptpython

Commands (experimental)#

Simple subprocess wrappers around git(1), hg(1), svn(1). Here is Git w/ Git.clone:

import pathlib
from libvcs.cmd.git import Git

git = Git(dir=pathlib.Path.cwd() / 'my_git_repo')


Create a GitProject object of the project to inspect / checkout / update:

import pathlib
from libvcs.projects.git import GitProject

repo = GitProject(
   dir=pathlib.Path().cwd() / "my_repo",
       'gitlab': ''

Update / clone repo:

>>> r.update_repo()

Get revision:

>>> r.get_revision()


Your donations fund development of new features, testing and support. Your money will go directly to maintenance and development of the project. If you are an individual, feel free to give whatever feels right for the value you get out of the project.

See donation options at

More information#

Docs Build Status