PHPackages                             pinoox/pinx-cli - 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. pinoox/pinx-cli

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

pinoox/pinx-cli
===============

Developer CLI for single-app Pinoox projects — scaffold, dev, build, and release .pinx packages

1.6.8(1w ago)298—0%1MITPHPPHP ^8.2

Since Jun 11Pushed 1w agoCompare

[ Source](https://github.com/pinoox/pinx-cli)[ Packagist](https://packagist.org/packages/pinoox/pinx-cli)[ RSS](/packages/pinoox-pinx-cli/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (29)Used By (1)

Pinx CLI
========

[](#pinx-cli)

**The developer CLI for single-app Pinoox projects** — scaffold, run, migrate, build, and ship `.pinx` packages without touching a multi-app manager.

Built on [`pinoox/pincore`](https://github.com/pinoox/pincore) and the [`pinoox/app`](https://github.com/pinoox/app) template. Your project root **is** the app: one `app.php`, one package, one workflow.

---

Quick start
-----------

[](#quick-start)

Install Pinx once, create a new app, run it:

```
composer global require pinoox/pinx-cli

pinx new my-shop              # suggests com_my_shop — confirm or edit in the wizard
cd my-shop
pinx migrate                  # uses DevDB in development by default
pinx dev                      # http://127.0.0.1:8000
```

Add Composer’s global `bin` to your `PATH` if `pinx` is not found:

- Linux / macOS: `~/.composer/vendor/bin` or `~/.config/composer/vendor/bin`
- Windows: `%APPDATA%\Composer\vendor\bin`

StepWhat it does`composer global require`Installs the `pinx` command on your machine`pinx new my-shop`Scaffolds from `pinoox/app`; wizard suggests a 3-part package (e.g. `com_my_shop`)`.env`Minimal by default: `APP_ENV=development` and `DB_CONNECTION=devdb`; use `.env.example` as the full reference`pinx sync`Adds missing single-app support files to the current folder`pinx repair`Repairs a folder so it can run as a Pinx single-app project`pinx migrate`Runs app migrations; DevDB is used automatically for local development unless you configure another database`pinx dev`PHP dev server; starts Vite too when a frontend stack is configured`pinx inspector`Standalone local browser dashboard powered by the optional `pinoox/pinx-inspector` dev packagePackage names follow `com_{vendor}_{name}` — e.g. `com_acme_shop`, `ir_yekdo_app`. Already inside an empty folder? Use `pinx init` instead of `pinx new`.

**Optional check:** `pinx doctor` reports PHP, layout, env, DB, and build readiness.

To turn an existing app folder into the single-app layout:

```
cd existing-app
pinx repair --package=com_vendor_app
pinx migrate
pinx dev
```

Use `pinx sync` when you only want to add missing template support files. Use `pinx sync --force` or `pinx repair --force` only when you intentionally want template-managed support files overwritten.

Pinx Inspector is available automatically while `pinx dev` is running:

```
pinx dev
# open http://127.0.0.1:8000/~inspector
```

Pinx Inspector is provided by `pinoox/pinx-inspector` and should be installed in `require-dev`:

```
composer require --dev pinoox/pinx-inspector
```

Use `pinx dev --no-inspector` to disable it, or `pinx inspector` as a standalone fallback when the app server is not running. Inspector is local-only and works without Node, npm, Electron, or extra setup.

---

Alternative: `composer create-project`
--------------------------------------

[](#alternative-composer-create-project)

No global install — the template ships with `bin/pinx` inside the project:

```
composer create-project pinoox/app my-shop
cd my-shop
pinx migrate
pinx dev
```

---

What makes single-app different
-------------------------------

[](#what-makes-single-app-different)

Classic Pinoox installs keep many apps under `apps/` and pick one at runtime. **Single-app** flattens that:

- `app.php` at the project root holds package identity and pinx settings
- `Controller/`, `Model/`, `routes/`, `theme/` live at the root — not inside `apps/{package}/`
- `platform/` holds local routing and launcher config (excluded from `.pinx` builds)
- Pinx always targets **your** app — no package picker, no manager UI

```
my-shop/                    ← project root = app root
├── app.php                 ← package, version, pinx.sign, frontend.stack
├── Controller/ Model/ routes/ theme/
├── platform/               ← dev host + deploy layer (local only)
├── bin/pinx                ← project-local CLI entry
└── vendor/pinoox/pincore   ← framework

```

See the [pinoox/app README](../app) for the full layout and config layers.

---

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

[](#installation)

WhereHowWhen to use**Global**`composer global require pinoox/pinx-cli`Recommended — `pinx new` and `pinx init` from anywhere**Per project**Shipped as `bin/pinx` in `pinoox/app`After `composer create-project` — no global install needed**Monorepo**`composer require pinoox/pinx-cli:@dev` with a path repoDeveloping pinx-cli alongside `packages/app````
pinx -v          # quick one-line version
pinx version     # version, install path, and update check
composer global update pinoox/pinx-cli # upgrade global pinx install
pinx list        # grouped command overview
pinx help setup  # detail for one command
```

---

Day-to-day workflow
-------------------

[](#day-to-day-workflow)

```
pinx dev                    # local server (+ Vite when app.php → frontend.stack is set)
pinx dev --open             # open browser after start
pinx dev --no-frontend      # PHP only

pinx migrate                # run app migrations (--platform runs platform first)
pinx migrate:st             # migration status
pinx migrate:cr create_products_table

pinx db:list                # platform + app connections (--test, --json)
pinx db:show platform       # connection details
pinx db:test                # probe connectivity

pinx user:create admin --password=secret --role=admin
pinx role:list
pinx permission:list
pinx token:list
pinx file:list

pinx make controller ProductController
pinx make model ProductModel
pinx make migration create_products_table
pinx make portal ShopService

pinx routes                 # list named actions (--validate, --json)
pinx test                   # run app tests (Pest)
```

**Frontend** (when `theme/` uses Vue/React + Vite):

```
pinx fe:info                # stack, npm scripts, paths
pinx fe:i                   # npm install
pinx fe:d                   # Vite dev server
pinx fe:b                   # production build
pinx fe:sc --stack=vue      # scaffold starter files
```

**Dependencies:**

```
pinx deps:st                # Composer + npm status
pinx deps:i                 # install all
pinx deps:up                # update all
```

**Pinker** (build cache):

```
pinx pinker:st              # cache vs source
pinx pinker:rb              # rebuild
pinx pinker:df              # diff
```

---

Ship to production
------------------

[](#ship-to-production)

Build a `.pinx` package for installation on a full Pinoox platform (Manager → Applications):

```
pinx build                  # → export/*.pinx
pinx build -o /tmp/shop.pinx
pinx release --bump=patch   # bump version in app.php + build
pinx release --sign         # sign when key is configured in app.php → pinx.sign
```

`pinx build` applies sensible defaults (excludes `vendor/`, `bin/`, `.env`, `platform/`, dev tooling). Override in `app.php` only when needed:

```
'build' => [
    'exclude' => ['my-private-notes/'],
    'composer' => false,
],
'pinx' => [
    'sign' => [
        'enabled' => false,
        'key' => null,
        'key_id' => null,
    ],
],
```

---

App detection
-------------

[](#app-detection)

Pinx walks up from the current working directory until it finds a valid single-app project:

1. `app.php` exists and returns an array with a non-empty `package` key
2. `pinoox/pincore` is required in `composer.json`, or `vendor/pinoox/pincore` / a local `pincore/` clone is present

Override the detected package with environment variables:

VariablePurpose`PINX_PACKAGE`Force CLI target package`PINOOX_DEV_APP`Alias for `PINX_PACKAGE``PINX_DEV=1`Dev mode (set automatically by pinx when delegating to pincore)The package can also be resolved from `platform/apps.config.php` when the app is registered with path `~`.

---

`pinx list` — grouped commands
------------------------------

[](#pinx-list--grouped-commands)

Run `pinx list` for a sectioned overview. Shorthand aliases appear in brackets. Filter by prefix or use `--short` for names only.

```
Project        Scaffold and inspect the single-app project
Development    Local server and day-to-day workflow
Database       Connections, migrations, and seeders
Patches        Data patches and one-off app updates
Build & release  Package and ship .pinx artifacts
Scaffolding    Generate controllers, models, tests, and more
Users          Create and manage app users from CLI
Roles & permissions  Manage roles and permission keys
Tokens         Session tokens and API keys
Files          Uploaded files and storage records
Routes         Named actions and route diagnostics
Dependencies   Composer and npm dependency tooling
Frontend       Theme assets, Vite, and npm scripts
Schedule       Cron tasks from schedule.php
Pinker         Build cache and override management
Quality & docs Tests and API documentation

```

Examples:

```
pinx list
pinx list migrate
pinx list --short
pinx list --raw
```

---

Command reference
-----------------

[](#command-reference)

### Project

[](#project)

CommandAliasesDescription`new`—Scaffold from `pinoox/app` (wizard or flags)`init`—Initialize the current directory (`--force` to overwrite)`setup`—Full setup: deps, migrate, seed, patch (`--db-only`, `--skip-*`, `--yes`)`doctor``dr`Health check — `--json`, `--skip-db`, `--skip-frontend``info``inf`Show metadata from `app.php`### Development

[](#development)

CommandDescription`dev`Dev server; Vite when `frontend.stack` is vue/react### Database

[](#database)

CommandAliasesDescription`migrate:run``migrate`Run app migrations (`--platform`, `--reset`, `--fresh`, `--refresh`)`migrate:status``migrate:st`Migration status`migrate:rollback``migrate:rb`Rollback batches (`--step`, `--all`, `--ignore-fk`)`migrate:reset``migrate:rs`Rollback all batches via `down()``migrate:drop``migrate:dp`Drop app tables and clear migration history`migrate:fresh``migrate:fr`Drop tables then re-run all migrations`migrate:create ``migrate:cr`Create migration file`migrate:platform``migrate:pl`Platform migrations only`seeder:run``seed`Run seeders (`-c` class)`db:list``databases`List platform and app connections (`--test`, `--json`)`db:show [target]``database:show`Show connection details`db:test [target]``database:test`Test connectivity (or ad-hoc `--host`, `--database`, …)`db:create [target]``database:create`, `make:db`Configure platform or app DB (`--set`, `--driver`, …)`db:update [target]``database:update`Update connection settings`db:prefix [package] [prefix]``database:prefix`Change app table prefix (`--use`)### Patches

[](#patches)

CommandAliasesDescription`patch:run``patch`Run pending patches`patch:status``patch:st`Patch status`patch:rollback``patch:rb`Rollback latest / named patch (`--step`, `--all`)`patch:reset``patch:rs`Rollback all rollbackable patches (`--clear`)`patch:create ``patch:cr`Create a patch file### Users

[](#users)

CommandAliasesDescription`user:create``make:user`Create a user (`--username`, `--password`, `--email`, `--role`)`user:list``users`List users (`--status`, `--json`)`user:show`—Show one user (wizard; id/username/email/mobile/personal\_id)`user:update`—Update profile fields (wizard)`user:status`—Set status (`active`, `inactive`, `suspend`, `pending`)`user:password``user:passwd`Admin password reset (wizard; `--revoke-sessions`)`user:delete`—Delete user (wizard; `--force`)`user:role``user:role:assign`Attach or sync roles (`--role`, `--sync`, `--list`)### Roles &amp; permissions

[](#roles--permissions)

CommandAliasesDescription`role:list``roles`List roles (`--json`)`role:create``make:role`Create role (`--key`, `--name`, `--description`)`role:show `—Show role (`--permissions`, `--json`)`role:update `—Update role fields`role:delete `—Delete role (`--force`)`role:permission ``role:permissions`Attach/detach permissions (`--attach`, `--detach`, `--sync`)`permission:list``permissions`List permissions (`--json`)`permission:create``make:permission`Create permission`permission:show `—Show permission (`--roles`, `--json`)`permission:delete `—Delete permission (`--force`)### Tokens

[](#tokens)

CommandAliasesDescription`token:list``tokens`List session tokens (`--json`)`token:show `—Show token (`--reveal`, `--json`)`token:create``make:token`Create token (`--user`, `--name`, `--lifetime`, …)`token:update `—Update token metadata or lifetime`token:delete ``token:remove`Delete token (`--force`)`token:revoke-user ``token:revoke`Revoke all tokens for a user`token:purge``token:cleanup`Delete expired tokens (`--force`, `--json`)### Files

[](#files)

CommandAliasesDescription`file:list``files`List uploads (`--group`, `--json`)`file:show `—Show file metadata`file:update `—Update metadata or access`file:delete ``file:remove`Delete record and/or storage (`--db-only`, `--storage-only`, `--force`)`file:purge``file:cleanup`Bulk delete by group or age (`--group`, `--older-than`, `--force`)### Pinion (resumable uploads)

[](#pinion-resumable-uploads)

Forwarded to `php pinoox pinion:*` — temp chunked upload sessions under `storage/pinion`.

CommandDescription`pinion:list`List sessions (`--status`, `--json`)`pinion:info `Session detail`pinion:clean`Remove expired sessions (`--abort=`)### Build &amp; release

[](#build--release)

CommandAliasesDescription`build``bld`Build `.pinx` package`release``rel`Version bump + build (`--bump`, `--sign`)### Scaffolding

[](#scaffolding)

CommandAliasesDescription`make  ``mk`controller, model, migration, patch, portal, form-request, seeder, test### Routes

[](#routes)

CommandDescription`route:actions` / `routes`List named actions (`--validate`, `--json`)### Dependencies

[](#dependencies)

CommandAliasesDescription`deps:status``deps:st`Composer + npm status`deps:install``deps:i`Install dependencies`deps:update``deps:up`Update dependenciesLegacy umbrella commands `deps` and `dep` still accept `status`, `install`, `update` as the first argument.

### Frontend

[](#frontend)

CommandAliasesDescription`fe:info``fe:inf`Theme stack and npm scripts`fe:install``fe:i``npm install``fe:build``fe:b`Production build`fe:dev``fe:d`Vite dev server`fe:scaffold``fe:sc`Starter files (`--stack=vue|react|twig`)Legacy `frontend` / `fe` accept `info`, `install`, `build`, `dev`, `scaffold` as the first argument.

### Schedule

[](#schedule)

CommandAliasesDescription`schedule:list``sched:ls`List cron tasks from `schedule.php``schedule:run``sched:run`Run due tasks (`--dry-run`)### Pinker

[](#pinker)

CommandAliasesDescription`pinker:status``pinker:st`Cache vs source`pinker:rebuild``pinker:rb`Rebuild cache`pinker:diff``pinker:df`Show differences`pinker:clear``pinker:cl`Clear cache`pinker:overrides``pinker:ov`List overrides### Quality &amp; docs

[](#quality--docs)

CommandDescription`test` / `pest`Run app tests (`--unit`, `--feature`)`api:docs`REST API documentation`graphql:docs`GraphQL schema documentation### Meta

[](#meta)

CommandAliasesDescription`list`—Grouped command overview`version``ver`CLI version, install mode, and Packagist update check---

`pinx doctor` in depth
----------------------

[](#pinx-doctor-in-depth)

Doctor runs a structured diagnostic and suggests fix commands when something fails:

GroupChecks**Project**`app.php`, package identity, `platform/` layout**Runtime**PHP version (≥ 8.2), extensions, writable paths**Dependencies**Composer vendor, optional Node/npm**Environment**`.env` presence and key variables**Database**Connection (skippable with `--skip-db`)**Frontend**Theme stack, `package.json` (skippable with `--skip-frontend`)**Build**Export readiness, icon, version fields```
pinx doctor
pinx doctor --skip-db
pinx doctor --json          # CI-friendly report
pinx doctor --no-fixes      # hide suggested commands
```

---

Monorepo development
--------------------

[](#monorepo-development)

When working inside the [pinoox/pinoox](https://github.com/pinoox/pinoox) repository, `pinx new` resolves the template from `packages/app` automatically.

```
cd packages/pinx-cli
composer install

# scaffold a throwaway app (skip install to wire path repos yourself)
php bin/pinx new ../tmp-my-app --package=com_demo_shop --no-install

cd ../tmp-my-app
composer config repositories.pinx-cli path ../pinx-cli
composer require pinoox/pincore pinoox/pinx-cli:@dev
php bin/pinx doctor
php bin/pinx migrate
php bin/pinx dev
```

After `composer install` on a platform checkout, apply the pincore overlay for `DevApp` and improved `pinx:build`:

```
php packages/apply-pincore-overlay.php
```

---

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

[](#requirements)

- **PHP** ≥ 8.2 with extensions required by `pinoox/pincore`
- **Composer** 2.x
- **Node.js** + npm — only when using Vite/Vue/React frontends
- **Database** - DevDB for local development by default; MySQL/MariaDB/PostgreSQL/SQLite when configured in `.env`

---

Related packages
----------------

[](#related-packages)

PackageRole[`pinoox/app`](../app)`composer create-project` template — root app layout[`pinoox/pincore`](https://github.com/pinoox/pincore)HMVC framework (migrations, routing, CLI engine)**Publish targets:** `composer global require pinoox/pinx-cli` · `composer create-project pinoox/app` · enable **Template repository** on `github.com/pinoox/app`.

---

License
-------

[](#license)

MIT — see [composer.json](composer.json).

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance98

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Every ~1 days

Total

28

Last Release

12d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.3.4PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0b2d1a1048bdc12294e89e6f94f2f2b0bf1805fd01dec2195aa9ab906a02b82?d=identicon)[pinoox](/maintainers/pinoox)

---

Top Contributors

[![yoosefap](https://avatars.githubusercontent.com/u/24357596?v=4)](https://github.com/yoosefap "yoosefap (57 commits)")

---

Tags

clihmvcpinooxpinx

### Embed Badge

![Health badge](/badges/pinoox-pinx-cli/health.svg)

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/console

The Illuminate Console package.

13046.0M6.8k](/packages/illuminate-console)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54643.3k4](/packages/jolicode-castor)[automattic/jetpack-changelogger

Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.

107.2M179](/packages/automattic-jetpack-changelogger)[whatsdiff/whatsdiff

See what's changed in your project's dependencies

771.2k](/packages/whatsdiff-whatsdiff)[lion/bundle

Lion-framework configuration and initialization package

122.4k4](/packages/lion-bundle)

PHPackages © 2026

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