Skip to content

Omeka-S-Cli

omeka-s-cli is a command line tool to install, configure and maintain Omeka S instances. It works directly on an Omeka S installation on the same server, so you can script everything you would otherwise click through in the admin interface, and more: downloading the core, modules and themes, upgrades, users, sites, vocabularies, resource templates and settings.

What it does

  • Core: download any Omeka S version, install it, update it and run the database migrations.
  • Modules and themes: search the omeka.org and Daniel Berthereau's catalogs, download from a catalog, a zip release or a git repository, picking the latest version that is compatible with your Omeka S; install, upgrade, enable, disable and delete, one at a time or in batch.
  • Users and sites: add, update and delete users, manage API keys, create sites and give users a role on them.
  • Data model: import vocabularies (from a file, a URL or the LOV repository), custom vocabularies and resource templates.
  • Settings: get and set global settings; export and import global, site and user settings.
  • Blueprints: describe a complete instance in one file and deploy it with one command.
  • Dummy data: generate items and item sets to test a site or a module.

Most commands can print JSON, tables or CSV, and use exit codes you can rely on in scripts.

Quick start

Install omeka-s-cli (see Installation for the requirements):

curl -fsSL -o omeka-s-cli https://github.com/GhentCDH/Omeka-S-Cli/releases/latest/download/omeka-s-cli.phar
sudo install -m 0755 omeka-s-cli /usr/local/bin/omeka-s-cli

Download Omeka S, configure the database and run the installer:

omeka-s-cli core:download /var/www/omeka-s
cd /var/www/omeka-s
omeka-s-cli config:create-db-ini --host db --dbname omeka --username omeka --password "$DB_PASSWORD"
omeka-s-cli core:install \
    --title "Digital Collections" \
    --admin-name "Site Admin" \
    --admin-email admin@example.org \
    --admin-password "$ADMIN_PASSWORD" \
    --time-zone Europe/Brussels \
    --locale en_US

Then continue with Usage for how the commands work, or go straight to install automation.