{"id":15156670,"url":"https://github.com/puppetlabs/puppetdb-cli","last_synced_at":"2025-09-30T06:31:08.633Z","repository":{"id":53485601,"uuid":"46153164","full_name":"puppetlabs/puppetdb-cli","owner":"puppetlabs","description":"PuppetDB CLI Tooling","archived":true,"fork":false,"pushed_at":"2024-01-22T23:40:35.000Z","size":4288,"stargazers_count":16,"open_issues_count":0,"forks_count":26,"subscribers_count":140,"default_branch":"main","last_synced_at":"2025-01-01T09:17:59.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-13T23:44:41.000Z","updated_at":"2024-01-22T23:41:17.000Z","dependencies_parsed_at":"2024-06-21T14:15:11.763Z","dependency_job_id":"0f420a37-f6c7-4499-bfbb-47b5869cfd49","html_url":"https://github.com/puppetlabs/puppetdb-cli","commit_stats":{"total_commits":42,"total_committers":4,"mean_commits":10.5,"dds":0.2857142857142857,"last_synced_commit":"5b5621617cd20ff195ca5eaaf63a8e2ce29927d4"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetdb-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetdb-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetdb-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetdb-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetdb-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234712605,"owners_count":18875483,"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":[],"created_at":"2024-09-26T19:40:49.103Z","updated_at":"2025-09-30T06:31:07.352Z","avatar_url":"https://github.com/puppetlabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppetdb-cli\n\n\u003e ⚠️ This repo has been superseded by https://github.com/puppetlabs/pe-cli\n\nThe PuppetDB CLI project provide Puppet subcommands for querying PuppetDB data,\nvia `puppet query \u003cquery\u003e`, and PuppetDB administrative tasks, `puppet db\n\u003cimport|export|status\u003e`. The `query` subcommand will allow you to query PuppetDB\nusing either the upcoming PQL syntax of the traditional PuppetDB query syntax\n(also known as AST). The `db` subcommand is a replacement for the older\n`puppetdb \u003cexport|import\u003e` commands with faster startup times and much\nfriendlier error messages.\n\n## Compatibility\n\nThis CLI is compatible with\n[PuppetDB 4.0.0](https://docs.puppetlabs.com/puppetdb/4.0/release_notes.html#section)\nand greater.\n\n## Installation\n\nPlease see\n[the PuppetDB documentation](https://docs.puppet.com/puppetdb/latest/pdb_client_tools.html)\nfor instructions on how to install the `puppet-client-tools` package.\n\n## Installation from source\n\nTBD\n\n## Usage\n\nExample usage:\n\n```bash\n\n$ puppet-query 'nodes[certname]{}'\n[\n  {\n    \"certname\" : \"baz.example.com\"\n  },\n  {\n    \"certname\" : \"bar.example.com\"\n  },\n  {\n    \"certname\" : \"foo.example.com\"\n  }\n]\n$ puppet-db status\n{\n  \"puppetdb-status\": {\n    \"service_version\": \"4.0.0-SNAPSHOT\",\n    \"service_status_version\": 1,\n    \"detail_level\": \"info\",\n    \"state\": \"running\",\n    \"status\": {\n      \"maintenance_mode?\": false,\n      \"queue_depth\": 0,\n      \"read_db_up?\": true,\n      \"write_db_up?\": true\n    }\n  },\n  \"status-service\": {\n    \"service_version\": \"0.3.1\",\n    \"service_status_version\": 1,\n    \"detail_level\": \"info\",\n    \"state\": \"running\",\n    \"status\": {}\n  }\n}\n\n```\n\n## Configuration\n\nThe Go PuppetDB CLI accepts a `--config=\u003cpath_to_config\u003e` flag which allows\nyou to configure your ssl credentials and the location of your PuppetDB.\n\nBy default the tool will use `$HOME/.puppetlabs/client-tools/puppetdb.conf` as\nit's configuration file if it exists. You can also configure a global\nconfiguration (for all users) in `/etc/puppetlabs/client-tools/puppetdb.conf`\n(`C:\\ProgramData\\puppetlabs\\client-tools\\puppetdb.conf` on Windows) to fall back\nto if the per-user configuration is not present.\n\nThe format of the config file can be deduced from the following example.\n\n```json\n  {\n    \"puppetdb\" : {\n      \"server_urls\" : [\n        \"https://\u003cPUPPETDB_HOST\u003e:8081\",\n        \"https://\u003cPUPPETDB_REPLICA_HOST\u003e:8081\"\n      ],\n      \"cacert\" : \"/path/to/cacert\",\n      \"cert\" : \"/path/to/cert\",\n      \"key\" : \"/path/to/private_key\",\n      \"token-file\" : \"/path/to/token (PE only)\"\n      },\n    }\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetdb-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetdb-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetdb-cli/lists"}