PHPackages                             artistan/git-info - 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. artistan/git-info

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

artistan/git-info
=================

automatic env configurations dependent on git branch (non-production) or tag (production)

2.0.1(7y ago)052GPL-2.0-or-laterPHPPHP &gt;=5.6.4

Since Jul 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Artistan/git-info)[ Packagist](https://packagist.org/packages/artistan/git-info)[ Docs](https://github.com/Artistan/git-info)[ RSS](/packages/artistan-git-info/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (5)Versions (8)Used By (0)

Artistan/git-info
=================

[](#artistangit-info)

[![Packagist](https://camo.githubusercontent.com/e4cedc9896ab28b500e52bec6de4b5ac59f50dd5b6b5cf2ecc02bd36a2cdb588/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617274697374616e2f6769742d696e666f2e7376673f6d61784167653d33363030)](https://packagist.org/packages/artistan/git-info)[![Packagist](https://camo.githubusercontent.com/2642318391fc7302e9b41650452f9d9e5696a48afa0fe6160c5d90cdf4eedb20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617274697374616e2f6769742d696e666f2e7376673f6d61784167653d33363030)](https://packagist.org/packages/artistan/git-info)[![Coverage Status](https://camo.githubusercontent.com/d428f7723e1909bcc4d4b89fd79bc97ddbf9c13edc84a9f67b4205d2c234376a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f417274697374616e2f6769742d696e666f2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Artistan/git-info?branch=master)[![Build Status](https://camo.githubusercontent.com/2974e067b897be3585c8b09a55a6abdec2a8c2135082c9faf62879368c45735e/68747470733a2f2f7472617669732d63692e6f72672f417274697374616e2f6769742d696e666f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Artistan/git-info)

[Artistan/git-info](https://github.com/Artistan/git-info) assists with dynamic environment configurations based on your git branch or tag.

git-info will create a config that you can use to link to dynamic places such as versioned cdn repository folders.

Works well as a simple Php object or as a package for Laravel 5.6.

### composer

[](#composer)

```
    "require": {
        "artistan/git-info": "*"
    }
```

### cli install

[](#cli-install)

```
composer require artistan/git-info
php artisan vendor:publish --provider=artistan/git-info
```

#### [Example Laravel](https://github.com/Artistan/git-info/blob/master/example/example.md)

[](#example-laravel)

`./app/Providers/AppServiceProvider.php`

```
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        /**
         * last-cached will be null if not cached...
         */
        if (is_null(config('cdn.last-cached'))) {
            config([
                'cdn.last-cached' => microtime(true),
                /**
                 * This will set my path dynamically based on the tag/branch
                 */
                'cdn.path' => config('git-info.path'),
                'cdn.url' => config('cdn.uri').config('git-info.path')
            ]);
        }
        /**
         * now I can use config('cdn.url') to route to my current versioned content on my cdn
         */
    }
```

#### Example Php

[](#example-php)

```
require '../vendor/autoload.php';

$git = new Artistan\GitInfo\GitInfoEnv();

// build all dynamic with
var_dump($git->getConfigs('/path/[REPO]/[BRANCH]/[TAG]'))

// or dig into all the options...
var_dump($git->getShortHash());
var_dump($git->getVersion());
var_dump($git->getDate());
var_dump($git->getApplicationVersionString());
var_dump($repo = $git->getRepo());
var_dump($branch = $git->getBranch());
var_dump($tag = $git->getLatestTag());
// null coalesce allows $tag to failover to $branch if it is null
var_dump($path = $git->buildPath($repo,$branch,$tag??$branch,null));
```

will end up with `/path/branchName` or `/path/{v#.#.#}`

#### [Documentation](https://github.com/victorjonsson/PHP-Markdown-Documentation-Generator) Updates

[](#documentation-updates)

[PHP-Markdown-Documentation-Generator](https://github.com/victorjonsson/PHP-Markdown-Documentation-Generator)

```
./vendor/bin/phpdoc-md generate --ignore=test,examples src > api.md
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~0 days

Total

6

Last Release

2904d ago

Major Versions

1.0.3 → 2.0.12018-07-19

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/801349?v=4)[Charles Peterson](/maintainers/Artistan)[@Artistan](https://github.com/Artistan)

---

Tags

laravelconfigurationautomationenvgitdynamicinfoLaravel 5.6

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/artistan-git-info/health.svg)

```
[![Health](https://phpackages.com/badges/artistan-git-info/health.svg)](https://phpackages.com/packages/artistan-git-info)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M342](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[msztorc/laravel-env

Laravel env helper commands

7858.2k](/packages/msztorc-laravel-env)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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