PHPackages                             indykoning/cli-helpers - 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. indykoning/cli-helpers

ActiveLibrary

indykoning/cli-helpers
======================

Some helper cli scripts to speed up development

71817Shell

Since Jan 15Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/indykoning/cli-helpers)[ Packagist](https://packagist.org/packages/indykoning/cli-helpers)[ RSS](/packages/indykoning-cli-helpers/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Cli Helpers
===========

[](#cli-helpers)

This repository aims to make it easier to make it easier to work with Laravel, Akeneo, Magento 2 and Wordpress projects by adding utility functions that utilise the information already available in a `.env` file.

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

[](#installation)

### Composer

[](#composer)

Because (almost) all these projects utilise composer we support installing this as a composer package though it's not dependent on php itself (except for the scripts utilising Magerun) If you have your global composer in your $PATH (`export PATH=$PATH:$HOME/.composer/vendor/bin`) you can run

```
composer global require indykoning/cli-helpers
```

after which you should be able to run

```
cli-helpers
```

### Without Composer

[](#without-composer)

If you don't want to or can't use composer you can simply clone this repository and symlink the `bin/cli-helpers` file to your bin folder. e.g.

```
git clone git@github.com:indykoning/cli-helpers.git
chmod +x cli-helpers/bin/cli-helpers
ln -s `pwd`/cli-helpers/bin/cli-helpers /usr/local/bin/cli-helpers
```

> **Tip!** Install `pv` to get a progress bar when importing and exporting databases

Commands
--------

[](#commands)

You can define a custom env file to use by prepending `ENVFILE=".env.custom"` to the command Our current list of available commands are

### db-magerun

[](#db-magerun)

`cli-helpers db-magerun` uses magerun2 for exporting and importing a database with stripped tables

Available environment variables:

```
REMOTE_SERVER_IP=
REMOTE_SERVER_USER=
# Path to the root folder of Magento
REMOTE_SERVER_PATH=
# In case the remote ssh server is running on a different port
REMOTE_SERVER_PORT=22
# If you wanna specify where magerun can be found on the remote server
REMOTE_MAGERUN="magerun2"
# If you wanna always use the latest version of Magerun
FORCE_ONLINE_MAGERUN=false
# Tables to strip the data from using mageruns --strip option https://github.com/netz98/n98-magerun2#stripped-database-dump
MAGERUN_STRIP="@2fa @aggregated @customers @idx @log @oauth @quotes @replica @sales @search @sessions @stripped @trade @temp"
# Tables to only include
INCLUDE_TABLES=
# Tables to skip entirely
EXCLUDE_TABLES=
```

### db-automysqlbackup

[](#db-automysqlbackup)

`cli-helpers db-automysqlbackup` uses the latest automysqlbackup dump to import Do note that this requires you to have root access to the server.

Available environment variables:

```
REMOTE_SERVER_IP=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
DB_PORT=
DB_HOST=
REMOTE_SERVER_DATABASE=
```

### db-mysqldump

[](#db-mysqldump)

`cli-helpers db-mysqldump` Creates a dump using mysqldump and imports it at the same time This imports the database AS it is exporting.

Available environment variables:

```
REMOTE_SERVER_IP=
REMOTE_SERVER_USER=
REMOTE_SERVER_DATABASE=
REMOTE_DB_USERNAME=
REMOTE_DB_PASSWORD=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
DB_PORT=
DB_HOST=
INCLUDE_TABLES=
EXCLUDE_TABLES=
```

Note

`INCLUDE_TABLES` and `EXCLUDE_TABLES` are space separated. E.g. `EXCLUDE_TABLES="table_one table_two"`

Anonymizing the database
------------------------

[](#anonymizing-the-database)

To anonymize the database [dbanon](https://github.com/mdshack/dbanon) is used. You can enable it by setting `ANONYMIZE=true` in your `.env` file.

You can optionally set the config file path by setting `DBANON_CONFIG` in your `.env` file. If not set, `dbanon.yml` in the root of your project will be used.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance52

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/9397dc2c1f918c7c283295d3aea68467378cd92bc406383316d5830b38aff683?d=identicon)[indykoning](/maintainers/indykoning)

---

Top Contributors

[![indykoning](https://avatars.githubusercontent.com/u/15870933?v=4)](https://github.com/indykoning "indykoning (33 commits)")[![claudio-ferraro](https://avatars.githubusercontent.com/u/54107647?v=4)](https://github.com/claudio-ferraro "claudio-ferraro (2 commits)")[![BobWez98](https://avatars.githubusercontent.com/u/23509926?v=4)](https://github.com/BobWez98 "BobWez98 (2 commits)")[![quintenbuis](https://avatars.githubusercontent.com/u/36452184?v=4)](https://github.com/quintenbuis "quintenbuis (1 commits)")[![rbnmulder](https://avatars.githubusercontent.com/u/1227535?v=4)](https://github.com/rbnmulder "rbnmulder (1 commits)")[![VincentBean](https://avatars.githubusercontent.com/u/3906942?v=4)](https://github.com/VincentBean "VincentBean (1 commits)")[![fritsjustbetter](https://avatars.githubusercontent.com/u/110908371?v=4)](https://github.com/fritsjustbetter "fritsjustbetter (1 commits)")[![pimruiter](https://avatars.githubusercontent.com/u/16269189?v=4)](https://github.com/pimruiter "pimruiter (1 commits)")

### Embed Badge

![Health badge](/badges/indykoning-cli-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/indykoning-cli-helpers/health.svg)](https://phpackages.com/packages/indykoning-cli-helpers)
```

PHPackages © 2026

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