Skip to main content

CLI App Output and Logs

The CLI App supports several output formats and several log options.

Formatting the Output

By default, the CLI App outputs its data in table format.

Configure the output format with the --format option. For example, to get JSON output, use --format=json.

Available output formats are:

  • table
  • table,interactive
  • table,dark
  • table,bright
  • table,light
  • table,markdown
  • json
  • json,raw
  • csv

The default output format is table.

Here are some examples:

files-cli folders list-for /path/to/folder --format=csv
files-cli folders create --path="/path/to/folder/to/be/created" --format=json,raw
files-cli users list --format=table,dark

Saving Output to a File

Save the output of an operation to a file with the --output flag. This is useful for keeping a log of the actions the operation took.

files-cli upload /local/path/to/folder/ /remote/path/to/folder/ --output="log.txt"

Set the format of that file with the --output-format flag, specifying text, csv, or json. The default is csv.

files-cli upload /local/path/to/folder/ /remote/path/to/folder/ --output="log.txt "--output-format=text

Sending Operation/Run Logs to the Cloud

For scripted operations, the CLI can send a report of the operation, including the Success/Failure status and a log of every run. Add the --send-logs-to-cloud flag.

The logs from the CLI App will be contained within the External Logs of your Files.com site.

Debug Logs

Our Support team may ask for a debug log to help with troubleshooting. Use the --debug flag to generate one.

files-cli upload /local/path/to/folder/ /remote/path/to/folder/ --debug="debuglog.txt"