{"id":26430758,"url":"https://github.com/bheisig/i-doit-cli","last_synced_at":"2025-07-19T03:33:36.565Z","repository":{"id":62493917,"uuid":"74048037","full_name":"bheisig/i-doit-cli","owner":"bheisig","description":"Access your CMDB on the command line interface","archived":false,"fork":false,"pushed_at":"2020-01-08T15:11:39.000Z","size":675,"stargazers_count":13,"open_issues_count":14,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-18T10:43:42.834Z","etag":null,"topics":["api","cli","cmdb","i-doit","phive"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bheisig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2016-11-17T16:55:16.000Z","updated_at":"2023-09-29T19:56:24.000Z","dependencies_parsed_at":"2022-11-02T09:30:42.243Z","dependency_job_id":null,"html_url":"https://github.com/bheisig/i-doit-cli","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bheisig%2Fi-doit-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bheisig%2Fi-doit-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bheisig%2Fi-doit-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bheisig%2Fi-doit-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bheisig","download_url":"https://codeload.github.com/bheisig/i-doit-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166344,"owners_count":20409165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cli","cmdb","i-doit","phive"],"created_at":"2025-03-18T05:34:21.600Z","updated_at":"2025-03-18T05:34:22.241Z","avatar_url":"https://github.com/bheisig.png","language":"PHP","readme":"# i-doit CLI tool\n\nAccess your CMDB on the command line interface\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/bheisig/idoitcli.svg)](https://packagist.org/packages/bheisig/idoitcli)\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.0-8892BF.svg)](https://php.net/)\n[![Build Status](https://travis-ci.org/bheisig/i-doit-cli.svg?branch=master)](https://travis-ci.org/bheisig/i-doit-cli)\n\n## About\n\n[i-doit](https://i-doit.com) is a software application for IT documentation and a CMDB (Configuration Management Database). This application is very useful to collect all your knowledge about the IT infrastructure you are dealing with. i-doit is a Web application and [has an exhausting API](https://kb.i-doit.com/pages/viewpage.action?pageId=37355644) which is very useful to automate your infrastructure.\n\nThis application provides a simple, but powerful command line interface to access your CMDB data stored in i-doit.\n\n## Features\n\n*   Read information about objects their types and even their attributes\n*   Find your needle in the haystack called CMDB\n*   Do you need a free IP address in a particular subnet? This app suggests one for you.\n*   Stress your system: auto-generate thousands of objects\n\n## Requirements\n\nBefore using this app your system must meet the following requirements:\n\n*   Of course, i-doit pro/open, version 1.13 or higher\n*   i-doit API add-on, version 1.10.3 or higher\n*   Any POSIX operating system (GNU/Linux, *BSD, MacOS) or Windows\n*   PHP \u003e= 7.1 (7.3 is recommended)\n*   PHP extensions `calendar`, `cli`, `cURL`, `json`, `phar` and `zlib`\n*   PHP extension `pcntl` is optional, but highly recommended (non-Windows only)\n\n## Install and update\n\nYou have two good options to download and install this application:\n\n*   Download any stable release (**recommended**)\n*   Use [PHIVE](https://phar.io/)\n\n### Download release\n\nDownload the latest stable version of the binary `idoitcli` [from the release site](https://github.com/bheisig/i-doit-cli/releases). Then install it system-wide:\n\n~~~ {.bash}\ncurl -OL https://github.com/bheisig/i-doit-cli/releases/download/0.7/idoitcli\nchmod 755 idoitcli\nsudo mv idoitcli /usr/local/bin/\n~~~\n\nTo be up-to-date just repeat the steps above.\n\n### Use PHIVE\n\nWith [PHIVE](https://phar.io/) you are able to download and install PHAR files on your system. Additionally, it will verify the SHA1 and GPG signatures which is highly recommended. If you have PHIVE already installed you can fetch the latest version of this application:\n\n~~~ {.bash}\nsudo phive install --global bheisig/i-doit-cli\n~~~\n\nThis will install an executable binary to `/usr/bin/idoitcli`.\n\nIf a new release is available you can perform an update:\n\n~~~ {.bash}\nsudo phive update --global\n~~~\n\n## Usage\n\nJust run the application to show the basic usage:\n\n~~~ {.bash}\nidoitcli\n~~~\n\n## First steps\n\nThis application caches a lot locally to give you the best user experience. Run the `init` command:\n\n~~~ {.bash}\nidoitcli init\n~~~\n\nSome simple questions will be asked how to access your i-doit installation. Next step is to create cache files:\n\n~~~ {.bash}\nidoitcli cache\n~~~\n\nAfter that some files will be created in your home directory under `~/.idoitcli/`: Each i-doit installation has its own cache files under `data/`. Your user-defined configuration file is called `config.json`.\n\nYou may check your current status by running:\n\n~~~ {.bash}\nidoitcli status\n~~~\n\nThis gives you some basic information about your i-doit installation, your settings and your user.\n\n## Access your CMDB data\n\nThis is probably the best part: Read information about objects, their types and even attributes.\n\nList all object types:\n\n~~~ {.bash}\nidoitcli read\nidoitcli read /\n~~~\n\nList server objects:\n\n~~~ {.bash}\nidoitcli read server/\nidoitcli read server/host.example.net\nidoitcli read server/*.example.net\nidoitcli read server/host.*.net\nidoitcli read server/*.*.net\nidoitcli read server/host*\nidoitcli read server/*\n~~~\n\nShow common information about server \"host.example.net\":\n\n~~~ {.bash}\nidoitcli read server/host.example.net\n~~~\n\nShow common information about object identifier \"42\":\n\n~~~ {.bash}\nidoitcli read 42\n~~~\n\nShow common information about one or more objects by their titles:\n\n~~~ {.bash}\nidoitcli read *.example.net\nidoitcli read host.*.net\nidoitcli read *.*.net\nidoitcli read host*\n~~~\n\nList assigned categories:\n\n~~~ {.bash}\nidoitcli read server/host.example.net/\n~~~\n\nShow values from category \"model\" for this server:\n\n~~~ {.bash}\nidoitcli read server/host.example.net/model\n~~~\n\nShow values from category \"model\" for one or more servers:\n\n~~~ {.bash}\nidoitcli read server/*.example.net/model\nidoitcli read server/host.*.net/model\nidoitcli read server/*.*.net/model\nidoitcli read server/host*/model\nidoitcli read server/*/model\n~~~\n\nOr just show the name of the model:\n\n~~~ {.bash}\nidoitcli read server/host.example.net/model/model\n~~~\n\nList available attributes for category \"model\":\n\n~~~ {.bash}\nidoitcli read server/host.example.net/model/\n~~~\n\nYou may leave the object type empty for specific objects, for example:\n\n~~~ {.bash}\nidoitcli read host.example.net/model\n~~~\n\n**Notice:** These examples work great with unique names. That is why it is common practice to give objects unique titles that are not in conflict with object types and categories.\n\n## Show everything about an object\n\n~~~ {.bash}\nidoitcli show myserver\nidoitcli show \"My Server\"\nidoitcli show 42\n~~~\n\n## Find your data\n\nFind your needle in the haystack called CMDB:\n\n~~~ {.bash}\nidoitcli search myserver\nidoitcli search \"My Server\"\n~~~\n\n## Show the next free IPv4 address\n\nGet the next free IPv4 address for a particular subnet:\n\n~~~ {.bash}\nidoitcli nextip SUBNET\n~~~\n\n`SUBNET` may be the object title or its identifier.\n\n## Auto-generate objects\n\nFor testing purposes stress your i-doit installation and let the app create thousands of objects, attributes and relations between objects:\n\n~~~ {.bash}\nidoitcli -c FILE random\n~~~\n\nThere are some examples located under `docs/`.\n\n## Update the caches\n\nIf your CMDB configuration has changed you need to re-create the cache files by running the `cache` command:\n\n~~~ {.bash}\nidoitcli cache\n~~~\n\n## Playground\n\nPerform self-defined API requests – pass request as argument:\n\n~~~ {.bash}\nidoitcli call '{\"version\": \"2.0\",\"method\": \"idoit.version\",\"params\": {\"apikey\": \"c1ia5q\",\"language\": \"en\"},\"id\": 1}'\n~~~\n\nPipe request:\n\n~~~ {.bash}\necho '{\"version\": \"2.0\",\"method\": \"idoit.version\",\"params\": {\"apikey\": \"c1ia5q\",\"language\": \"en\"},\"id\": 1}' | idoitcli call\n~~~\n\nRead request from file:\n\n~~~ {.bash}\ncat request.txt | idoitcli call\n~~~\n\nRead request from standard input (double-enter to execute):\n\n~~~ {.bash}\nidoitcli call\n~~~\n\n## Configuration\n\nThere are some ways to set your configurations settings:\n\n1.  System-wide settings are stored under `/etc/idoitcli/config.json`.\n2.  User-defined settings are stored under `~/.idoitcli/config.json`.\n3.  Pass your run-time settings by using the options `-c` or `--config`.\n\nKeep in mind this order matters. Each file is optional. Any combination is possible. Furthermore, to include even more configuration files you can pass the options `-c` and `--config` as often as you like.\n\nThe configuration files are JSON-formatted.\n\n## Contribute\n\nPlease, report any issues to [our issue tracker](https://github.com/bheisig/i-doit-cli/issues). Pull requests and OS distribution packages are very welcomed. For further information, see file [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\n## Copyright \u0026 License\n\nCopyright (C) 2016-19 [Benjamin Heisig](https://benjamin.heisig.name/)\n\nLicensed under the [GNU Affero GPL version 3 or later (AGPLv3+)](https://gnu.org/licenses/agpl.html). This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.\n\n[List of first names and gender:](https://www.heise.de/ct/ftp/07/17/182/) Copyright (C) 2007-2008 Jörg Michael, licensed under [GNU Free Documentation License](https://www.gnu.org/licenses/fdl.html)\n\n[List of surnames:](https://github.com/HBehrens/phonet4n/blob/master/src/Tests/data/nachnamen.txt) Copyright (C) Heiko Behrens, lisenced under [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl-3.0)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbheisig%2Fi-doit-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbheisig%2Fi-doit-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbheisig%2Fi-doit-cli/lists"}