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
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):
- Command-line flags -
grove tip --network base-sepolia - Environment variables -
GROVE_API_KEY=sk_test grove balance - Config file -
~/.grove/.env - 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:
| Variable | Description | Default |
|---|---|---|
GROVE_API_KEY | Your API key | (none) |
GROVE_API_URL | API endpoint | https://api.grove.city |
DEFAULT_NETWORK | Blockchain network | base |
DEFAULT_TOKEN | Token symbol | USDC |
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:
- Verify it's correct:
grove config show - Get a new key from https://app.grove.city
- Update:
grove config set api_key sk_new_key