yangcli-pro(1)

NAME
yangcli-pro - YANG-based NETCONF-over-SSH client application

SYNOPSIS

   yangcli-pro [parameter=value...]

   yangcli-pro --help [brief | normal | full]

   yangcli-pro --version

DESCRIPTION
yangcli-pro is a Command Line Interface for the NETCONF protocol. It uses the YANG data modeling language to manage the NETCONF content layer. This version of yangcli-pro supports the YANG data modeling language defined in RFC 7950.

Refer to the online user manual for full details on using the yangcli-pro client application:

https://docs.yumaworks.com/en/latest/yangcli/index.html

    Normal Mode:
       An interactive CLI shell with command line history.

    Autostart-mode:
       If the 'server' parameter is present, then yangcli-pro will
        attempt to connect to that server upon startup.  If the
       'user' and 'password' parameters are also present, then
       the user will not be prompted before the connection
       is attempted.  This parameter will be processed first,
       if script-mode or batch-mode is used.

    Script-mode:
       If the 'run-script' or 'run-command' parameter is present,
       then the specified script or command will be run automatically
       upon startup.

    Batch-mode:
       If the 'batch-mode' parameter is present, then either the
       'run-script' or 'run-command' parameter will be invoked, if
       present, and then the program will exit.

USAGE
Parameters can be entered in any order, and have the form:

   [start] name [separator [value]]

where:

    start == 0, 1, or 2 dashes (foo, -foo, --foo)

    name == parameter name

         Parameter name completion will be attempted
         if a partial name is entered.

    separator == whitespace or equals sign (foo=bar, foo bar)

    value == string value for the parameter.

         Strings with whitespace need to be double quoted
         (--foo="some string")

Some examples of valid command line parameters:

   foo=3
   -foo=3
   --foo=3
   foo 3
   foo=fred
   --foo "fred flintstone"

Partial parameter names can be entered if they are unique.

OPTIONS

--aliases-file[=filespec]
    Specifies the yangcli-pro command aliases file to use. The default is ~/.yumapro/.yangcli_pro_aliases.

--alt-names=boolean
    Alternate name match mode to use for UrlPath name searches. The default is true (allow matches on alt-name extension).

--allow-shell=boolean
    Enable or disable run-shell feature. Read only system variable, cannot be changed from inside yangcli-pro. The default is false.

--ask-password=boolean
    Specifies whether the user will be required and prompted to provide a password parameter for the connect command. This parameter is intended to support servers that use keys for authentication instead of passwords. If 'true' then the connect command will expect that a password is needed. If 'false' the connect command will no require a password, but it will use the password parameter if it is set. The default is 'true'.

--auto-discard-changes=boolean
    Controls whether discard-change will be automatically sent on the errors of the edit and save mode. If true, discard-change will be automatically sent. If false, discard-change will not be automatically sent. The default is 'false'.

--auto-keepalive=boolean
    Controls whether keepalive messages will be automatically sent on a connected session. If true, keepalive message is sent every keepalive-interval. If false, keepalive message will not be sent. The default is 'false'.

--auto-reconnect=boolean
    Controls whether yangcli will try to reconnect to the server If the session gets dropped by the server. If true, yangcli-pro will try to reconnect to the server. If false, yangcli-pro will not try to reconnect to the server. The default is 'true'.

--auto-reconnect-interval=number
    Specify the number of seconds to wait after first retry. The first retry will be done right away. This value is only used if 'auto-reconnect' is true. The range is "1 .. 3600". The default is 10 seconds.

--auto-reconnect-max=number
    Specify the number of times to retry the connection. Zero means no limit, otherwise re-connect attempts will stop after this number of failures. This value is only used if 'auto-reconnect' is true. The default number is 5.

--autoaliases=boolean
    Controls whether the yangcli-pro command aliases will be saved at exit and loaded at startup. If true, the 'aliases-file' parameter will be used if it is set, or else the default aliases file will be used (~/.yumapro/.yangcli_pro_aliases), for loading and saving the yangcli-pro command aliases. If false, the yangcli-pro command aliases will only be stored and loaded manually with the aliases command. The default is true.

--autocomp=boolean
    Controls whether partial keywords will be checked for interactive or script commands. If true (the default), the first match for a partial keyword will be used if no definition is found for a command name or parameter name. If false, then exact command and parameter name values must be given.

--autoconfig=boolean
    Controls whether the running configuration will be retrieved automatically for active sessions. By default, the running config will not be retrieved and maintained. This option must be set to true to support value-node command tab completion. The default is false.

--autoconfig-conf-mode=boolean
    Controls whether the running configuration will be retrieved automatically for active sessions in config-mode. If autoconfig == TRUE then autoconfig-conf-mode is ignored and autoconfig will be done for config mode. If autoconfig == FALSE then autoconfig-conf-mode is checked and only set if autoconf-conf-mode == TRUE If false, the requests after each update will not be done. If false, the requests after each update will not be done. The current config will not be available to assist tab completion. Default for autoconfig-conf-mode is TRUE.

--autodevices=boolean
    Controls whether the saved devices will be loaded into memory at startup and saved to file at exit. If true, the default device-cfg file will be used (~/.yumapro/.yangcli_pro_devices.conf) for loading and saving the configured devices in memory. If false, the configured devices will only be stored and loaded manually with the devices-cfg command. The default is true.

--autohistory=boolean
    Controls whether the command line history buffer will be saved at exit and loaded at startup. If true, the default history file will be used (~/.yumapro/.yangcli_pro_history) for loading and saving the history buffer. This is the default value. If false, the history buffer will only be stored and loaded manually with the history command.

--autoload=boolean
    Controls whether any YANG content modules will be automatically loaded upon startup or upon session startup with a server. This is the default value. If false, the 'load-module' command must be used to explicitly load all the desired definition modules.

--autoload-cache=boolean
    Controls whether the modules retrieved with the <get-schema> operation are cached for use by the running instance of yangcli-pro.

    If true, then the YANG modules that are retrieved with the <get-schema> operation will be cached. A cached module will be used by yangcli-pro instead of calling <get-schema>, if that module revision is requested again.

    If false, then the YANG modules that are retrieved with the <get-schema> operation will not be cached. The default is true.

--autoload-get=boolean
    Controls whether the <get> operation will be used to retrieve the /netconf-state/schemas sub-tree.

    If 'true', then the schema list will be used instead of the <hello> message module capabilities, if the server supports the 'ietf-netconf-monitoring' module.

    If 'false', then just the <hello> message module list will be used to retrieve YANG modules with the <get-schema> operation.

    This option is needed to autoload sub-modules that are not available to yangcli-pro, since YANG submodules are not advertised in the <hello> message. The default is true.

--autoload-save-cache=boolean
    Controls whether the modules held in the YANG module cache (retrieved with the <get-schema> operation) are saved when yangcli-pro exits.

    If true, then the YANG modules that are cached will not be deleted when yangcli-pro exit.

    If false, then the YANG modules that are cached will be deleted when yangcli-pro exits.

--autonotif=boolean
    Controls whether notifications will automatically be enabled when a session starts. By default, notifications will not be enabled. If enabled, a <create-subscription> operation will be performed when the session starts, and notification events for the sesion will be monitored.

--autonvsave=boolean
    Controls whether the 'save' and 'apply' commands will NV-save the configuration changes or not. If the server advertises the :startup capability and this variable is set to 'false', then the final step to save running to startup will not be done. The 'nvsave' command can be used to manually save the running datastore to non-volatile memory. The default is 'true'.

--autoschemaservers=boolean
    Controls whether the saved schemaservers will be loaded into memory at startup and saved to file at exit. If true, the default schemaserver-cfg file will be used (~/.yumapro/.yangcli_pro_schemaservers.conf) for loading and saving the configured schemaservers in memory. If false, the configured schemaservers will only be stored and loaded manually with the schemaservers-cfg command. The default is true.

--autosessions=boolean
    Controls whether the saved sessions will be loaded into memory at startup and saved to file at exit. If true, the default session-cfg file will be used (~/.yumapro/.yangcli_pro_sessions.conf) for loading and saving the configured sessions in memory. If false, the configured sessions will only be stored and loaded manually with the sessions-cfg command.

--autotest=boolean
    Controls whether the saved test suites will be loaded into memory at startup and saved to file at exit. If true, the default test-suite-cfg file will be used (~/.yumapro/.yangcli_pro_tests.conf) for loading and saving the configured test-suites in memory. If false, the configured test-suites will only be stored and loaded manually with the test-suite command.

--autousers=boolean
    Controls whether the saved users will be loaded into memory at startup and saved to file at exit. If true, the default user-cfg file will be used (~/.yumapro/.yangcli_pro_users.conf) for loading and saving the configured users in memory. If false, the configured users will only be stored and loaded manually with the users-cfg command. The default is true.

--autoeventhandlers=boolean
    Controls whether the saved event_handlers will be loaded into memory at startup and saved to file at exit. If true, the default event-handler-cfg file will be used (~/.yumapro/.yangcli_pro_event_handlers.conf) for loading and saving the configured event-handlers in memory. If false, the configured event-handlers will only be stored and loaded manually with the event-handlers-cfg command. The default is true.

--autouservars=boolean
    Controls whether the yangcli-pro user variables will be saved at exit and loaded at startup. If true, the 'uservars-file' parameter will be used if set, or else the default user variables file will be used (~/.yumapro/yangcli_pro_uservars.xml), for loading and saving the yangcli-pro user variables. If false, the yangcli-pro user variables will only be stored and loaded manually with the uservars command. The default is true.

--bad-data=enum
    Specifies how invalid user input from the CLI will be handled when filling PDUs for remote operations.

       enum values:
          ignore
             Silently accept invalid PDU and data model
             parameters.  Intended for advanced server
             testing mode only.
          warn
             Warn, but accept invalid PDU and data model
             parameters.
          check
             Prompt the user to keep the invalid value
             or re-enter the value.
          error
             Prompt the user to re-enter the invalid value.

--batch-mode
    If present, the interactive CLI will not be used. A script should be provided with the 'run-script' parameter, or a command provided with the 'run-command' parameter, or else the program will simply exit. If the auto-connect mode is enabled, then this will mode simply test if a NETCONF session can be established, then exit.

--binary-display-maxlen=number
    The maximum number of bytes to display when dumping the contents of a binary value. Normally a message will be displayed showing the name and length.

    If this parameter is set to a value greater than zero then a standard 8-byte per line hex dump of the binary type will also be displayed for a maximum number of bytes set by this parameter. The default is zero.

--break-key-mode=enum
    Specifies the bahavior when the break key is pressed during a command. The default mode is 'program' to maintain backward compatibility.
      program
        Break key will cause the program to exit no
        matter what mode or state the program is in
        at the moment.
      command
        Break key will cause the current command in
        the current session to be terminated. If no
        commnd is in progress, or currently in config mode
        or enable mode, then the break key will have no affect.

--callhome-address=ip-address
    Identifies the IP address that should be used to listen for callhome connections. Ignored if callhome-enabled is false. type inet:ip-address; Default is "0.0.0.0"

--callhome-enabled=boolean
    If true, then yangcli-pro will listen for SSH CallHome connections on the socket identified by the callhome-address and callhome-port parameters. The default is false.

--callhome-port=port-number
    Identifies the TCP port that should be used to listen for NETCONF over SSH callhome connections. Ignored if callhome-enabled is false. The default is 4334.

--callhome-tls-port=port-number
    Identifies the TCP port that should be used to listen for NETCONF over TLS callhome connections. Ignored if callhome-enabled is false. The default is 4335.

--callhome-user=string
    Specifies the name of a configured user entry that should be used as the default user for callhome sessions, if no saved session entry is found matching the server IP address. Will be ignored if the user is not currently configured.

    If a callhome session is attempted with an entry and that connection fails, then that callhome-user will not be attempted for the specific server address until yangcli-pro is restarted. This only applies if there are multiple callhome-user entries.

    If only one callhome-user entry exists then it will be used every time, to be backward-compatible with previous releases.

    If used in yp-client then it is possible an application callback will pick the callhome-user for a specific address. It that case, the ordered-by user property will be ignored. Otherwise the callhome-user entries are attempted in the order they are processed from the CLI or configuration file.

