PHPackages                             wilokecom/phpcli - 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. [CLI &amp; Console](/categories/cli)
4. /
5. wilokecom/phpcli

ActiveLibrary[CLI &amp; Console](/categories/cli)

wilokecom/phpcli
================

The easiest and fastest way to create Wiloke Component

v1.37(4y ago)0888MITPHP

Since Jan 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/wilokecom/phpcli)[ Packagist](https://packagist.org/packages/wilokecom/phpcli)[ Docs](https://github.com/wilokecom/phpcli)[ RSS](/packages/wilokecom-phpcli/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (2)Versions (45)Used By (0)

About Wiloke CLI
----------------

[](#about-wiloke-cli)

Wiloke CLI is a PHP-CLI tool that helps you easily setup phpunit and commonly used components

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

[](#installation)

To install Wiloke CLI, please run the following command line:

```
composer require --dev wilokecom/phpcli
```

Setting up PHPUnit Test for WordPress
-------------------------------------

[](#setting-up-phpunit-test-for-wordpress)

EXAMPLES

```
# Generate PHPUnit Test inside a plugin
./vendor/bin/wilokecli make:unittest plugins sample-plugin

# Generate PHPUnit Test inside a theme
./vendor/bin/wilokecli make:unittest themes sample-theme
```

SUBCOMMANDS

- homeurl: Enter in your website url
- rb: Rest Base. EG: wiloke/v2
- testnamespace: Enter in your Unit Test Namespace. You can define your Unit Test Namespace under composer.json. EG: WilokeTests (1)
- authpass: This feature is available since WordPress 5.6. To create your Application Password: Log into your site with your administrator account -&gt; Profile -&gt; My Profile -&gt; Create an Application Password
- admin\_username: The username of your administrator account.
- admin\_password: The password of your administrator account.

EXAMPLES With SUBCOMMANDS

```
./vendor/bin/wilokecli make:unittest plugins sample-plugin --homeurl=https://wiloke.com --rb=wiloke/v2
--testnamespace=WilokeListingToolsTests --admin_username=admin --admin_password=admin --authpass=yourpass
```

(1): Define Unit Test testnamespace

```
{
    "autoload": {
        "psr-4": {
          "WilokeTests\\": "tests/"
        }
    },
}
```

Generating Post Skeleton
------------------------

[](#generating-post-skeleton)

Example

```
./vendor/bin/wilokecli make:post-skeleton src --namespace=WilokeNamespace
```

**src** is a folder that you defined under autoload Psr-4 in composer.json.

```
{
    "autoload": {
        "psr-4": {
            "WilokeNamespace\\": "src/"
        }
    }
}
```

Generating Message Skeleton
---------------------------

[](#generating-message-skeleton)

Example

```
./vendor/bin/wilokecli make:message-factory src --namespace=WilokeNamespace
```

Generating Slack Post Message
-----------------------------

[](#generating-slack-post-message)

Example

```
./vendor/bin/wilokecli make:slack-message src --namespace=WilokeNamespace
```

Generating Prefix
-----------------

[](#generating-prefix)

```
./vendor/bin/wilokecli make:prefix src --namespace=WilokeNamespace --prefixDefine=MY_PREFIX
```

- MY\_PREFIX: You should define a prefix on init plugin file and put it there. EG: define('MY\_PREFIX', 'wiloke\_');

Generating Upload
-----------------

[](#generating-upload)

Chạy lần lượt các commend line sau

```
./vendor/bin/wilokecli make:prefix src --namespace=WilokeNamespace
```

```
./vendor/bin/wilokecli make:message-factory src --namespace=WilokeNamespace
```

```
./vendor/bin/wilokecli make:upload src --namespace=WilokeNamespace
```

Generating Query
----------------

[](#generating-query)

```
./vendor/bin/wilokecli make:query --namespace=WilokeNamespace
```

Generating Shortcode Structure
------------------------------

[](#generating-shortcode-structure)

Example

```
./vendor/bin/wilokecli make:shortcode MyShortcodeClass --namespace=WilokeNamespace
```

Generating Elementor
--------------------

[](#generating-elementor)

```
./vendor/bin/wilokecli make:elementor MyElementorClass --namespace=WilokeNamespace
```

Generating GrumPHP
------------------

[](#generating-grumphp)

### Installing grumphp and php-cs-fixer

[](#installing-grumphp-and-php-cs-fixer)

Run the following command line: ```
composer require phpro/grumphp friendsofphp/php-cs-fixer --dev
```

Or you can also add the following code to composer.json

```
"require-dev": {
    "phpro/grumphp": "^1.3",
    "friendsofphp/php-cs-fixer": "^2.17"
}
```

then run

```
composer update
```

### Generating Wiloke grumphp configuration

[](#generating-wiloke-grumphp-configuration)

```
./vendor/bin/wilokecli make:grumphp
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 98.5% 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 ~11 days

Recently: every ~34 days

Total

38

Last Release

1553d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11451523?v=4)[wiloke](/maintainers/wiloke)[@wiloke](https://github.com/wiloke)

---

Top Contributors

[![wilokecom](https://avatars.githubusercontent.com/u/47608417?v=4)](https://github.com/wilokecom "wilokecom (67 commits)")[![vuonga7k8lah](https://avatars.githubusercontent.com/u/38355047?v=4)](https://github.com/vuonga7k8lah "vuonga7k8lah (1 commits)")

### Embed Badge

![Health badge](/badges/wilokecom-phpcli/health.svg)

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

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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