div config
Manage per-machine CLI settings without ever opening a JSON file.
div config
Read and write per-machine configuration for the Div CLI. Configuration lives at ~/.config/div/config.json and is shared across all your Div projects.
You almost never need to touch this — defaults are good defaults. But when you do (typically when you're pointing the CLI at a local development copy of Div), this is the command.
#Synopsis
div config get [key]
div config set <key> <value>
div config unset <key>
div config path
#Subcommands
#div config get [key]
Print one config value, or all of them if no key is given.
div config get
# api-url = https://div.test
# insecure = true
div config get api-url
# https://div.test
If no config has been set yet, this prints the path where the file would be written.
#div config set <key> <value>
Set a config value.
div config set api-url https://div.test
# ✓ api-url = https://div.test
Trailing slashes are stripped. URLs that don't parse get politely rejected.
#div config unset <key>
Remove a value, falling back to the default.
div config unset api-url
# ✓ unset api-url
#div config path
Print the path to the config file. Useful for editing it directly or piping it into other tools.
div config path
# /Users/<you>/.config/div/config.json
#Recognized keys
| Key | Type | Default | Purpose |
|---|---|---|---|
api-url |
URL string | https://div.so |
The Laravel app the CLI talks to. Override when running against a local development copy. |
insecure |
boolean | false |
When true, sets NODE_TLS_REJECT_UNAUTHORIZED=0 so the CLI accepts self-signed certificates. Use only with local development hosts (e.g. Herd's *.test domains). |
#Precedence
Environment variables always win over the config file. So a one-off override like:
DIV_API_URL=https://staging.div.so div deploy
…still beats whatever you've saved with div config set api-url. Handy for the rare moment when you want to deviate from your usual setup just once.
#Examples
Point the CLI at a local development copy of Div:
div config set api-url https://div.test
div config set insecure true
Switch back to production:
div config unset api-url
div config unset insecure
Peek at the raw file:
cat "$(div config path)"
# {
# "apiUrl": "https://div.test",
# "insecure": true
# }
#See also
- Configuration reference — the JSON schema in detail.
- Environment variables — every override the CLI recognizes.
- Local development guide — when you'd actually want to set these.