--check-output=boolean
    If 'true', then yangcli-pro will validate remote commands against the YANG definition for the rpc/input node. This checks the operation parameters about to be sent to a server session. Also the $$check-output global parm. The default is true.

--check-output-error=boolean
    If 'false', then errors found during the check-output validation tests will be treated as warnings. If 'true', then errors found during the check-output validation tests will be treated as errors, causing the <rpc> about to be sent to fail. The default is false.

--check-replies=boolean
    If true, then yangcli-pro will validate responses for remote commands against the YANG definition for the rpc/output node. This checks the parameters in the <rpc-reply> sent from a server session. Also the $$check-replies global parm. The default is true.

--check-replies-error=boolean
    If 'false', then errors found during the check-replies validation tests will be treated as warnings. If 'true', then errors found during the check-replies validation tests will be treated as errors, causing the <rpc-reply> about to be processed to be rejected. The default is false.

--collector-address=string
    Identifies the IP address that should be used to listen for UDP-Notif messages. Ignored if collector-enabled is false. The type is inet:ip-address-no-zone. The default is 0.0.0.0.

--collector-enabled=boolean
    If true, then yangcli-pro will listen for UDP-Notif messages on the UDP socket identified by the collector-address and collector-port parameters. The default is false.

--collector-port=number
    Identifies the UDP port number that should be used to listen for UDP-Notif messages. Ignored if collector-enabled is false. The default is 10830.

--config-autosave=boolean
    Controls how edits in config term mode are saved to NV-storage if the server supports the :startup capability. If 'true', automatically copy running to startup when an edit is applied. If 'false', no automatically copy from running to startup when an edit is applied. The user will enter 'save' or 'copy-config' manually once config term mode is exited. The default is 'true'.

--confirm-data-retries=number
    Controls how many retry attempts will be given to the user to correctly re-enter a parameter value that has the 'ywx:confirm-data' extension. The command in progress will be cancelled unless the data node is properly connfirmed or skipped. The range is 1 .. 10. The default is 3.

--config=filespec
    The name of the configuration file to use. The default config file is /etc/yumapro/yangcli-pro.conf will be not be checked if this parameter is present.

--no-config
    If present, then no configuration file will be loaded, even if the default configuration file is present.

--config-commit-mode=boolean
    If 'true' then edits done in config mode will be made to the candidate datastore if possible. The edits will not be committed to the running datastore automatically. Instead, the config-commit command in config mode, or <commit> operation in normal mode is required to activate the edits in the server. If 'false' then edits done in config mode will be committed to the running datastore after each 'apply' or 'exit' command in config mode. The default is 'false'.

--config-edit-mode=enum
    Controls how edits are applied during config mode. default is 'level' mode.
       enum values:
         line
           Automatically apply a config mode edit after
           each line
         level
           Automatically apply a config mode edit when
           the current level is exited.
         manual
           Only apply a config mode edit manually with
           the 'apply' command.

--datapath=list
    Internal file search path for configuration data files. Overrides the YUMAPRO_DATAPATH environment variable.

--default-module=string
    Default module name string to use before 'netconf' and 'yangcli-pro' are tried. The module prefix may need to be used for other modules.

--deviation=string
     This parameter identifies a YANG module that should only be checked for deviation statements for external modules. These will be collected and applied to the real module(s) being processed.

    Deviations are applied as patches to the target module. Since they are not identified in the target module at all (ala imports), they have to be specified explicitly, so they will be correctly processed. Zero or more instances of this parameter are allowed.

--disable-command=string
    Specifies a top-level command that should be disabled and not visible or available to a user. If the value does not contain a module name prefix, then the command will be disabled in all modules.

    For example, to disable the NETCONF <delete-config> operation: disable-command nc:delete-config.

    Zero or more disable-command parameters can be used.

--display-mode=enum
    Controls how values are displayed during output to STDOUT or a log file.
        enum values:
           plain
              Plain identifier without any prefix format.
           prefix
              Plain text with XML prefix added format.
           module
              Plain text with module name as prefix added format.
           xml
              XML format.
           xml-nons
              XML format, but without any namespace attributes.
           json
              JSON format.
           cli
              CLI format.

--echo-notif-loglevel=log-level
    Specifies the log-level value that must be active before notifications will be echoed to the log or STDOUT. This parameter has no affect if 'echo-notifs' is false. The $$echo-notif-loglevel system variable is derived from this parameter. The default is 'debug'.

--echo-notifs=boolean
    Allow notifications to be echoed to the log or STDOUT If 'true', <notification> messages will be output to the log, if log-level is set to the value specified by the echo-notif-loglevel or higher.

    If 'false', <notifications> messages will not be output to the log.

    The $$echo-notifs system variable is derived from this parameter. The default is 'true'.

--echo-replies=boolean
    Allow RPC replies to be echoes to the log or STDOUT.

    If true, <rpc-reply> messages containing data will be output to the log, if log-level is 'info' or higher. If false, <rpc-reply> messages containing data will not be output to the log, regardless of the value of log-level.

--encoding=enum
    Identifies the desired encoding format. Only supported for RESTCONF and YANG-API at this time. Enum values are 'xml' and 'json'.

--entry-point=string
    RESTCONF entry point. Use this string instead of retrieving the XRD from the RESTCONF server to discover the entry point.

--feature-disable=module:feature
    Identifies a feature which should be considered disabled. Zero or more entries are allowed.

--feature-enable=module:feature
    Identifies a feature which should be considered enabled. Zero or more entries are allowed.

--feature-enable-default=boolean
    If true (the default), then features will be enabled by default. If false, then features will be disabled by default.

--fill-optional=boolean
    Sets the default for the --optional parameter that can be passed to many interactive commands such as 'fill' or 'create'.

    If 'true' then the user will be prompted to enter optional nodes while filling YANG datastore content.

    If 'false' then the user will not be prompted to enter optional nodes while filling YANG datastore content. The default it 'false'.

--fixorder=boolean
    Controls whether PDU parameters will be automatically sent to the server in the correct order. If true, then canonical order will be used. This is the default value. If false, the specified order will be used.

--force-target=enum
    Controls whether the candidate or running configuration datastore will be used as the default edit target, when both are supported by the server.
          enum values:
            candidate
              Force default edit target to be candidate.
            running
              Force default edit target to be running.

