Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Available commands

GLPI includes a CLI tool to help you manage your GLPI instance. This interface is provided by the bin/console script which can be executed from the root of your GLPI directory.

Example: sudo -u www-data php bin/console system:status

Each command can have zero or more arguments or options. Arguments are positional pieces of information while options are not and are prefixed by one or two hyphens.


Assets

assets:cleansoftware

Remove uninstalled software versions and software without versions.

Options:

Name
Shortcut
Description
Required
Default
Array
Negotiable

--max

-m

Maximum number of items to process per run

Yes

500

No

No

assets:purgesoftware

Purge unversioned software that has been deleted.

Options:

Name
Shortcut
Description
Required
Default
Array
Negotiable

-max

-m

Maximum number of items to process per run

Yes

500

No

No

From the GLPI Web Interface


Build

build:compile_scss

Compile an SCSS file.

Options:

Name
Shortcut
Description
Required
Default
Array
Negotiable

--file

-f

File to compile (compiles all SCSS files by default)

No

[]

Yes

Yes

--dry-run

Simulate compilation without actually saving the compiled CSS files

No

No

No


Cache

cache:clear

Clear the GLPI cache.

Options:

Name
Shortcut
Description
Required
Default
Array
Negotiable

--context

-c

Cache context to clear (e.g., 'core' or 'plugin:plugin_name'). All contexts are cleared by default.

Yes

[]

Yes

No

cache:configure

Set cache configuration

Options:

Name
Shortcut
Description
Required
Default
Array
Negotiable

--context

Cache context (e.g., 'core' or 'plugin:plugin_name')

Yes

core

No

No

--dsn

Cache system DSN

Yes

[]

Yes

No

--use-default

Disable cache configuration to use the default filesystem cache for the given context

No

No

No

--skip-connection-checks

Skip connection checks

No

No

No

Help

Valid cache systems:

  • Memcached

  • Redis (TCP)

  • Redis (TLS)

Memcached DSN format:

  • memcached://[user:pass@][ip|host|socket[:port]][?weight=int]

Redis (TCP) DSN format:

  • redis://[pass@][ip|host|socket[:port]][/db-index]

Redis (TLS) DSN format:

  • rediss://[pass@][ip|host|socket[:port]][/db-index]

The cache namespace can be used to ensure either separation or sharing of data from multiple GLPI instances on the same cache system.

Usage

  • glpi:cache:configure --use-default

  • glpi:cache:configure --dsn=memcached://cache1.glpi-project.org --dsn=memcached://cache2.glpi-project.org

  • glpi:cache:configure --dsn=redis://redis.glpi-project.org:6379/glpi

cache:debug

Debug GLPI cache.

Options:

Name
Shortcut
Description
Required
Default
Array
Negotiable

--key

-k

Cache key to debug.

Yes

[]

Yes

No

--context

-c

Cache context to clear (e.g., 'core' or 'plugin:plugin_name').

Yes

core

No

No

cache:set_namespace_prefix

Set cache namespace prefix

Arguments (in order):

Name
Description
Required
Default

prefix

Namespace prefix

Yes


Completion

completion

Display shell completion script

Static Installation

1

Generate the script into a global completion file and restart your shell:

bin/console completion nologin | sudo tee /etc/bash_completion.d/console

Or save the script to a local file and execute it:

bin/console completion nologin > completion.sh

2

Source the file on each project usage:

source completion.sh

Or add this line to the end of your ~/.bashrc file:

source /path/to/completion.sh

Dynamic Installation

  • Add this to the end of your shell configuration file (e.g., ~/.bashrc):

eval "$(/path/to/glpi/bin/console completion nologin)"


Config

config:set

Set configuration value

Arguments (in order):

Name
Description
Required
Default

key

Configuration key

Yes

value

Configuration value (omit argument to enter value interactively)

Yes

Options:

Name
Shortcut
Description
Required
Default
Array
Negotiable

--context

-c

Configuration context

Yes

core

No

No


Database

db:check_schema_integrity ou db:check

Check for schema differences between the current database and the installation file.

Options

Name
Shortcut
Description
Required
Default
Table
Negatable

--strict

Strict comparison of definitions

No

No

No

--check-all-migrations

Check tokens related to all database migrations.

No

No

No

--check-innodb-migration

Check tokens related to the "MyISAM" to "InnoDB" migration.

No

No

No

--check-timestamps-migration

