PHPackages                             abrha/jig - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. abrha/jig

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

abrha/jig
=========

Minimal Docker-based local development environment for PHP packages.

v0.1.0(yesterday)053↑2617%MITShellCI passing

Since Aug 24Pushed todayCompare

[ Source](https://github.com/abrhadev/jig)[ Packagist](https://packagist.org/packages/abrha/jig)[ RSS](/packages/abrha-jig/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

abrha/jig
=========

[](#abrhajig)

A Docker-based development environment for PHP package tooling.

Support
-------

[](#support)

jig supports Linux, including WSL2, with Docker Compose v2. Native Windows and Docker Desktop for macOS are not supported.

The default image uses PHP 8.4. Set `JIG_PHP_VERSION` to build another official PHP CLI image, such as 8.2 or 8.3; only 8.4 is covered by this project's CI.

Installation
------------

[](#installation)

With PHP and Composer installed on the host:

```
composer require --dev abrha/jig
./vendor/bin/jig stub
```

With Docker instead of host PHP and Composer:

```
docker run --rm \
    --user "$(id -u):$(id -g)" \
    -e COMPOSER_HOME=/tmp/composer \
    -v "$PWD:/app" \
    -w /app \
    composer:2 \
    composer require --dev abrha/jig
./vendor/bin/jig stub
```

Commit `jig` and `jig.env.example`, and add `jig.env` to `.gitignore`. On a fresh clone, `./jig` uses Docker to install Composer dependencies before running the requested command.

Install tagged releases. The `dev-main` branch is not a supported installation.

Supported tools
---------------

[](#supported-tools)

jig supports one tool from each axis:

AxisToolsTestsPest, PHPUnitStyleLaravel Pint, PHP CS FixerAnalysisPHPStan, PsalmThe tool selected in the shell environment or `jig.env` takes precedence. Otherwise jig detects executable tools in `vendor/bin`. If none or more than one tool exists for an axis, jig stops and asks for an explicit selection.

```
JIG_TEST_TOOL=phpunit
JIG_STYLE_TOOL=php-cs-fixer
JIG_ANALYSIS_TOOL=psalm
```

Usage
-----

[](#usage)

```
./jig test
./jig quality
./jig coverage --min-method=80 --min-line=80 --html
```

CommandDescription`jig test [args]`Run the selected Pest or PHPUnit executable`jig pest [args]` / `jig phpunit [args]`Run a test tool explicitly`jig pint [args]` / `jig php-cs-fixer [args]`Run a style tool explicitly`jig analyse [args]`Run the selected PHPStan or Psalm executable`jig coverage [--min-*] [--html]`Run selected tests with coverage thresholds`jig quality`Run selected style, analysis, and test/coverage tools`jig composer `Run Composer in the container`jig shell`Open an interactive shell`jig doctor`Diagnose the local setup`jig help`Show every commandUnrecognised commands are executed from `vendor/bin` when present.

Configuration
-------------

[](#configuration)

`jig stub` writes `jig.env.example`. Copy it to `jig.env` for local overrides. Do not commit `jig.env`.

Precedence, highest first: shell environment, `jig.env`, built-in defaults.

VariableDefault`JIG_PHP_VERSION``8.4``JIG_IMAGE``abrha/jig:``JIG_TEST_TOOL` / `JIG_STYLE_TOOL` / `JIG_ANALYSIS_TOOL`auto-detect`JIG_PHPSTAN_MEMORY``512M``JIG_MIN_LINE` / `JIG_MIN_METHOD` / `JIG_MIN_CLASS`unset`JIG_QUALITY_MIN_LINE` / `JIG_QUALITY_MIN_METHOD` / `JIG_QUALITY_MIN_CLASS``80` / `80` / unset`JIG_COMPOSER_CACHE``~/.cache/abrha-jig/composer``JIG_SSH`unset (SSH off)`JIG_SSH_DIR`unsetImage
-----

[](#image)

The tooling image contains PHP CLI, Composer, Git, OpenSSH, PCOV, XML, `mbstring`, `pdo_sqlite`, and `zip`. It is built locally as `abrha/jig:`; this name does not refer to a published Docker image.

The container user is created from the host UID/GID at build time. Run `jig build` after a UID/GID change.

Packages needing services or extensions such as MySQL, Redis, GD, or Intl should run `jig publish`, which copies the runtime files into `docker/jig/`, then customise the copied Dockerfile.

Private Composer repositories
-----------------------------

[](#private-composer-repositories)

SSH support is optional and disabled by default. jig never mounts or copies `~/.ssh` automatically.

Set `JIG_SSH=1`, then choose one mode:

1. Load a key into an SSH agent. jig forwards its socket:

    ```
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_ed25519
    ```
2. Set `JIG_SSH_DIR` to a dedicated key directory. jig mounts that directory read-only and copies it into the container. Do not point this at all of `~/.ssh`.

Both modes use `StrictHostKeyChecking=accept-new`. Verify host fingerprints before first use when the repository is security-sensitive. Restart the jig container after changing the agent socket.

Report security problems through GitHub's private vulnerability reporting, not a public issue.

Troubleshooting
---------------

[](#troubleshooting)

SymptomActionUnexpected state`jig doctor`More than one tool detectedSelect the tool in `jig.env`Permission errors on generated filesRun `jig build`, then `jig up`SSH authentication fails after agent restartRun `jig restart`Stale environmentRun `jig reset`Composer cache problemsRemove `~/.cache/abrha-jig/composer`License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8321d85dc7878122fe527ff0a12c6ae513ccd5ad0b7d9f84e6c363dda4a8bc1c?d=identicon)[H4M3D3](/maintainers/H4M3D3)

---

Top Contributors

[![hamed-ehtesham](https://avatars.githubusercontent.com/u/14082075?v=4)](https://github.com/hamed-ehtesham "hamed-ehtesham (1 commits)")

---

Tags

developmentdockerAbrhajig

### Embed Badge

![Health badge](/badges/abrha-jig/health.svg)

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

###  Alternatives

[spatie/docker

Run a docker container in your PHPUnit tests

487141.0k13](/packages/spatie-docker)[ryoluo/sail-ssl

Laravel Sail plugin to enable SSL (HTTPS) connection with Nginx.

192810.9k3](/packages/ryoluo-sail-ssl)[testcontainers/testcontainers

Testcontainers implementation in PHP

214359.9k47](/packages/testcontainers-testcontainers)[aschmelyun/fleet

Run multiple Laravel Sail websites on your local environment

33481.8k](/packages/aschmelyun-fleet)[contributte/bootstrap

Extra contrib to nette/boostrap

111.5M3](/packages/contributte-bootstrap)[vcian/pulse-docker-monitor

A Laravel Pulse card to show docker containers with CPU &amp; Memory Utilization

3410.9k](/packages/vcian-pulse-docker-monitor)

PHPackages © 2026

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