--handle-bad-reply=enum
    Controls the behavior of the XML parser and dictates how a bad RPC reply will be handled, whether the bad node(s) will be pruned or the value will be adapted and the client will try to convert it to an acceptable type. Deafult is error.
          enum values:
            adapt
              Convert bad value to a string value if possible or prune if not
            prune
              Prune failing node(s).
            error
              Do not attempt to prune or modify nodes. Report an error.

--help
    Print this help text and exit. The help-mode choice (--brief, --normal, or --full) may also be present to control the amount of help text printed.

--help-width=number
    The line width to use when displaying help text for the help key '?' within config term mode. If the 'help' extension is used, then that text is displayed in its entirety. Otherwise the total line width will be limited to this help-width value.

    Starting in the 23.10-6 release:

               *  The help output is not limited to a single line.
               *  Multiple lines will be output until the help-width total
                  has been reached.
               *  The screen dimensions will be used to determine the
                  total width for a single line .
               *  Blank lines and indentation in the description will
                  be preserved in the help output.
               *  This parameter is used to determine the total number
                  of help characters to be displayed per object.
               *  The value '0' indicates that the complete help text
                  should be displayed for each object, instead of a
                  specified limit.
               *  The default value is '80' for backward compatibility.
               *  The old limit of '511' has been extended to '65535'

    The range is "0 | 80 .. max". The default is '80'. The recommended value is '0'.

--hide-command=string
    Specifies a top-level command that should be hidden from the tab key, help key and help command. Zero or more hide-command parameters can be used.

    If the value does not contain a module name prefix, then the command will be disabled in all modules.

         -  It will still be enabled but not visible to the user.
         -  If a hidden command is used in a script or directly
            from the command line it will be accepted.
         -  This parameter is ignored if the same command
            is also listed in a 'disable-command' parameter.

         For example, to hide the NETCONF <delete-config> operation:

            hide-command nc:delete-config

         For example, to hide the internal 'else' command:

            hide-command yc:else

--history-file=filespec
    Specifies the file location for the libtecla history file used if autohistory is 'true'. This file will be created if if does not exist and the autohistory parameter is 'true'. The default is ~/.yumapro/.yangcli_pro_history.

--home=dirspec
    Directory specification for the home directory to use instead of HOME.

--ignore-missing-vars=boolean
    Specifies how missing variable errors in data templates are handled. This parameter has no affect unless the 'use-data-templates' parameter is 'true'.

    If 'true', then variable expressions that contain references to missing variables will not cause a parsing error. Instead, an empty string will be used for the value of a missing variable.

    If 'false', then variable expressions that contain references to missing variables will cause a parsing error.

--indent=number
    Number of spaces to indent (0..9) in formatted output. The default is 2 spaces.

--insecure-ok=boolean
    Specifies if insecure NETCONF over TLS should be allowed. If true then X.509 certificates will be accepted even if they cannot be verified. Used for debugging only! This parameter is only available if the image was built with the DEBUG=1 parameter.

--keepalive-interval=number
    Specifies the time interval in seconds between keepalive messages sent from a session. This value is only used if 'auto-keepalive' is true. The range is "1 .. 3600". The default is 4 seconds.

--log=filespec
    Filespec for the log file to use instead of STDOUT. If this string begins with a '~' character, then a username is expected to follow or a directory separator character. If it begins with a '$' character, then an environment variable name is expected to follow.

--log-append
    If present, the log will be appended not over-written. If not, the log will be over-written. Only meaningful if the log parameter is also present.

--log-backtrace=number
    If present, log output will include traceback detail for each log message, subject to further filtering by --log-backtrace-level and/or log-backtrace-stream qualifiers

--log-backtrace-detail
    If present in conjunction with --log-backtrace log messages will include 'detailed' backtrace information (if supported by the compiler).

--log-backtrace-level=bits
    Indicates for which debug level(s) backtrace info will be generated. Param string is an XSD list: a double quoted series of whitespace separated (level) strings like error warn debug

--log-backtrace-stream=bits
    Indicates in which log stream(s) backtrace info will be included. Param string is an XSD list: a double quoted series of whitespace separated (log stream) strings like logfile syslog

--log-console
    Duplicate log messages via STDOUT or log file when log-syslog

--log-header=string
    Indicates in which log stream(s) backtrace info will be included. Param string is an XSD list: a double quoted series of whitespace separated (log stream) strings like logfile syslog

--log-highres-datetime=boolean
    If set to 'true' then a log timestamp string will contain a microseconds field. If 'false' then this field will not contain a microseconds field.

    This field is always 6 digits long and represents a fraction of one second as the number of microseconds. The log-header parameter is affected by this setting. The default is false.

--log-level=enum
    Sets the debug logging level for the program.
          enum values:
            off
            error
            warn
            info
            debug
            debug2
            debug3
            debug4

--log-mirroring
    Duplicate log messages via STDOUT or log file when log-syslog is configured

--log-stderr
    Output log-level error messages via STDERR rather than STDOUT

--log-suppress-ctrl
    If present, strip certain control characters from output in order to modify log formatting.

--log-syslog
    If present, direct log messages to syslog instead of STDOUT or log filespec.

--log-syslog-level=enum
    Sets the syslog debug logging level for the program.

--match-names=enum
    Match mode to use for UrlPath name searches.
          enum values:
            exact
              The name must exactly match the node name
              for all characters in both name strings.
            exact-nocase
              The name must match the node name
              for all characters in both name strings.
              Strings are not case-sensitive.
            one
              The name must exactly match the first N
              characters of just one node name, which
              must be the only partial name match found.
            one-nocase
              The name must exactly match the first N
              characters of just one node name, which
              must be the only partial name match found.
              Strings are not case-sensitive.
            first
              The name must exactly match the first N
              characters of any node name. The first one
              found will be used.
            first-nocase
              The name must exactly match the first N
              characters of any node name. The first one
              found will be used. Strings are not
              case-sensitive.

