To list all of the available commands, enter the CLI command help:
cdap (http://localhost:11015/namespace:default)> help
In this documentation, to save space, this prompt is abbreviated to:
To run the CLI in non-interactive mode, run the CDAP CLI executable, passing the command you want executed as the argument. For example, to list all applications currently deployed to CDAP, execute:
Linux: $ cdap cli list apps
Windows: > cdap.bat cli list apps
Connecting to Secure CDAP Instances
When connecting to secure CDAP instances, the CLI will look for an access token located at ~/.cdap.accesstoken.<hostname> and use it if it exists and is valid. If not, the CLI will prompt you for the required credentials to acquire an access token from the CDAP instance. Once acquired, the CLI will save it to ~/.cdap.accesstoken.<hostname> for later use and use it for the rest of the current CLI session.
If set to true, try provided connection (from uri)
Print exception stack traces.
Print the usage message.
CDAP instance URI to interact with in the format "[http[s]://]<hostname>[:<port>][/<path>]" Defaults to "http://<hostname>.local:11015".
CDAP Instance Namespace to connect to. Defaults to “default”.
Set the number of times to retry contacting a service if it is determined to be unavailable. Defaults to 0.
Execute a file containing a series of CLI commands, line-by-line.
Set HTTP read timeout of the CLI in seconds.
If "true", verify SSL certificate when making requests. Defaults to "true".
Starting in CDAP 6.1.4, the option --uri is deprecated. Use --link option instead.
Certain commands (cli render as, connect-link, and use namespace) affect how the CLI works for the duration of a session.
The command cli render as <table-renderer> (from the General commands) sets how table data is rendered. Valid options are either alt (the default) or csv. Because the alt option might split a cell into multiple lines, you might need to use csv if you want to copy and paste the results into another application or include in a message.
With cli render as alt (the default), a command such as list apps will be output as:
| app id | description |
| PurchaseApp | Some description |
With cli render as csv, the same list apps will be output as: