PHPackages                             conserto/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. conserto/pomm-cli

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

conserto/pomm-cli
=================

Command line for Pomm.

4.0.2(6mo ago)418.0k↓59.8%1MITPHPPHP &gt;=8.4

Since Dec 15Pushed 6mo agoCompare

[ Source](https://github.com/Conserto/pomm-cli)[ Packagist](https://packagist.org/packages/conserto/pomm-cli)[ Docs](http://www.pomm-project.org)[ RSS](/packages/conserto-pomm-cli/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (6)Dependencies (8)Versions (25)Used By (1)

Cli
===

[](#cli)

This is a fork of the Cli component for the Pomm database framework.

[![Latest Stable Version](https://camo.githubusercontent.com/f6db1bb622c3c981dfd75d442645fa3683b0c8fee954d0de2e75f71fa23229cd/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d636c692f762f737461626c65)](https://packagist.org/packages/conserto/pomm-cli)[![CI Status](https://github.com/conserto/pomm-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/conserto/pomm-cli/actions/workflows/ci.yml/badge.svg)[![Monthly Downloads](https://camo.githubusercontent.com/987410b211c8cdbf05b4560c3cfa66c87439bc71fee5e78882b417e5e4d7cff3/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d636c692f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/conserto/pomm-cli)[![License](https://camo.githubusercontent.com/42c7e21a2628c7bd962938ac658ec874106822a4ce72c63fb1548165f225d1ee/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d636c692f6c6963656e73652e737667)](https://packagist.org/packages/conserto/pomm-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

55

—

FairBetter than 97% of packages

Maintenance67

Regular maintenance activity

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 77.7% 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 ~237 days

Recently: every ~179 days

Total

18

Last Release

193d ago

Major Versions

2.0.x-dev → 3.0.02022-07-01

3.0.2 → 4.0.02024-12-17

PHP version history (3 changes)2.0-beta-1PHP &gt;=5.4.4

3.0.0PHP &gt;=8.1

4.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/09b111aacc97d5aa965e0067355541e8f85a39a47ad9445c147a45b51b67ddbc?d=identicon)[Conserto-contributor](/maintainers/Conserto-contributor)

---

Top Contributors

[![chanmix51](https://avatars.githubusercontent.com/u/81580?v=4)](https://github.com/chanmix51 "chanmix51 (108 commits)")[![neufman](https://avatars.githubusercontent.com/u/7502193?v=4)](https://github.com/neufman "neufman (8 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)")[![maximechagnolleau](https://avatars.githubusercontent.com/u/6151180?v=4)](https://github.com/maximechagnolleau "maximechagnolleau (4 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![dougetovski](https://avatars.githubusercontent.com/u/12248685?v=4)](https://github.com/dougetovski "dougetovski (1 commits)")[![webaaz](https://avatars.githubusercontent.com/u/489498?v=4)](https://github.com/webaaz "webaaz (1 commits)")

---

Tags

clidatabasepostgresqlpomm

###  Code Quality

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

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

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[cycle/database

DBAL, schema introspection, migration and pagination

71777.8k53](/packages/cycle-database)[perplorm/perpl

Perpl is an improved and still maintained fork of Propel2, an open-source Object-Relational Mapping (ORM) for PHP.

2411.8k](/packages/perplorm-perpl)[pomm-project/cli

Command line for Pomm.

19248.7k4](/packages/pomm-project-cli)

PHPackages © 2026

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