--match-names-exec-mode=enum
    Match mode to use for UrlPath name searches in exec mode. This only affect XPath name matches and not command and parameter name matches. The default is 'exact'.
          enum values:
            exact
              The name must exactly match the node name
              for all characters in both name strings.
            exact-nocase
              The name must match the node name
              for all characters in both name strings.
              Strings are not case-sensitive.
            one
              The name must exactly match the first N
              characters of just one node name, which
              must be the only partial name match found.
            one-nocase
              The name must exactly match the first N
              characters of just one node name, which
              must be the only partial name match found.
              Strings are not case-sensitive.
            first
              The name must exactly match the first N
              characters of any node name. The first one
              found will be used.
            first-nocase
              The name must exactly match the first N
              characters of any node name. The first one
              found will be used. Strings are not
              case-sensitive.

--message-indent=number
    The number of spaces to indent for each level of output in a protocol message, e.g. NETCONF request. The value zero means no indent, just line feeds. The value -1 means no indent and no line feeds either. (range -1 .. 9) [d:-1]

--modpath=list
    Directory search path for YANG and YIN files. Overrides the YUMAPRO_MODPATH environment variable.

--module=string
    YANG or YIN source module name to load upon startup. If this string represents a filespec, ending with the .yang or .yin extension, then only that file location will be checked.

    If this string represents a module name, then the module search path will be checked for a file the .yang or .yin extension.

    If this string begins with a '~' character, then a username is expected to follow or a directory separator character. If it begins with a '$' character, then an environment variable name is expected to follow.

          ~/some/path ==> <my-home-dir>/some/path

          ~fred/some/path ==> <fred-home-dir>/some/path

          $workdir/some/path ==> <workdir-env-var>/some/path

--ncport=number
    The NETCONF port number to use for starting sessions. If not present, then port 830, followed by port 22, will be tried.

--no-aliases
    Disables the alias substitution feature. The alias file will not be read. The aliases and alias commands will be disabled. The default for no-aliases is not present

--optional=boolean
    Sets the default for the $$optional global variable. If 'true' then the user will be prompted to enter optional nodes for all input.

    If 'false' then the user will not be prompted to enter optional nodes for all input.

    This parameter affects all YANG input and should normally not be used. The fill-optional parameter should be used instead. The default is 'false'.

--password=string
    User password to use for NETCONF sessions. If none, then user will be prompted before connecting.

--no-password
    If present, indicates that no password required. The default for no-password is not present

--private-key=string
    Contains the file path specification for the file containing the client-side private key. If both 'public-key' and 'private-key' files are present, the client will attempt to connect to the server using these keys. If this fails, or not done, then password authentication will be attempted.

--prompt=string
    Set the prompt to the user defined value. This parameter is supported only for yp-shell. The prompt can also be set using the $$prompt variable at any time. If the --prompt CLI parameter is set then that value will be used as the prompt when yp-shell starts. If prompt is used, prompt-name and prompt-type will be ignored.

--prompt-name=string
    Customize a prompt name for yp-shell. For example, to customize yumaworks as prompt name for yp-shell. operation: prompt-name yumaworks.

--prompt-type=enum
    Selects the type of prompt string that will be used in interactive mode. The default is 'normal'.
          enum values:
            brief(0)
            normal(1)
            full(2)

--protocols=bits
    Specifies which protocol versions the program or session will attempt to use. Empty set is not allowed. Default is to enable all protocols.
          bit values:
            netconf1.0
              RFC 4741 base:1.0
            netconf1.1
              RFC 6241 base:1.1
            restconf
              RFC 8040

--public-key=string
    Contains the file path specification for the file containing the client-side public key. If both 'public-key' and 'private-key' files are present, the client will attempt to connect to the server using these keys. If this fails, or not done, then password authentication will be attempted.

--restrict-edit-mode=boolean
    Controls whether an 'restrict-edit-mode' will be supported. If true then the yp-shell editing commands (create, merge, replace, delete, remove, insert, delete-all, remove-all, nvsave) will not be available to the user. Also, the NETCONF edit-config, copy-config, delete-config, commit, cancel-commit, discard-changes commands will not be available to the user. If true then only the config mode will be available for editing configuration data on the server. This parameter can be used instead of specifying individual disable-command parameters for the editing commands.

--return-status=boolean
    If 'true', then the program will exit with a return status that represents a status code, found in ncx/status_enum.h. If 'false' then the value zero will always be returned. The default is 'false'.

--run-command=string
    The specified command will be invoked upon startup. If the auto-connect parameters are provided, then a session will be established before running the command.

--run-script=string
    The specified script will be invoked upon startup. If the auto-connect parameters are provided, then a session will be established before running the script. If a quoted string is used, then any parameters after the script name will be passed to the script.

--runpath=list
    Internal file search path for script files. Overrides the YUMAPRO_RUNPATH environment variable.

--save-session-vars=boolean
    Specifies if session variables will be saved when the program exits. If use-session-vars is 'false' then this variable is ignored.

    If 'true', then session variables will be saved when the program exits, but only if user variables are being saved.

    If 'false', then session variables will not be saved when the program exits.

--script-input=boolean
    Specifies whether scripts run in interactive mode should attempt to fill in missing command parameters from the CLI command line or not. If not, then script commands will be attempted with whatever parameters are present in the script. The default is true.

--server=string
    IP address or DNS name of the NETCONF server target to use for the auto-startup mode, or as the default value when starting a new session.

--server-commands=boolean
    Specifies whether RPC operations learned from server YANG modules will be added as a command available to the user. The module ietf-netconf is exempt from this parameter. Use the disable-command parameter to disable individual NETCONF operations. The default is 'true'.

--shell-command=string
    Specifies the shell program to invoke, in case the default cannot be used. Read only system variable, cannot be changed from inside yangcli-pro. The default is /bin/bash

--show-builtin=boolean
    Controls how the 'show' command functions if the current session is connected to a server.

    If false, the show command will not check if the command line represents server datastore data at all.

    If true, the show command will check if the command line represents server datastore data after checking if the command line contains parameters for the built-in show command.

    The 'match-names' parameter is used to control how matches are determined for the data node names.

    Introduced 24.10T-3. Default is 'true'.

--show-data=boolean
    Controls how the 'show' command functions if the current session is connected to a server.

    If false, the show command will not check if the command line represents server datastore data at all.

    If true, the show command will check if the command line represents server datastore data after checking if the command line contains parameters for the built-in show command.

    The 'match-names' parameter is used to control how matches are determined for the data node names.

    Introduced 24.10T-3. The default is 'true'