Check tokens related to the "datetime" to "timestamp" migration.

No

No

No

--check-utf8mb4-migration

Check tokens related to the "utf8" to "utf8mb4" migration.

No

No

No

--check-dynamic-row-format-migration

Check tokens related to the "DYNAMIC" row format migration.

No

No

No

--check-unsigned-keys-migration

Check tokens related to the migration of signed integers to unsigned in primary/foreign keys.

No

No

No

db:configure

Set database configuration

Options :

Name
Shortcut
Description
Required
Default
Table
Negatable

--db-host

-H

Database host

No

localhost

No

Yes

--db-name

-d

Database name

Yes

No

No

--db-password

-p

Database password (value will be prompted if option is passed without value)

No

No

Yes

--db-port

-P

Database port

No

No

Yes

--db-user

-u

Database user

Yes

No

No

--reconfigure

-r

Reconfigure the database, overwrite configuration file if it already exists

No

No

No

--strict-configuration

Use strict configuration to enforce warnings on deprecated or discouraged usages

No

No

No

db:enable_timezones

Enable timezone usage.

db:install

Install database schema

Options :

Name
Shortcut
Description
Required
Default
Table
Negatable

--db-host

-H

Database host

No

localhost

No

Yes

--db-name

-d

Database name

Yes

No

No

--db-password

-p

Database password (value will be prompted if option is passed without value)

No

No

Yes

--db-port

-P

Database port

No

No

Yes

--db-user

-u

Database user

Yes

No

No

--reconfigure

-r

Reconfigure the database, overwrite configuration file if it already exists

No

No

No

--strict-configuration

Use strict configuration to enforce warnings on deprecated or discouraged usages

No

No

No

--default-language

-L

Default GLPI language

No

en_GB

No

Yes

--force

-f

Force installation execution, overwriting existing database

No

No

No

--enable-telemetry

