glpi-cli

GLPI Command Line Interface


Keywords
GLPI, CLI
License
Apache-2.0
Install
pip install glpi-cli==0.2.0

Documentation

glpi-cli

Build Status PyPi Version

GLPI Command Line Interface.

Easy way to iterate with GLPI using Command Line Interface.

This CLI use this GLPI SDK

Config

Install from repository

git clone https://github.com/mtulio/glpi-cli
cd glpi-cli
make install-me

OR install it using pip:

pip install glpi-cli

Setup the environment with your GLPI

export GLPI_API_URL=http://path/to/glpi/apirest.php
export GLPI_USERNAME=<Your username>
export GLPI_PASSWORD=<Your password>
export GLPI_APP_TOKEN=<Your User APP Token>

Use it

  • Get all Ticket items
$ glpi-cli --item ticket --command get_all
  • Get an Ticket by ID
$ glpi-cli --item ticket --command get_all --id 10
  • Get all Knowledge Base Titles - filtered output with json util jq
$ glpi-cli --item knowbase --command get_all |jq .[].name

Get Involved

PR are always welcome. =]

Please make sure that the code have passed in following tests:

make  dependencies
make check-syntax
make install-me