Skip to main content

Configuration

The Grove CLI stores configuration in ~/.grove/.env. This file is preserved across updates.

Configuration Files

~/.grove/.env

Primary configuration file containing:

GROVE_API_KEY=sk_your_api_key_here
GROVE_API_URL=https://api.grove.city
DEFAULT_NETWORK=base
DEFAULT_TOKEN=USDC

Location: ~/.grove/.env Created by: grove setup command Preserved: Across CLI updates


~/.grove/session_jwt.txt

Temporary session token (internal use).

Location: ~/.grove/session_jwt.txt Managed by: CLI automatically Preserved: Across CLI updates


~/.grove/keyfile.txt

Wallet private key for agents using grove fund.

Location: ~/.grove/keyfile.txt Created by: grove keygen --save Preserved: Across CLI updates

Security Warning

This file contains your private key. Never share it or commit it to version control.


Configuration Precedence

The CLI loads configuration in this order (highest priority first):

  1. Command-line flags - grove tip --network base-sepolia
  2. Environment variables - GROVE_API_KEY=sk_test grove balance
  3. Config file - ~/.grove/.env
  4. Built-in defaults - Mainnet (base, USDC)

Example

Config file has GROVE_API_KEY=sk_prod_abc123.

Environment variable overrides config file:

GROVE_API_KEY=sk_test_xyz789 grove balance

Command flag overrides everything:

grove tip olshansky.info 0.01 --network base-sepolia

Managing Configuration

View Current Configuration

grove config show

Output:

Configuration:
API URL: https://api.grove.city
API Key: sk_*****************************abc
Network: base
Token: USDC

Update Configuration

grove config set <key> <value>

Examples:

Set API key:

grove config set api_key sk_your_key_here

Switch token:

grove config set token USDC

Environment Variables

You can override any config value with environment variables:

VariableDescriptionDefault
GROVE_API_KEYYour API key(none)
GROVE_API_URLAPI endpointhttps://api.grove.city
DEFAULT_NETWORKBlockchain networkbase
DEFAULT_TOKENToken symbolUSDC

Example: Temporary Override

GROVE_API_KEY=sk_alternate_key grove balance

Resetting Configuration

Reset Everything

Remove the entire configuration directory and start fresh:

rm -rf ~/.grove
grove setup

Reset Specific Files

Reset API key only:

rm ~/.grove/.env
grove setup

Remove wallet key:

rm ~/.grove/keyfile.txt
grove keygen --save

Clear session cache:

rm ~/.grove/session_jwt.txt

Troubleshooting

Config File Not Found

If grove config show shows default values:

Create config directory:

mkdir -p ~/.grove

Run setup wizard:

grove setup

Permission Denied

If you get permission errors:

chmod 700 ~/.grove
chmod 600 ~/.grove/.env
chmod 600 ~/.grove/keyfile.txt

API Key Issues

If your API key doesn't work:

  1. Verify it's correct: grove config show
  2. Get a new key from https://app.grove.city
  3. Update: grove config set api_key sk_new_key