Configuration

The files-cli client can be configured by running files-cli config set.

Using Multiple Accounts

You can use the --profile option to modify the configuration of a specific profile. That same option can be used to specify the profile to use when interacting with Files.com. This allows you to use multiple Files.com accounts without needing to reauthenticate when switching between them.

Example setting

files-cli config set --profile firstaccount --username FIRSTUSERNAME

Configuration Options

Base URL

Set this to the full https:// URL of your Files.com subdomain (e.g. https://MY-SUBDOMAIN.files.com). This is not required in most cases, but one benefit of setting it is that it ensures that authentication failures will be logged to your site's API logs. Without setting this, we won't know which site to associate the authentication failure with, and it won't be logged to your site's API logs. This is always required if your site is configured to disable global acceleration. This can also be set to use a mock server in development or CI.

Example setting

files-cli config set --endpoint https://MY-SUBDOMAIN.files.com
# alternatively
files-cli config set -e https://MY-SUBDOMAIN.files.com

Concurrent Connection Limit

Set the maximum number of concurrent connections.

Example setting

files-cli config set --concurrent-connection-limit 5
# alternatively
files-cli config set -c 5

Session ID

Store an existing user session ID for CLI authentication. You can also provide a session ID for a single command with --session-id.

Example setting

files-cli config set --session-id YOUR_SESSION_ID

Workspace ID

Scope every command to a specific Workspace by storing its ID. You can also scope a single command with --workspace-id.

Example setting

files-cli config set --workspace-id YOUR_WORKSPACE_ID

Default Resource Format

Set default format for displaying resources.

The supported formats are:

  • json
  • csv
  • table

For the json format you can specify either pretty or raw after a comma (,).

For the table format you can specify a style (interactive, light, dark, or bright) and/or a direction (vertical or horizontal) by adding those after commas (e.g. table,dark,horizontal).

Example setting

files-cli config set --format json,raw
files-cli config set -f table,bright,vertical