{
  "id": "gnmic",
  "name": "gNMIc",
  "homepage": "https://gnmic.openconfig.net/",
  "description": "gNMIc is a gNMI CLI client and collector.",
  "executables": [
    "gnmic"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.gnmic.yaml",
      "~/.gnmic.yml",
      "~/.gnmic.toml",
      "~/.gnmic.json",
      "[configHome]/.gnmic.yaml",
      "[configHome]/.gnmic.yml",
      "[configHome]/.gnmic.toml",
      "[configHome]/.gnmic.json",
      "[configHome]/gnmic/.gnmic.yaml",
      "[configHome]/gnmic/.gnmic.yml",
      "[configHome]/gnmic/.gnmic.toml",
      "[configHome]/gnmic/.gnmic.json"
    ],
    "exclude": [],
    "secret": [],
    "secret_paths": [
      {
        "file": [
          "~/.gnmic.yaml",
          "[configHome]/.gnmic.yaml",
          "[configHome]/gnmic/.gnmic.yaml"
        ],
        "format": "yaml",
        "match": {
          "key_path": [
            "password",
            "token",
            "targets.*.password",
            "targets.*.token"
          ]
        }
      },
      {
        "file": [
          "~/.gnmic.yml",
          "[configHome]/.gnmic.yml",
          "[configHome]/gnmic/.gnmic.yml"
        ],
        "format": "yaml",
        "match": {
          "key_path": [
            "password",
            "token",
            "targets.*.password",
            "targets.*.token"
          ]
        }
      },
      {
        "file": [
          "~/.gnmic.toml",
          "[configHome]/.gnmic.toml",
          "[configHome]/gnmic/.gnmic.toml"
        ],
        "format": "toml",
        "match": {
          "key_path": [
            "password",
            "token",
            "targets.*.password",
            "targets.*.token"
          ]
        }
      },
      {
        "file": [
          "~/.gnmic.json",
          "[configHome]/.gnmic.json",
          "[configHome]/gnmic/.gnmic.json"
        ],
        "format": "json",
        "match": {
          "key_path": [
            "password",
            "token",
            "targets.*.password",
            "targets.*.token"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "gNMI client",
    "description": "Query gNMI targets with Get or Capabilities. Passwords (use the prompt or environment), TLS files, Set and Subscribe are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://gnmic.openconfig.net/cmd/get/",
        "evidence": "gnmic -a <ip:port> --username <user> --password <password> --insecure capabilities\ngnmic -a <ip:port>,<ip:port> -u <user> -p <password> --insecure cap\nthe global flag --address\n"
      }
    ],
    "field": [
      {
        "id": "address",
        "label": "Target address",
        "description": "ip:port; separate several targets with commas.",
        "type": "string",
        "option": [
          "--address",
          "-a"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "username",
        "label": "Username",
        "type": "string",
        "option": [
          "--username",
          "-u"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "insecure",
        "label": "Insecure (no TLS)",
        "type": "boolean",
        "option": [
          "--insecure"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Connection",
        "fields": [
          "address",
          "username",
          "insecure"
        ]
      }
    ],
    "subcommand": [
      {
        "path": [
          "get"
        ],
        "label": "Get paths",
        "description": "Retrieve a snapshot of the data at one or more paths.",
        "source": [
          {
            "id": "get",
            "kind": "manual",
            "url": "https://gnmic.openconfig.net/cmd/get/",
            "evidence": "the prefix `[--prefix]` flag\nThe mandatory path flag `[--path]`\nMultiple paths can be specified by using multiple `--path` flags\nThe optional model flag `[--model]`\nThe flag `[--values-only]`\n"
          }
        ],
        "field": [
          {
            "id": "path",
            "label": "Path",
            "type": "string",
            "option": [
              "--path"
            ],
            "multiple": true,
            "sources": [
              "get"
            ]
          },
          {
            "id": "prefix",
            "label": "Path prefix",
            "type": "string",
            "option": [
              "--prefix"
            ],
            "sources": [
              "get"
            ]
          },
          {
            "id": "model",
            "label": "Model",
            "type": "string",
            "option": [
              "--model"
            ],
            "sources": [
              "get"
            ]
          },
          {
            "id": "values_only",
            "label": "Values only",
            "type": "boolean",
            "option": [
              "--values-only"
            ],
            "sources": [
              "get"
            ]
          }
        ],
        "task": [
          {
            "id": "get",
            "label": "Get paths",
            "fields": [
              "path",
              "prefix",
              "model",
              "values_only"
            ],
            "required": [
              "path"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "path",
              "prefix",
              "model",
              "values_only"
            ]
          }
        ]
      },
      {
        "path": [
          "capabilities"
        ],
        "label": "Capabilities",
        "description": "Show the gNMI version, models and encodings a target supports. Uses the connection options above.",
        "source": [
          {
            "id": "cap",
            "kind": "manual",
            "url": "https://gnmic.openconfig.net/cmd/capabilities/",
            "evidence": "gnmic [global-flags] capabilities [local-flags]"
          }
        ],
        "task": [
          {
            "id": "capabilities",
            "label": "Show capabilities",
            "fields": []
          }
        ]
      }
    ]
  }
}
