PHPackages                             ghentcdh/omeka-s-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. ghentcdh/omeka-s-cli

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

ghentcdh/omeka-s-cli
====================

Omeka-S Command Line Tool

0.14.0(1mo ago)1022[2 issues](https://github.com/GhentCDH/Omeka-S-Cli/issues)MITPHPPHP ^8.1

Since Oct 11Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/GhentCDH/Omeka-S-Cli)[ Packagist](https://packagist.org/packages/ghentcdh/omeka-s-cli)[ Docs](https://github.com/GhentCDH/Omeka-S-Cli)[ RSS](/packages/ghentcdh-omeka-s-cli/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (22)Versions (55)Used By (0)

Omeka-S-Cli
===========

[](#omeka-s-cli)

Omeka-S-Cli is a command line tool to manage Omeka S instances.

[![img.png](img.png)](img.png)

Features
--------

[](#features)

- Core
    - Download specific Omeka S version
    - Update Omeka S to any/latest version
    - Install Omeka S (init database, create admin user)
    - Perform database migrations
    - Get core status/version
- Manage modules
    - Search and download modules from [official Omeka S module repository](https://omeka.org/s/modules/) and [Daniel Berthereau's module repository](https://daniel-km.github.io/UpgradeToOmekaS/en/omeka_s_modules.html)
    - Download modules from git repositories
    - Install, update, upgrade, enable, disable and delete modules
    - List all downloaded modules and their status
    - Batch update, upgrade, delete, uninstall modules
- Manage themes
    - Search and download themes from the [official Omeka S theme repository](https://omeka.org/s/themes/)
    - Download themes from git repositories
    - Delete downloaded themes
    - List all downloaded themes and their status
- Manage resource templates
    - Import and export resource templates from/to JSON files
    - List all resource templates
    - Delete resource templates
- Manage vocabularies
    - Import vocabularies from file or url
    - Import vocabularies from JSON config file
    - Create JSON import configuration files
    - List all vocabularies
    - Delete vocabularies
- Dummy data
    - Generate dummy items and item sets with configurable generators
- Config
    - Export list of installed modules and themes
    - Get, set and list global settings
    - Create database.ini file
- User
    - List all users
    - Add, delete, update, set password, enable or disable a user
    - Manage API keys for a user

### Automating Omeka S instance setup

[](#automating-omeka-s-instance-setup)

The Omeka-S-Cli tool can be used to automate the setup and configuration of new Omeka S instances. A typical workflow is:

- Download and install Omeka S
    - `core:download  [version]` to download Omeka S
    - `config:create-db-ini --dbname  --username  --password  --host  --port ` to create the database.ini file
    - `core:install --admin-name  --admin-email  --admin-password ` to run the Omeka S installer
- Add users
    - `user:add    [password]` to add users
    - `user:create-api-key  ` to add API keys for users
- Download and install modules and themes
    - `module:download ` to download a module
    - `module:install ` to install a module
    - `theme:download ` to download a theme
- Import vocabularies
    - `vocabulary:import --config ` to import vocabulary from a JSON config file
    - `vocabulary:import --url  --namespace-uri="" --prefix="" --label=""` to import vocabulary from a URL
- Import resource templates
    - `resource-template:import ` to import resource templates
- Set config options
    - `config:set  ` to set global settings

Usage
-----

[](#usage)

```
omeka-s-cli [ - h | --help ]
omeka-s-cli  --help
omeka-s-cli  [options]

```

### Example: List downloaded modules

[](#example-list-downloaded-modules)

```
omeka-s-cli module:list

```

```
+--------------------------+----------------------------+---------------+---------+------------------+---------------+-----------------+
| Id                       | Name                       | State         | Version | InstalledVersion | LatestVersion | UpdateAvailable |
+--------------------------+----------------------------+---------------+---------+------------------+---------------+-----------------+
| AdvancedResourceTemplate | Advanced Resource Template | active        | 3.4.43  | 3.4.43           | 3.4.45        | yes             |
| AdvancedSearch           | Advanced Search            | not_installed | 3.4.51  |                  | 3.4.51        |                 |
| Common                   | Common                     | active        | 3.4.72  | 3.4.72           | 3.4.72        |                 |
+--------------------------+----------------------------+---------------+---------+------------------+---------------+-----------------+

```

You can export almost any command output with the `--json` option.

### Example: Download a module from a repository

[](#example-download-a-module-from-a-repository)

The easiest way to download a module is to use its official name. The downloader will search the name in one of the supported module repositories and automatically download the latest version compatible with the installed Omeka S core version.

```
# omeka-s-cli module:download common

```

If the module already exists, you can use the `--force` option to replace it with the newly downloaded version.

You can download a specific module version using the `:` syntax:

```
omeka-s-cli module:download common:3.4.67

```

The official Omeka S module repository does not always have all versions available. In that case, you can use a url to a zip-release or a git repository.

### Example: Download a module from a zip release

[](#example-download-a-module-from-a-zip-release)

```
omeka-s-cli module:download https://github.com/Daniel-KM/Omeka-S-module-Common/releases/download/3.4.65/Common-3.4.65.zip

```

### Example: Download a module from a git repository

[](#example-download-a-module-from-a-git-repository)

```
omeka-s-cli module:download https://github.com/GhentCDH/Omeka-S-module-AuthCAS.git

```

You can use the short `gh:user/repo` syntax for GitHub repositories:

```
omeka-s-cli module:download gh:GhentCDH/Omeka-S-module-AuthCAS

```

You can checkout a specific tag, branch or commit by appending `#`.

```
omeka-s-cli module:download https://github.com/Daniel-KM/Omeka-S-module-AdvancedSearch.git#3.4.22
omeka-s-cli module:download gh:Daniel-KM/Omeka-S-module-AdvancedSearch#3.4.22

```

The installer will run `composer install` in the module directory if a `composer.lock` file is present. Other dependencies must be installed manually.

### Example: Download a theme

[](#example-download-a-theme)

The theme downloader also automatically selects the latest version compatible with the installed Omeka S core version.

```
omeka-s-cli theme:download freedom

```

Or using the GitHub repository:

```
omeka-s-cli gh:omeka-s-themes/freedom#v1.0.6

```

### Example: Download and import a vocabulary

[](#example-download-and-import-a-vocabulary)

Download directly from a URL:

```
omeka-s-cli vocabulary:import --url "https://schema.org/version/latest/schemaorg-current-https.rdf" --namespace-uri="https://schema.org/" --prefix="schema" --label="schema.org"
```

Or using a JSON config file. First create a JSON file with content like below:

```
{
    "url": "https://schema.org/version/latest/schemaorg-current-https.rdf",
    "label": "schema.org",
    "namespaceUri": "https://schema.org/",
    "prefix": "schema"
}
```

Then import the vocabulary with:

```
omeka-s-cli vocabulary:import --config ./schema-dot-org.json
```

### Example: Create dummy items

[](#example-create-dummy-items)

```
# 100 items using built-in defaults
omeka-s-cli dummy:create-items 100

# 100 items from a config file
omeka-s-cli dummy:create-items 100 --config ./examples/dummy/item.json
```

```
omeka-s-cli dummy:create-item-sets 10
omeka-s-cli dummy:create-item-sets 10 --config ./examples/dummy/item-set.json
```

See [docs/dummy.md](docs/dummy.md) for the full generator and config reference.

### Example: Import a resource template

[](#example-import-a-resource-template)

Import a resource template from a file with:

```
omeka-s-cli resource-template:import "/path/to/template.json"
```

You can also specify a different label:

```
omeka-s-cli resource-template:import "/path/to/template.json" --label="My Custom Template"
```

Update an existing template by ID:

```
omeka-s-cli resource-template:import "/path/to/template.json" 2
```

Update an existing template by label:

```
omeka-s-cli resource-template:import "/path/to/template.json" "My Custom Template"
```

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

[](#requirements)

- PHP (&gt;= 8.1) with PDO\_MySQL and Zip enabled
- Omeka S (&gt;= 4)

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

[](#installation)

- Download [omeka-s-cli.phar](https://github.com/GhentCDH/Omeka-S-Cli/releases/latest/download/omeka-s-cli.phar) from the latest release.
- Run with `php omeka-s-cli.phar` or move it to a directory in your PATH and make it executable.

Build
-----

[](#build)

This project uses  to create a phar file.

### box global install

[](#box-global-install)

```
composer global require humbug/box
```

### compile phar

[](#compile-phar)

```
box compile
```

To do
-----

[](#to-do)

- Module dependency checking
- Add support for custom vocabularies
- Add support for sites and site pages

Credits
-------

[](#credits)

Built @ the [Ghent Center For Digital Humanities](https://www.ghentcdh.ugent.be/), Ghent University by:

- Frederic Lamsens

Built with:

- [adhocore/cli](https://github.com/adhocore/php-cli) — CLI framework
- [fakerphp/faker](https://github.com/FakerPHP/Faker) — fake data generation

Code copied from third-party sources:

- `resource-template:import` — `flagValid()` and `checkMissingDependencies()` methods copied from [Common module](https://gitlab.com/Daniel-KM/Omeka-S-module-Common)by [Daniel Berthereau](https://gitlab.com/Daniel-KM), © 2020–2025

Inspired by:

- [Libnamic Omeka S Cli](https://github.com/Libnamic/omeka-s-cli/)
- [biblibre Omeka CLI](https://github.com/biblibre/omeka-cli)

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance88

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.3% 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 ~21 days

Recently: every ~4 days

Total

29

Last Release

42d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7644010?v=4)[Frederic Lamsens](/maintainers/flamsens)[@flamsens](https://github.com/flamsens)

---

Top Contributors

[![flamsens](https://avatars.githubusercontent.com/u/7644010?v=4)](https://github.com/flamsens "flamsens (424 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (2 commits)")[![mcoonen](https://avatars.githubusercontent.com/u/5345572?v=4)](https://github.com/mcoonen "mcoonen (1 commits)")

---

Tags

cliomeka-stuicliomeka-someka-s-cli

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ghentcdh-omeka-s-cli/health.svg)

```
[![Health](https://phpackages.com/badges/ghentcdh-omeka-s-cli/health.svg)](https://phpackages.com/packages/ghentcdh-omeka-s-cli)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k60.6M803](/packages/drush-drush)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M18](/packages/pantheon-systems-terminus)[wp-cli/core-command

Downloads, installs, updates, and manages a WordPress installation.

5211.3M30](/packages/wp-cli-core-command)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k16.4k79](/packages/elgg-elgg)[n98/magerun2

Tools for managing Magento projects and installations

930245.4k6](/packages/n98-magerun2)

PHPackages © 2026

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