--show-datastore=boolean
    Controls how the 'show' command functions if the current session is connected to a server.

    This parameter is ignored unless the 'show-data' parameter is set to 'true.

    If false, the show command will not check if the first command line parameter represents a datastore name.

    If true, the show command will check if the first command line parameter represents server a datastore name. If so, then the rest of the command line represents data nodes within that datastore to retrieve.

    The 'match-names' parameter is used to control how matches are determined for the datastore name.

    If a datastore other than 'operational' is epecified then the allowed data nodes will be restricted to configuration data nodes.

    The datastore name must be at least 3 characters long or the string will not be treated as a datastore name.

               Name Natch Example:
                  - match-names = one-nocase (default)
                  - 'show run' will be treated as 'show running'
                  - 'show ru' will be interpreted as 'show ru'

               Datastore names supported depends on the current session
               -  'running' is always enabled
               -  'candidate' is enabled if the :candidate capability is
                  supported by the server
               -  'startup' is enabled if the :startup capability is
                  supported by the server
               -  'intended' is enabled if NMDA is supported by the server
               -  'operational' is enabled if NMDA is supported by the server

    Introduced 24.10T-3. Default is 'true'.

--show-headers=boolean
    If 'false' show the complete message response when displaying server responses. The 'rpc-reply' container and 'data' container will not be shown in this case. Using this setting will like cause regression tests to fail which match the entire text response.

    This is not done if there are multiple child nodes returned. A header is only removed if there is exactly one child node within it.

    If 'true' the entire response message is shown. This is current (default) behavior. Introduced 24.10-2.

--show-table=boolean
    If 'true' show eligible data in tabular format. Refer to the user manual for details. If 'false' then do not display any data in tabular format. The default is 'true'. Introduced in 24.10T-9.

--show-table-force=enum
    Controls how table display is forced in show data mode.

    This parameter is ignored if the 'show-data' or 'show-table' parameter is false.

    If the 'cli-suppress-table' YANG extension is in affect for the targeted list object then the table output is not used and this parameter is ignored.

    If the 'cli-enforce-table' YANG extension is in affect for the targeted list object then the table output is used and this parameter is ignored.

    Refer to the user manual for details.

        enum values:
            off
              Do not force table display at all.
            skipped
              Allow columns to be skipped that cannot be displayed
              in the table, such as choices, containers, and
              leaf-lists.
            width
              Allow table to be displayed even if too wide.
              Also allows skipped nodes

    The default is 'skipped'. Introduced in 24.10T-9.

--show-table-max-colsize=number
    Sets the maximum width to display for a column. Data will be truncated within a table cell if the length is greater than this amount.

    The actual column width is determined by the width required by the header and all the data in the server response for a given leaf.

    If the column width is not wide enough for the header line then the header name will be truncated the same as a table cell.

    If the output is truncated because the column width is not large enough then the last character printed for that table cell will be the '*' character.

    The '$$show-table-max-colsize' system variable can be used to change this parameter at runtime.

    Refer to the user manual for details. Introduced in 24.10T-9. Default is 30. Range is 12 .. 256.

--ssl-certificate=filespec
    Contains the file path specification for the file containing the client-side ssl certificate. If both 'certificate' and 'key' files are present, the client will attempt to setup a secure connection with the server using the certificate and SSL key.

    If this fails, and the 'ssl-fallback-ok' leaf is set to true, the client will attempt to setup a raw TCP connection with the server. length: 1 .. max. The default is $HOME/.ssl/yangapi-client.crt

--ssl-fallback-ok=boolean
    If true then an attempt to establish a plain TCP connection will be made if an SSL connection cannot be made. This parameter only applies of the 'transport' is 'ssl'. The default is 'true'.

--ssl-key=filespec
    Contains the file path specification for the file containing the client-side ssl key. If both 'certificate' and 'key' files are present, the client will attempt to setup a secure connection with the server using the certificate and SSL key. If this fails, client will attempt to setup a raw TCP connection with the server. length: 1 .. max. The default is $HOME/.ssl/yangapi-client.key

--ssl-trust-store=filespec
    Contains the file path specification for the file containing the client-side ssl trust-store, or the path specification for the directory to use for finding trusted certificates. If the default value is used and the file is not found, then the default directory location '/etc/ssl/certs' will be used. length: 1 .. max. The default is $HOME/.ssl/trust-store.pem

--subdirs=boolean
    If false, the file search paths for modules, scripts, and data files will not include sub-directories if they exist in the specified path.

    If true, then these file search paths will include sub-directories, if present. Any directory name beginning with a dot (.) character, or named CVS, will be ignored. This is the default mode.

--tcp-connect-timeout=uint16
    The number of seconds to wait for a TCP connect operation to complete before timing out.

          -  The value zero indicates that blocking mode
             should be used.

          -  A non-zero value indicates the timeout value
             for the 'connect' function in non-blocking mode.
             The connect may timeout before this number of
             seconds, but should not be longer.

    The default value is 10 seconds. Introduced in 22.10-6.

--term-length=number
    Specifies the length of the terminal to use for page mode output with the -More- prompt. This parameter is ignored in batch mode. It is only used if the output session is operating in interactive mode.

    If the value 0 is used then the 'More' prompt will be disabled. Otherwise this value represents the number of lines to output for each screen in pagination output mode. range: 0 .. 511. The default is 0.

--test-suite-file=filespec
    Specifies the yangcli-pro test suite config file to use. The default is ~/.yumapro/yangcli_pro_tests.conf

--time-rpcs=boolean
    Measure the round-trip time of each <rpc> request and <rpc-reply> at the session level. Echo the elapsed time value to screen if in interactive mode, as well as the log if the log is a file instead of stdout.

--time-rpcs-stats=boolean
     Save rpc statistics to the default statistics file if the time-rpcs variable is also true. The $$time-rpcs-stats system variable is derived from this parameter.

--time-rpcs-stats-file=filespec
     The default filename to use for saving RPC timing statistics. if the time-rpcs and time-rpcs-stats variables are true. The $$time-rpcs-stats-file system variable is derived from this parameter.

