There is no config file to write. The CLI is configured with flags and environment variables, and keeps a small amount of state in your home directory.
Environment variables
| Variable | Default | Effect |
|---|---|---|
CEFENSE_API_URL | https://cefense.com | The Cefense instance to talk to. |
CEFENSE_REPO | unset | The repository to act on, the same as --repo. |
CEFENSE_ORG | unset | The organization to act on, the same as --org. Overrides what cf org use stored. |
CEFENSE_TOKEN | unset | An access token to use instead of the keychain. Never written to disk. |
CEFENSE_AGENT | unset | Turn agent mode on for every command without passing --agent. Any value turns it on except 0, false, no, and off. |
CEFENSE_PAGER | unset | Which pager a long view opens in. Checked before PAGER. |
PAGER | unset | The fallback pager. Set either to cat to turn paging off everywhere. |
NO_COLOR | unset | Disable colour. |
FORCE_COLOR | unset | Keep colour when piping. |
Global flags
Available on every command, and taking precedence over the environment.
| Flag | Effect |
|---|---|
--api-url <url> | Override the instance for one invocation. |
--repo <owner/name> | Override the repository for one invocation. |
--org <slug> | Override the organization for one invocation. |
--json | Emit the raw API response as pretty JSON. |
--agent | Machine mode. See Agent mode. |
--columns <list> | Choose the table's columns, and their order. See Reading the output. |
--fields <list> | In agent mode, trim every list in the envelope to these keys. id is always kept. |
--web | Open the result's page in a browser instead of printing it. |
--no-pager | Print a long view straight through instead of paging it. |
--no-color | Disable colour. |
--verbose | Print a stack trace on failure. |
-y, --yes | Answer every confirmation in advance. |
--no-link | Resolve the repository without remembering it for this directory. |
-v, --version | Print the version. |
-h, --help | Print help for any command. |
Precedence
- A flag on the command.
- The environment variable.
- The stored preference or directory link.
- The built-in default.
What the CLI keeps on your machine
~/.cefense-cli/directory- Created with owner-only permissions the first time it is needed.
config.jsonfile- Your instance preference.
defaults.jsonfile- Which repository each directory is linked to.
organizations.jsonfile- The organization chosen with
cf org use, per instance. Global rather than per directory. discovery.jsonfile- A short-lived cache of each instance's configuration.
credentials.jsonfile- Only written when no system keyring is available, with owner-only permissions.
Removing all of it
cf auth logout --all
rm -rf ~/.cefense-cliHave a correction or need help?
Email the docs team