PHPackages                             klaussilveira/gitter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. klaussilveira/gitter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

klaussilveira/gitter
====================

Gitter allows you to interact in an object oriented manner with Git repositories.

1.0(4y ago)20032.4k60[1 issues](https://github.com/klaussilveira/gitter/issues)[3 PRs](https://github.com/klaussilveira/gitter/pulls)5BSD-2-ClausePHPPHP &gt;=5.3

Since Sep 19Pushed 2y ago16 watchersCompare

[ Source](https://github.com/klaussilveira/gitter)[ Packagist](https://packagist.org/packages/klaussilveira/gitter)[ Docs](https://github.com/klaussilveira/gitter)[ RSS](/packages/klaussilveira-gitter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (11)Used By (5)

Gitter
======

[](#gitter)

[![Latest Stable Version](https://camo.githubusercontent.com/588c1ea5f49d7df5c559c238116055016d7a2e3ea39008cce71983b34e575068/68747470733a2f2f706f7365722e707567782e6f72672f6b6c61757373696c76656972612f6769747465722f762f737461626c652e737667)](https://packagist.org/packages/klaussilveira/gitter) [![License](https://camo.githubusercontent.com/f1faf6e23b117c5556bf695c47e9e171c46e075444f7a428fcd6af38867c1fb1/68747470733a2f2f706f7365722e707567782e6f72672f6b6c61757373696c76656972612f6769747465722f6c6963656e73652e737667)](https://packagist.org/packages/klaussilveira/gitter) [![Build Status](https://github.com/klaussilveira/gitter/actions/workflows/php.yml/badge.svg)](https://github.com/klaussilveira/gitter/actions/workflows/php.yml/badge.svg)

Gitter allows you to interact in an object oriented manner with Git repositories via PHP. The main goal of the library is not to replace the system `git` command, but provide a coherent, stable and performatic object oriented interface.

Most commands are sent to the system's `git` command, parsed and then interpreted by Gitter. Everything is transparent to you, so you don't have to worry about a thing.

Requirements
------------

[](#requirements)

- git () (tested with 1.7.5.4)

Authors and contributors
------------------------

[](#authors-and-contributors)

- [Klaus Silveira](http://www.klaussilveira.com) (Creator, developer)

License
-------

[](#license)

[New BSD license](http://www.opensource.org/licenses/bsd-license.php)

Usage
-----

[](#usage)

Gitter is very easy to use and you'll just need a few method calls to get started. For example, to create a new repository:

```
$client = new Gitter\Client;
$repository = $client->createRepository('/home/user/test');

```

Or a bare repository:

```
$client = new Gitter\Client;
$repository = $client->createRepository('/home/user/test', true);

```

Or to open an existing repository:

```
$client = new Gitter\Client;
$repository = $client->getRepository('/home/user/anothertest');

```

Both methods will return a `Repository` object, which has various methods that allow you to interact with that repository.

### Getting a list of commits

[](#getting-a-list-of-commits)

Once you get hold of the `Repository` object, you can use:

```
$commits = $repository->getCommits();
print_r($commits);

```

To get a list of various commits.

### Getting a single commit

[](#getting-a-single-commit)

Given a specific commit hash, you can find information about that commit:

```
$commit = $repository->getCommit('920be98a05');
print_r($commit);

```

### Getting statistics for repository

[](#getting-statistics-for-repository)

Statistics aggregators can be added to the repository:

```
$repository->addStatistics(array(
    new Gitter\Statistics\Contributors,
    new Gitter\Statistics\Date,
    new Gitter\Statistics\Day,
    new Gitter\Statistics\Hour
));
print_r($repository->getStatistics());

```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 53% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~378 days

Recently: every ~787 days

Total

10

Last Release

1586d ago

Major Versions

0.5.0 → 1.02022-01-13

PHP version history (2 changes)0.1.0PHP &gt;=5.3.0

0.4PHP &gt;=5.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/66ec2ec9bd5722b311c1b0ad559b8a65b238d6ff2dcf9ab7caa033e219963bfe?d=identicon)[Klaus Silveira](/maintainers/Klaus%20Silveira)

---

Top Contributors

[![klaussilveira](https://avatars.githubusercontent.com/u/467729?v=4)](https://github.com/klaussilveira "klaussilveira (44 commits)")[![modess](https://avatars.githubusercontent.com/u/1116602?v=4)](https://github.com/modess "modess (15 commits)")[![bmanolov](https://avatars.githubusercontent.com/u/249664?v=4)](https://github.com/bmanolov "bmanolov (3 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (3 commits)")[![cschorn](https://avatars.githubusercontent.com/u/332200?v=4)](https://github.com/cschorn "cschorn (2 commits)")[![saurvs](https://avatars.githubusercontent.com/u/12742708?v=4)](https://github.com/saurvs "saurvs (2 commits)")[![NateEag](https://avatars.githubusercontent.com/u/837719?v=4)](https://github.com/NateEag "NateEag (2 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (2 commits)")[![cbourgois](https://avatars.githubusercontent.com/u/56223?v=4)](https://github.com/cbourgois "cbourgois (1 commits)")[![tribis](https://avatars.githubusercontent.com/u/54670?v=4)](https://github.com/tribis "tribis (1 commits)")[![siwinski](https://avatars.githubusercontent.com/u/1034024?v=4)](https://github.com/siwinski "siwinski (1 commits)")[![spantaleev](https://avatars.githubusercontent.com/u/388669?v=4)](https://github.com/spantaleev "spantaleev (1 commits)")[![tobya](https://avatars.githubusercontent.com/u/325502?v=4)](https://github.com/tobya "tobya (1 commits)")[![tomzx](https://avatars.githubusercontent.com/u/188960?v=4)](https://github.com/tomzx "tomzx (1 commits)")[![pimlie](https://avatars.githubusercontent.com/u/1067403?v=4)](https://github.com/pimlie "pimlie (1 commits)")[![h4cc](https://avatars.githubusercontent.com/u/2981491?v=4)](https://github.com/h4cc "h4cc (1 commits)")[![imdevin567](https://avatars.githubusercontent.com/u/3077341?v=4)](https://github.com/imdevin567 "imdevin567 (1 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (1 commits)")

---

Tags

gitvcs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/klaussilveira-gitter/health.svg)

```
[![Health](https://phpackages.com/badges/klaussilveira-gitter/health.svg)](https://phpackages.com/packages/klaussilveira-gitter)
```

###  Alternatives

[cypresslab/gitelephant

An abstraction layer for git written in PHP

6131.0M23](/packages/cypresslab-gitelephant)[laravelplus/laravel-updater

A Laravel package for syncing with upstream repositories (GitHub, GitLab, Bitbucket, etc.)

201.7k](/packages/laravelplus-laravel-updater)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
