ReddGrowReddGrow Docs

Configuration

Environment variables, config file location, and key precedence for the ReddGrow CLI

The CLI can be configured through environment variables or a local config file. Environment variables always take precedence over the config file.

Environment Variables

REDDGROW_API_KEY

Your ReddGrow API key. When set, this overrides any key saved by reddgrow auth login.

export REDDGROW_API_KEY=rg_your_key_here

Useful for CI/CD pipelines, Docker containers, or any environment where you want to inject credentials without touching the filesystem.


REDDGROW_API_URL

The base URL for the ReddGrow API. Defaults to https://api.reddgrow.ai.

export REDDGROW_API_URL=https://api.reddgrow.ai

Only change this if you are pointing the CLI at a self-hosted or staging instance.


REDDGROW_MODE

Force a specific output mode. Accepted values: human, agent.

export REDDGROW_MODE=agent

When set to agent, all commands output raw JSON regardless of whether the terminal is interactive. See Output Modes for full details.

Config File

When you run reddgrow auth login, the API key is written to a local config file:

~/.reddgrow/config.json

Example file contents:

{
  "apiKey": "rg_your_key_here"
}

You can edit this file directly, but reddgrow auth login and reddgrow auth logout are the recommended way to manage it.

Precedence

When multiple sources provide the same setting, the CLI resolves them in this order (highest to lowest):

PrioritySource
1 (highest)Environment variable (e.g., REDDGROW_API_KEY)
2Config file (~/.reddgrow/config.json)
3 (lowest)Built-in defaults

For output mode specifically:

PrioritySource
1--mode flag
2REDDGROW_MODE environment variable
3TTY auto-detection

Quick Reference

VariableDefaultDescription
REDDGROW_API_KEYAPI key (overrides saved key)
REDDGROW_API_URLhttps://api.reddgrow.aiAPI base URL
REDDGROW_MODEautoOutput mode: human or agent