--timeout=number
    The number of seconds to wait for a response from the server before declaring a timeout. Zero means do not timeout at all.

--transport=enum
    Identifies the transport protocol that should be used. This is the default that will be used or the value used in auto-connect mode. The value can also be provided when invoking the 'connect' command.
          enum values:
            ssh
              NETCONF over SSH.
              RFC 4742;  RFC 6242
            tcp
              tail-f NETCONF over TCP.
              If this enum is selected, then the default --ncport
              value is set to 2023, and the --protocols value
              is set to netconf1.0.  The --password value will
              be ignored.
            tcp-ncx
              YumaWorks NETCONF over TCP.
              If this enum is selected, then the default --ncport
              value is set to 2023, and the --protocols value
              is set to netconf1.0 and netconf1.1.  The --password
              value will be ignored.
            tls
              If the protocol is 'netconf' and this enum is selected,
              a NETCONF over TLS session will be attempted. If the
              protocol is 'RESTCONF' and this enum is selected
              the RESTCONF client will try to communicate with
              the server using the HTTPS protocol.
            coap
              RESTCONF over CoAP.
              If this enum is selected, then the default --ncport
              value is set to 5683. The --password value will be
              ignored

--use-data-templates=boolean
    Specifies if variable expressions are enabled for data in XML, JSON or .conf instance documents.

    If 'false', then text matching the pattern for variable expressions in these instance documents will be treated as plain strings.

    If 'true', then text matching the pattern for variable expressions in these instance documents will be processed as variable expressions. The default is true.

--use-rawxml=boolean
    Specifies how file result variables will be read for XML files. Controls whether the XML will be parsed against the target YANG object (the default) or injected into a variable or request message from the raw XML text in the file. The default is false.

--use-session-vars=boolean
    Specifies how global variables will be handled when set from the context of a named session. If 'true', then an assignment (e.g., $$foo = 'bar') will only affect the session-specific instance of the variable, and only be visible within the scope of the named session.

    If 'false', then assignment statements for global variables will affect the global instance of the variable, and be visible to all sessions.

    If the current session is the default session, and not a named session, then the value of this variable is ignored, and all global variable assignments will affect the global instance of the variable, and be visible to all sessions. The default is true.

--use-traceid=boolean
    Controls whether the 'trace-id' attribute will be set in the RPC calls or not. By default, 'trace-id' attribute is disabled.

    If 'true', then the XML RPC will contain 'trace-id' attribute

--use-xmlheader=boolean
    Specifies how file result variables will be written for XML files. Controls whether the XML preamble header will be written or not.

--user=string
    User name to use for NETCONF sessions. This value will be used in auto-startup mode, or as the default value when starting a new session.

--uservars-file=filespec
    Specifies the yangcli-pro user variables file to use. The default is ~/.yumapro/yangcli_pro_uservars.xml.

--version
    Print the program version string and exit.

--warn-error=boolean
    Control whether all warnings are elevated to errors. The default value is false.

--warn-idlen=number
     Control whether identifier length warnings will be generated. The value zero disables all identifier length checking. If non-zero, then a warning will be generated if an identifier is defined which has a length is greater than this amount. range: 0 | 8 .. 1023. The default value is 64.

--warn-linelen=number
    Control whether line length warnings will be generated. The value zero disables all line length checking. If non-zero, then a warning will be generated if the line length is greater than this amount. Tab characters are counted as 8 spaces. range: 0 | 40 .. 4095. The default value is 72.

--warn-off=number
    Control whether the specified warning number will be generated and counted in the warning total for the module being parsed. range: 1000 .. 1999. This parameter may be entered zero or more times.

--warn-off-yang=boolean
    Control whether all YANG warnings are enabled or disabled.

--warn-up=number
    Control whether the specified warning number will be elevated to an error and counted in the error total for the module being parsed. range: 1000 .. 1999. This parameter may be entered zero or more times.

--wildcard-keys=boolean
    Set to 'true' if UrlPath targets for GET operations are allowed to replace key values with the dash '-' character to indicate that all instances of that key are requested.

    Set to false to treat the '-' character as a plain character if entered as a key value in a UrlPath string. The default is 'false'.

--with-enable-mode=boolean
    Controls whether an 'enable mode' will be supported. If 'true', the user must enter the 'enable' command to enter enable mode. If the 'enable-password' has been configured then this password must be provided by the user in order to enter enable mode. Within enable mode, the 'config term' command can be used to enter configuration mode. If 'false', then enable mode will not be used and the 'enable' and 'enable password' will not be present. The default value is false.

--with-json-metadata=boolean
    If set to 'true', then RFC 7952 JSON Metadata will be enabled. If 'false', then RFC 7952 JSON Metadata will not be enabled. The default is 'true'. Added in 25.10-8.

--with-notif-commands=boolean
    Specifies that yp-shell should include the create-subscription and cancel-subscription commands. This parameter does not affect yp-shell echoing of notification messages. The --echo-notifs and --echo-notif-loglevel parameters need to be set appropriately to echo received notification messages. Ignored by yangcli-pro. The default is false.

--with-ocpattern=boolean
    If true, then OpenConfig patterns will be checked. If the module name starts with the string 'openconfig-' then all pattern statements within that module are treated as POSIX patterns, not YANG patterns. If false, then the pattern statements in all modules will be checked as YANG patterns. The default value is false.

--with-term-msg=boolean
    If set to 'true', then the yumaworks-term-msg module will be loaded and enabled. Otherwise, this module will not be loaded. The <term-msg> notification is used by yp-shell for displaying terminal diagnostic messages. The default is true. Terminal messages are only displayed if the server supports these notifications and generates them.

--with-yang-metadata=boolean
    If 'true' then the YANG compiler will load the 'ietf-yang-metadata' module and use any md:annotation statements that are found.

    If 'false' then this module will not be loaded and all 'md:annotation' statements will be ignored.

    Note that enabling this parameter will cause a YANG module to be rejected with errors if any annotations are found which do not conform to the definition in RFC 7952.

    This parameter must be entered in the command line to have any effect. Do not use this parameter in a config file since this is too late in the initialization process to change the setting. The default is true. Introduced in 25.10-3.

