PHPackages                             umanit-pomm/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. [Database &amp; ORM](/categories/database)
4. /
5. umanit-pomm/cli

ActiveLibrary[Database &amp; ORM](/categories/database)

umanit-pomm/cli
===============

Command line for Pomm.

2.1.0(3y ago)06.2k↓27.3%1MITPHPPHP &gt;=5.4.4

Since Dec 15Pushed 2y agoCompare

[ Source](https://github.com/Umanit-Pomm/Cli)[ Packagist](https://packagist.org/packages/umanit-pomm/cli)[ Docs](http://www.pomm-project.org)[ RSS](/packages/umanit-pomm-cli/feed)WikiDiscussions 2.0 Synced 1mo ago

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

Cli
===

[](#cli)

This is the Cli component for the Pomm database framework.

[![Latest Stable Version](https://camo.githubusercontent.com/f49e327ed52d929b18eaa7a8468089f93df2e925f6e19fd5421654d9eac12528/68747470733a2f2f706f7365722e707567782e6f72672f706f6d6d2d70726f6a6563742f636c692f762f737461626c65)](https://packagist.org/packages/pomm-project/cli) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/1c045f34db38903e3ad0e33811a60f857d265de66af369d9babf4e7f3e718f6a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706f6d6d2d70726f6a6563742f436c692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/pomm-project/Cli/?branch=master) [![Build Status](https://camo.githubusercontent.com/855772da2c203ea1a72275f7c5790f3d1875e6bcb1519fd41d751acb4f7c7b11/68747470733a2f2f7472617669732d63692e6f72672f706f6d6d2d70726f6a6563742f436c692e737667)](https://travis-ci.org/pomm-project/Cli) [![Monthly Downloads](https://camo.githubusercontent.com/cc8c68f9d7a6442f1131f054fc804edb764e1fa1facdf928357dcf7b3b04423b/68747470733a2f2f706f7365722e707567782e6f72672f706f6d6d2d70726f6a6563742f636c692f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/pomm-project/cli) [![License](https://camo.githubusercontent.com/90c93db836344b372958b08c3e13314d7d97da8bf977d47daa55a4200953e45e/68747470733a2f2f706f7365722e707567782e6f72672f706f6d6d2d70726f6a6563742f636c692f6c6963656e73652e737667)](https://packagist.org/packages/pomm-project/cli)

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

[](#configuration)

Pomm's Cli is independent from one's development environment, it does not know what configuration types and files are used in the project. To make the Cli work, it is necessary to create a plain PHP bootstrap file that returns a Pomm instance. By default it is named `.pomm_cli_bootstrap.php`. If the project already has a script that returns a configured Pomm instance, it is possible to specify it to the Cli using the option `-b|--bootstrap-file="..."`.

Database inspection
-------------------

[](#database-inspection)

The `inspect` command uses the `Foundation.Inspector` to display information about the database structure.

- pomm:inspect:database - Get schemas in a database.
- pomm:inspect:schema - Get relations information in a schema.
- pomm:inspect:relation - Get information about a relation.

```
$ ./bin/pomm.php pomm:inspect:schema my_db_config

Found 3 relations in schema 'public'.
+-------------+-------+--------+---------+
| name        | type  | oid    | comment |
+-------------+-------+--------+---------+
| pika        | view  | 126516 | pika    |
| test_unique | table | 127619 |         |
| worker      | table | 126525 |         |
+-------------+-------+--------+---------+

```

```
$ ./bin/pomm.php pomm:inspect:relation archived_document my_db_config pylone

Relation pylone.archived_document
+----+-------------+-----------+---------+---------+---------+
| pk | name        | type      | default | notnull | comment |
+----+-------------+-----------+---------+---------+---------+
| *  | document_id | uuid      |         | yes     |         |
|    | title       | varchar   |         | yes     |         |
|    | archived_at | timestamp | now()   | yes     |         |
| *  | version     | int4      |         | yes     |         |
|    | usable      | bool      |         | no      |         |
+----+-------------+-----------+---------+---------+---------+

```

Code generation
---------------

[](#code-generation)

The `generate` commands create PHP class for use of database relations with Pomm's ModelManager package.

- pomm:generate:structure - Generate a RowStructure class according to the relation structure.
- pomm:generate:model - Generate a new configured Model class.
- pomm:generate:entity - Generate an empty FlexibleEntity class.
- pomm:generate:relation-all - Generate the 3 files above for the given relation.
- pomm:generate:schema-all - Generate the 3 files above for every relation in the given schema.

Since you are going to add your own methods in the generated Model and FlexibleEntity classes, they will NOT be overwritten by default by the `generate` commands. It is somehow possible to do so by implicitly specifying the option `--force`. All the code in the overwritten classes will then be lost and replaced by a brand new class. Structure files are always overwritten without prior asking for confirmation. To avoid mixing these two kinds of classes, Structure classes are saved under a `AutoStructure` subdirectory.

### Prefixes options

[](#prefixes-options)

By default, Pomm's ModelManager expects at least the classes to be saved using the following namespaces: `DatabaseConfigName\SchemaSchema`. It is possible to tell the Cli where this structure starts and how to tune it.

- `--prefix-dir`, `-d` - indicates where to start the Namespace directory tree.
- `--prefix-ns`, `-a` - indicates an optional namespace prefix.

When no options are specified, generating all relations of public schema will act like the following:

```
$ ./bin/pomm.php pomm:generate:schema-all -v pomm_test
 ✓  Creating file './PommTest/PublicSchema/AutoStructure/Pika.php'.
 ✓  Creating file './PommTest/PublicSchema/PikaModel.php'.
 ✓  Creating file './PommTest/PublicSchema/Pika.php'.
 ✓  Creating file './PommTest/PublicSchema/AutoStructure/TestUnique.php'.
 ✓  Creating file './PommTest/PublicSchema/TestUniqueModel.php'.
 ✓  Creating file './PommTest/PublicSchema/TestUnique.php'.
 ✓  Creating file './PommTest/PublicSchema/AutoStructure/Worker.php'.
 ✓  Creating file './PommTest/PublicSchema/WorkerModel.php'.
 ✓  Creating file './PommTest/PublicSchema/Worker.php'.

$ tree PommTest
PommTest/
└── PublicSchema
    ├── AutoStructure
    │   ├── Pika.php
    │   ├── TestUnique.php
    │   └── Worker.php
    ├── PikaModel.php
    ├── Pika.php
    ├── TestUniqueModel.php
    ├── TestUnique.php
    ├── WorkerModel.php
    └── Worker.php

2 directories, 9 files

```

It is often not a good idea to have the model's namespace starting at project's root directory. Most of the time, it is put in a `Model` namespace under `sources/lib` directory:

```
$ ./bin/pomm.php pomm:generate:schema-all --prefix-dir sources/lib --prefix-ns Model pomm_test
 ✓  Creating file 'sources/lib/Model/PommTest/PublicSchema/AutoStructure/Pika.php'.
…

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 83.8% 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 ~312 days

Recently: every ~692 days

Total

11

Last Release

1050d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27f13221fde4957c93a4ed7293a6460272d626e53df227e3aae4f35aa9289e69?d=identicon)[DjLeChuck](/maintainers/DjLeChuck)

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

![](https://www.gravatar.com/avatar/8b42188cdb5d776997ee5e465f8df950c0ef9847ad3e4589dda4a3c1f15b5dc7?d=identicon)[Nedeas](/maintainers/Nedeas)

---

Top Contributors

[![chanmix51](https://avatars.githubusercontent.com/u/81580?v=4)](https://github.com/chanmix51 "chanmix51 (109 commits)")[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (7 commits)")[![stood](https://avatars.githubusercontent.com/u/327248?v=4)](https://github.com/stood "stood (5 commits)")[![ronanguilloux](https://avatars.githubusercontent.com/u/313677?v=4)](https://github.com/ronanguilloux "ronanguilloux (4 commits)")[![DjLeChuck](https://avatars.githubusercontent.com/u/696780?v=4)](https://github.com/DjLeChuck "DjLeChuck (2 commits)")[![Nedeas](https://avatars.githubusercontent.com/u/4601729?v=4)](https://github.com/Nedeas "Nedeas (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![webaaz](https://avatars.githubusercontent.com/u/489498?v=4)](https://github.com/webaaz "webaaz (1 commits)")

---

Tags

clidatabasepostgresqlpomm

### Embed Badge

![Health badge](/badges/umanit-pomm-cli/health.svg)

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

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[pomm-project/cli

Command line for Pomm.

19243.5k4](/packages/pomm-project-cli)[pomm-project/model-manager

PHP Object Model Manager for Postgresql

69281.6k6](/packages/pomm-project-model-manager)[cycle/database

DBAL, schema introspection, migration and pagination

64690.9k31](/packages/cycle-database)[pomm-project/pomm-bundle

The Symfony2 bundle for Pomm2

81198.7k4](/packages/pomm-project-pomm-bundle)[tommyknocker/pdo-database-class

Framework-agnostic PHP database library with unified API for MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, and Oracle. Query Builder, caching, sharding, window functions, CTEs, JSON, migrations, ActiveRecord, CLI tools, AI-powered analysis. Zero external dependencies.

845.7k](/packages/tommyknocker-pdo-database-class)

PHPackages © 2026

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