Allow sending usage statistics to the telemetry service (https://telemetry.glpi-project.org)

No

No

No

--no-telemetry

Disallow sending usage statistics to the telemetry service (https://telemetry.glpi-project.org)

No

No

No

db:update

Update database schema to a new version

Options

Name
Shortcut
Description
Required
Default
Table
Negatable

--allow-unstable

-u

Allow update to an unstable version

No

No

No

--force

-f

Force update execution from v-1 of GLPI even if the schema has not changed

No

No

No

--enable-telemetry

Allow sending usage statistics to the telemetry service (https://telemetry.glpi-project.org)

No

No

No

--no-telemetry

Disallow sending usage statistics to the telemetry service (https://telemetry.glpi-project.org)

No

No

No


Diagnostic

diagnostic:check_documents_integrity

Check file integrity for GLPI documents.

diagnostic:check_html_encoding

Check for improperly encoded HTML content in the database.

Options

Name
Shortcut
Description
Required
Default
Table
Negatable

--fix | --no-fix

-f

Fix detected issues

No

No

No

--dump=DUMP

-d

Specifies the path to the file where SQL queries to undo changes will be stored.

No

No

No

diagnostic:check_source_code_integrity

Check GLPI source code file integrity.

Name
Shortcut
Description
Required
Default
Table
Nillable

--diff

-d

Displays differences between modified files

No

No

No

--allow-download

Allows downloading the GLPI version if necessary

No

No

No


Help

help

Displays help for each command

Name
Shortcut
Description
Required
Default
Table
Nillable

--format=FORMAT

Displays the result according to the selected output format (txt, xml, json, or md. Default: txt)

No

No

No

--raw

To display the raw command help

No

No

No


LDAP

ldap:sync

Synchronize users with LDAP server information

Options

Name
Shortcut
Description
Required
Default
Table
Nillable

--only-create-new

-c

Create only new users

No

No

No

--only-update-existing

-u

Update only existing users

No

No

No

--ldap-server-id

-s

Synchronize only users attached to this LDAP server

No

[]

Yes

Yes

--ldap-filter

-f

Filter to apply to the LDAP search

No

No

Yes

--begin-date

Start date to apply in the "modifyTimestamp" filter (see http://php.net/manual/en/datetime.formats.php for supported formats)

No

No

Yes

--end-date

End date to apply in the "modifyTimestamp" filter (see http://php.net/manual/en/datetime.formats.php for supported formats)

No

No

Yes

--deleted-user-strategy

-d

Force strategy used for deleted users (default configured actions: "0,0,0") Three comma-separated values are expected.

1) Actions on the user's account:

  • 0: Do nothing

  • 1: Disable

  • 2: Move to trashbin

2) Actions on the user's associated groups:

  • 0: Do nothing

  • 1: Delete dynamic groups

  • 2: Delete all groups

3) Actions on the user's authorizations:

  • 0: Do nothing

  • 1: Delete dynamic authorizations

  • 2: Delete all authorizations

No

No

Yes

--restored-user-strategy

-r

Force the strategy used for restored users (current action configured: "0") Possible values are:

  • 0: Do nothing

  • 1: Restore (remove from trash)

  • 3: Enable

No

No

Yes


List

list

The list command lists all commands

  • You can also display commands for a specific namespace:

  • You can also export information in other formats using the --format option:

  • It is also possible to get the raw list of commands (useful for integrating a command executor):

Maintenance

maintenance:disable

Disable maintenance mode

maintenance:enable

Enable maintenance mode

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--text

-t

Text to display during maintenance

No

No

Yes


Marketplace

marketplace:download

Download a plugin from the GLPI marketplace

Arguments (in order):

Name
Description
Required
Default

plugins

Plugin key

Yes

[]

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--force

-f

Force download even if the plugin is already downloaded

No

No

No

marketplace:info

Get information about a plugin

Arguments (in order):

Name
Description
Required
Default

plugin

Plugin key

Yes

Search the GLPI marketplace

Arguments (in order)

Name
Description
Required
Default

term

Search term

No

marketplace:upgrade

Download all plugins to their latest compatible versions, update all active plugins, and reactivate those that were active.

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--username=USERNAME

-u

Username used during the installation script (among other things to define plugin administration rights)

No

No

No


Migration

migration:appliances_plugin_to_core

Migrate data from the Appliances plugin to GLPI core tables

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--skip-errors

-s

Do not exit in case of import errors

No

No

Non

migration:databases_plugin_to_core

Migrate data from the Databases plugin to GLPI core tables

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--skip-errors

-s

Do not exit in case of import errors

No

No

Non

migration:domains_plugin_to_core

Migrate data from the Domains plugin to GLPI core tables

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--skip-errors

-s

Do not exit on import errors

No

No

No

migration:dynamic_row_format

Convert database tables to "Dynamic" row format (required for "utf8mb4" character set support).

migration:formcreator_plugin_to_core

Migrate data from the Formcreator plugin to GLPI main tables

Name
Shortcut
Description
Required
Default
Table
Negation

--dry-run

Simulate the migration

No

No

No

--form-id=FORM-ID

Import only specific forms with the provided IDs (multiple values allowed).

genericobject_plugin_to_core

Migrate data from the generic object plugin to GLPI main tables

Name
Shortcut
Description
Required
Default
Table
Negation

--dry-run

Simulate the migration

No

No

No

migration:migrate_all

Run all recommended optional migrations.

migration:myisam_to_innodb

Migrate MyISAM tables to InnoDB

migration:racks_plugin_to_core

Migrate data from the Racks plugin to GLPI core tables

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--ignore-other-elements

-i

Ignore "PluginRacksOther" models and elements

No

No

No

--skip-errors

-s

Do not exit on import errors

No

No

No

--truncate

-t

Delete existing core data

No

No

No

--update-plugin

-u

Run the Racks plugin update (you must have the files for version 1.8.0 to perform this operation)

No

No

No

--without-plugin

-w

Enable migration without plugin files (we cannot guarantee that plugin data is compatible with the supported version 1.8.0)

No

No

No

migration:timestamps

Convert "datetime" fields to "timestamp" to use timezones.

migration:timestamps

Migrate primary/foreign keys to unsigned integers

migration:utf8mb4

Convert the database character set from "utf8" to "utf8mb4".


Plugins

plugin:activate

Activate one or more plugin(s)

Arguments (in order) :

Name
Description
Required
Default

directory

Plugin directory

No

[]

Options

Name
Shortcut
Description
Required
Default
Table
Negation

--all

-a

Run the command on all plugins

No

No

No

plugin:deactivate

Deactivate one or more plugin(s)

Arguments (in order)

Name
Description
Required
Default

directory

Plugin directory

No

[]

Options

Name
Shortcut
Description
Required
Default
Table
Negable

--all

-a

Run the command on all plugins

No

No

No

plugin:install

Run the plugin installation script(s)

Arguments (in order)

Name
Description
Required
Default

directory

Plugin directory

No

[]

Options

Name
Shortcut
Description
Required
Default
Table
Negable

--all

-a

Run the command on all plugins

No

No

No

--param

-p

Additional parameters to pass to the plugin installation hook function - "-p foo" will set the value of parameter "foo" to true - "-p foo=bar" will set the value of parameter "foo" to "bar"

No

[]

Yes

Yes

--username

-u

Username used during the installation script (among other things, to define plugin administrator rights)

Yes

No

No

--force

-f

Force installation execution, even if the plugin is already installed

No

No

No

Usage

glpi:plugin:install -p foo=bar -p force myplugin

plugin:list

List installed plugins (from the marketplace or manually installed), enabled, disabled, and those needing updates.

Options

Name
Shortcut
Description
Required
Default
Table
Negable

--format=FORMAT

-f

Output format (table or json), table by default

No

Yes

No

--path

-p

Include the path to the plugins

Yes

plugin:resume_execution

Resume execution of all active plugins

plugin:suspend_execution

Suspend execution of all active plugins

plugin:uninstall

Run the plugin uninstallation script

Arguments (in order)

Name
Description
Required
Default

directory

Plugin directory

No

[]


Rules

rules:process_software_category_rules

Process software category rules

Options

Name
Shortcut
Description
Required
Default
Table
Negatable

--all

-a

Process the rule for all software, even those that already have a defined category

No

No

No

rules:replay_dictionary_rules

Replay dictionary rules on existing items

Options

Name
Shortcut
Description
Required
Table
Negatable

--dictionary

-d

Dictionary to use. Possible values are:

  • CableType

  • ComputerModel

  • ComputerType

  • DatabaseInstanceType

  • GlpiSocketModel

  • ImageFormat

  • ImageResolution

  • Manufacturer, MonitorModel

  • MonitorType

  • NetworkEquipmentModel

  • NetworkEquipmentType

  • OperatingSystem

  • OperatingSystemArchitecture

  • OperatingSystemEdition

  • OperatingSystemKernel

  • OperatingSystemKernelVersion

  • OperatingSystemServicePack

  • OperatingSystemVersion

  • PeripheralModel

  • PeripheralType

  • PhoneModel, PhoneType

  • Printer

  • PrinterModel

  • PrinterType

  • Software

Yes

No

No

--manufacturer-id

-m

If the option is set, only items with the given manufacturer ID will be processed. Currently only available for the Software dictionary.

Yes

No

No


Security

security:change_key

Change the password storage key and update values in the database.

security:change_oauth_key

(Re)generate OAuth keys

Name
Shortcut
Description
Required
Table
Negatable

--force

-f

Force regeneration of OAuth keys even if they already exist.

No

No

No

security:disable_2fa

Disable 2FA for all users

Argument

Name
Description
Required
Default

login

Disable 2FA for one or more users

No

[]

security:session:list

List active sessions

Options

Name
Shortcut
Description
Required

--login=LOGIN

-u

User name

No

security:session:revoke

Revoke login sessions

Name
Shortcut
Description
Required

--login=LOGIN

-u

User name

No

--all

-a

Revoke all sessions

No

--session-id=SESSION-ID

-s

Session ID to revoke

No


System

system:check_requirements

Check system requirements

system:list_services

List system services

system:status

Check system status

Options

Name
Shortcut
Description
Required
Default
Table
Negatable

--private

-p

Advertise status information. Private status information may contain potentially sensitive information such as version information.

No

No

No

--service

-s

The service to check or all

No

all

No

Yes


Task

task:unlock

Unlock automatic tasks

Options

Name
Shortcut
Description
Required
Table
Negatable

--all

-a

Unlock all tasks

No

No

No

--cycle

-c

Execution time (in cycles) from which the task is considered blocked (delay = task frequency * cycle)

No

No

Yes

--delay

-d

Execution time (in seconds) from which the task is considered blocked (default: 1800)

No

No

Yes

--task

-t

Itemtype::name of the task to unlock (e.g., "MailCollector::mailgate")

No

Yes

Yes


Tools

tools:check_database_keys

Check database for missing and errounous keys

Options :

Name
Description
Required
Array
Negatable

--detect-misnamed-keys

Detect misnamed keys

No

No

No

--detect-useless-keys

Detect misnamed keys

No

No

No

tools:check_database_schema_consistency

Check database schema consistency

tools:check_twig_templates_syntax

DESCRIPTION A FAIRE

tools:sdelete_orphan_logs

Delete orphan logs

Options

Name
Shortcut
Description
Required
Default
Array
Negatable

--dry-run

Simulate the command without actually deleting anything

No

No

No

tools:generate_api_snapshot

Updates a snapshot used for API version tests

Argument

Name
Description
Required
Default

version

Version of the API to update the snapshot for

No

[]

tools:generate_dev_ldap

Create a ready to use AuthLDAP object

tools:generate_forms_for_each_illustrations

Generate one form per available illustration

tools:generate_hooks_documentation

Generate plugin hooks documentation

tools:generate_illustration_translations

DESCRIPTION A FAIRE

tools:licence_headers_check

Check licence header in code source files

Options

Name
Shortcut
Description
Required

--plugin=PLUGIN

-p

Plugin name

No

--directory[=DIRECTORY]

-d

Directory to parse (optional)

No

--header-file[=HEADER-FILE]

​

Header file to use (optional)

No

--fix

-f

Fix missing and outdated headers

No

--discard-extra-tags

​

Discard extra tags found in headers

No

tools:locales:compile

Compile MO files from PO files

Options

Name
Shortcut
Description
Required
Default

--plugin=PLUGIN

-p

Plugin name

No

​

--directory=DIRECTORY

-d

Directory to parse (optional)

No

​

tools:locales:extract

Extract strings from the project to generate POT file

tools:plugin:release

Build a GLPI plugin release archive

Options

Name
Shortcut
Description
Required

--plugin=PLUGIN

-p

Plugin name

No

User

user:create

Create a new GLPI user in the internal database

Argument

Name
Description
Required
Default

username

Specify the username of the new user

yes

[]

Options

Name
Shortcut
Description
Required
Table
Negatable

--password[=PASSWORD]

-p

Specify the password

No

No

No

--env=ENV

Environment to use. Possible values are: production, staging, testing, e2e_testing, development

No

No

Yes

--config-dir[=CONFIG-DIR]

Configuration directory to use (this option is obsolete)

No

No

Yes

user:delete

Delete a user

Argument

Name
Description
Required
Default

username

Specify the username of the user to delete

Yes

[]

Option

Name
Description
Required
Table
Negatable

--env=ENV

Environment to use. Possible values are: production, staging, testing, e2e_testing, development

No

No

Yes

--config-dir[=CONFIG-DIR]

Configuration directory to use (this option is obsolete)

No

No

Yes

user:disable

Disable a user

Argument

Name
Description
Required
Default

username

Specify the username of the user to disable

Yes

[]

Option

Name
Description
Required
Array
Negatable

--env=ENV

Environment to use. Possible values are: production, staging, testing, e2e_testing, development

No

No

Yes

--config-dir[=CONFIG-DIR]

Configuration directory to use (this option is deprecated)

No

No

Yes

user:enable

Enable a user

Argument

Name
Description
Required
Default

username

Indicates the identifier of the user to enable

Yes

[]

Options

Name
Description
Required
Array
Negatable

--env=ENV

Environment to use. Possible values are: production, staging, testing, e2e_testing, development

No

No

Yes

--config-dir[=CONFIG-DIR]

Configuration directory to use (this option is deprecated)

No

No

Yes

user:grant

Assign a profile to a user

Argument

Name
Description
Required
Default

username

Indicates the identifier of the user whose profile should be modified

Yes

[]

Options

Name
Shortcut
Description
Required
Array
Negatable

--profile= PROFILE

-p

Desired profile

Yes

--entity=ENTITY

-e

Entity [default: 0]

No

--recursive

-r

Recursion of the profile on sub-entities

No

--env=ENV

Environment to use. Possible values are: production, staging, testing, e2e_testing, development

No

No

Yes

--config-dir[=CONFIG-DIR]

Configuration directory to use (this option is deprecated)

No

No

Yes

user:reset_password

Reset a user's password in the internal database

Argument

Name
Description
Required

username

Indicates the identifier of the user whose password should be reset

Yes

Options

Name
Shortcut
Description
Required
Array
Negatable

--password[=PASSWORD]

-p

Specify the password

No

--env=ENV

Environment to use. Possible values are: production, staging, testing, e2e_testing, development

No

No

Yes

--config-dir[=CONFIG-DIR]

Configuration directory to use (this option is deprecated)

No

No

Yes


Last updated