id = "gnmic" name = "gNMIc" homepage = "https://gnmic.openconfig.net/" description = "gNMIc is a gNMI CLI client and collector." executables = ["gnmic"] platforms = ["macos", "linux"] [dotfiles] # The official configuration guide (https://gnmic.openconfig.net/user_guide/configuration_intro/) # says the default `.gnmic` file is searched in $HOME, $XDG_CONFIG_HOME and # $XDG_CONFIG_HOME/gnmic, with yaml/yml, toml and json extensions. These are # the three user-level locations and all supported default extensions. 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 = [] # The official file-configuration reference documents usernames/passwords and # target-specific credentials. Cover both top-level and target-nested shapes. [[dotfiles.secret_paths]] file = ["~/.gnmic.yaml", "[configHome]/.gnmic.yaml", "[configHome]/gnmic/.gnmic.yaml"] format = "yaml" match = { key_path = ["password", "token", "targets.*.password", "targets.*.token"] } [[dotfiles.secret_paths]] file = ["~/.gnmic.yml", "[configHome]/.gnmic.yml", "[configHome]/gnmic/.gnmic.yml"] format = "yaml" match = { key_path = ["password", "token", "targets.*.password", "targets.*.token"] } [[dotfiles.secret_paths]] file = ["~/.gnmic.toml", "[configHome]/.gnmic.toml", "[configHome]/gnmic/.gnmic.toml"] format = "toml" match = { key_path = ["password", "token", "targets.*.password", "targets.*.token"] } [[dotfiles.secret_paths]] 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 } [[commands.source]] id = "docs" kind = "manual" url = "https://gnmic.openconfig.net/cmd/get/" evidence = """ gnmic -a --username --password \ --insecure capabilities gnmic -a , -u -p \ --insecure cap the global flag --address """ [[commands.field]] id = "address" label = "Target address" description = "ip:port; separate several targets with commas." type = "string" option = ["--address", "-a"] sources = ["docs"] [[commands.field]] id = "username" label = "Username" type = "string" option = ["--username", "-u"] sources = ["docs"] [[commands.field]] id = "insecure" label = "Insecure (no TLS)" type = "boolean" option = ["--insecure"] sources = ["docs"] [[commands.group]] id = "basic" label = "Connection" fields = ["address", "username", "insecure"] [[commands.subcommand]] path = ["get"] label = "Get paths" description = "Retrieve a snapshot of the data at one or more paths." [[commands.subcommand.source]] id = "get" kind = "manual" url = "https://gnmic.openconfig.net/cmd/get/" evidence = """ the prefix `[--prefix]` flag The mandatory path flag `[--path]` Multiple paths can be specified by using multiple `--path` flags The optional model flag `[--model]` The flag `[--values-only]` """ [[commands.subcommand.field]] id = "path" label = "Path" type = "string" option = ["--path"] multiple = true sources = ["get"] [[commands.subcommand.field]] id = "prefix" label = "Path prefix" type = "string" option = ["--prefix"] sources = ["get"] [[commands.subcommand.field]] id = "model" label = "Model" type = "string" option = ["--model"] sources = ["get"] [[commands.subcommand.field]] id = "values_only" label = "Values only" type = "boolean" option = ["--values-only"] sources = ["get"] [[commands.subcommand.task]] id = "get" label = "Get paths" fields = ["path", "prefix", "model", "values_only"] required = ["path"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["path", "prefix", "model", "values_only"] [[commands.subcommand]] path = ["capabilities"] label = "Capabilities" description = "Show the gNMI version, models and encodings a target supports. Uses the connection options above." [[commands.subcommand.source]] id = "cap" kind = "manual" url = "https://gnmic.openconfig.net/cmd/capabilities/" evidence = "gnmic [global-flags] capabilities [local-flags]" [[commands.subcommand.task]] id = "capabilities" label = "Show capabilities" fields = []