--yangmap=filespec
    Specifies a yangmap XML file that should be loaded into the program. See yumaworks-yangmap.yang for details on using YANG mappings in config term mode. Zero or more entries allowed.

--ypshell-exec-ok=boolean
    Specifies if the yp-shell program can have access to the exec type of commands such as the 'run' and 'run-shell' commands. Only applies to yp-shell.

    If 'true' then yp-shell will allow the user session to use the following commands:

                 - cd
                 - elif
                 - else
                 - end
                 - eval
                 - fill
                 - get-locks
                 - if
                 - list
                 - log-debug
                 - log-error
                 - log-info
                 - log-warn
                 - pwd
                 - release-locks
                 - run
                 - run-shell
                 - sleep
                 - start-rpc-timing
                 - start-timer
                 - stop-rpc-timing
                 - stop-timer
                 - while

    If 'false' then these commands will not be enabled in the yp-shell program.

    This parameter cannot be changed at run-time with a system variable.

    The '--allow-shell' parameter must also be set to 'true' for the 'run-shell' command to be enabled. The default is 'false'.

--yumapro-home=string
    Directory for the YumaPro project root to use. If present, this directory location will override the YUMAPRO_HOME environment variable, if it is present. If a zero-length string is entered, then the YUMAPRO_HOME environment variable will be ignored.

SEARCH PATH
When a module name is entered as input, or when a module or submodule name is specified in an import or include statement within the file, the following search algorithm is used to find the file:

  1) file is in the current directory
  2) YUMAPRO_MODPATH environment var (or set by modpath parameter)
  3) $HOME/modules directory
  4) $YUMAPRO_HOME/modules directory
  5) $YUMAPRO_INSTALL/modules directory OR
     default install module location, '/usr/share/yumapro/modules'

By default, the entire directory tree for all locations (except step 1) will be searched, not just the specified directory. The subdirs parameter can be used to prevent sub-directories from being searched.

Any directory name beginning with a dot character (.) will be skipped. Also, any directory named CVS will be skipped in directory searches.

ERROR LOGGING
By default, warnings and errors are sent to STDOUT.

A log file can be specified instead with the log' parameter.

Existing log files can be reused with the 'logappend' parameter, otherwise log files are overwritten.

The logging level can be controlled with the log-level parameter.

The default log level is 'info'. The log-levels are additive:

     off:    suppress all errors (not recommended!)
             A program return code of '1' indicates some error.
     error:  print errors
     warn:   print warnings
     info:   print generally interesting trace info
     debug:  print general debugging trace info
     debug2: print verbose debugging trace info
     debug3: print very verbose debugging trace info
     debug4: print maximum debugging trace info

ENVIRONMENT
The following optional environment variables can be used to control module search behavior:

HOME
    The user's home directory (e.g., /home/andy)

YUMAPRO_HOME
    The root of the user's Yuma work directory (e.g., /home/andy/swdev/netconf)

YUMAPRO_INSTALL
    The root of the directory that yangdump is installed on this system (default is, /usr/share/yumapro)

YUMAPRO_DATAPATH
    Colon-separated list of directories to search for data files. (e.g.: './workdir/data-files:/home/andy/test-data') The datapath parameter will override this environment variable, if both are present.

YUMAPRO_MODPATH
    Colon-separated list of directories to search for modules and submodules. (e.g.: './workdir/modules:/home/andy/test-modules') The modpath parameter will override this environment variable, if both are present.

YUMAPRO_RUNPATH
    Colon-separated list of directories to search for script files. (e.g.: './workdir/scripts:/home/andy/scripts') The runpath parameter will override this environment variable, if both are present.

CONFIGURATION FILES

yangcli-pro.conf
    YANG config file The default is: /etc/yumapro/yangcli-pro.conf

    An ASCII configuration file format is supported to store command line parameters.

    The config parameter is used to specify a specific config file, otherwise the default config file will be checked.

       - A hash mark until EOLN is treated as a comment
       - All text is case-sensitive
       - Whitespace within a line is not significant
       - Whitespace to end a line is significant/
         Unless the line starts a multi-line string,
         an escaped EOLN (backslash EOLN) is needed
         to enter a leaf on multiple lines.
       - For parameters that define lists, the key components
         are listed just after the parameter name, without
         any name,  e.g.,

                interface eth0 {
                  # name = eth0 is not listed inside the braces
                  ifMtu 1500
                  ifName mySystem
                }

    A config file can contain any number of parameter sets for different programs.

    Each program must have its own section, identifies by its name:

         # this is a comment
         yangcli-pro {
            log-level debug
            default-module yuma-interfaces
         }

FILES
The following data files must be present in the module search path in order for this program to function:

  * YANG module library
    default: /usr/share/yumapro/modules/

  * yangcli-pro command aliases
    default: ~/.yumapro/.yangcli_pro_aliases
    CLI parameters: --autoaliases, --aliases-file
    See the 'aliases' and 'alias' command for details.
    The format of the aliases file is text.
    A comment is a line that begins with a '#' character,
    and will be ignored. Comments are not saved if the
    --autoaliases=true parameter value is used.
    Single or double quotes can be used.

    Example aliases file:
    ---------------------
    g=get
    gc=get-config
    gcnacm='sget-config --source=running /nacm'
    geteth0="xget /interfaces/interface[name='eth0']"

  * yangcli-pro command line history
    default: ~/.yumapro/.yangcli_pro_history

  * yangcli-pro session configuration
    default: ~/.yumapro/.yangcli_pro_sessions.conf

  * yangcli-pro test suites configuration
    default: ~/.yumapro/yangcli_pro_test.conf

  * yangcli-pro user variables
    default: ~/.yumapro/yangcli_pro_uservars.xml
    CLI parameters: --autouservars, --uservars-file
    See the 'uservars' command for details.
    The format of the uservars file is XML.
    Refer to the 'vars' container in yangcli-pro.yang
    for a definition of the XML contents.

DIAGNOSTICS
Internal diagnostics may generate the following type of message if any bugs are detected at runtime:

    [E0]
         filename.c:linenum error-number (error-msg)

AUTHOR
YumaWorks, Inc., <support at yumaworks dot com>

SEE ALSO
netconf-subsystem-pro(1) netconfd-pro(1) yangdiff-pro(1) yangdump-pro(1)