Skip to content

configuration

Manage configuration settings, preferences, and environment options for the Grapevine CLI.

Usage

grapevine config [command] [options]

Commands

set

Set a configuration value.

grapevine config set <key> <value>

get

Get a configuration value.

grapevine config get <key>

list

List all configuration values.

grapevine config list

reset

Reset configuration to defaults.

grapevine config reset [--all]

edit

Open configuration file in your default editor.

grapevine config edit

Configuration Keys

Network Settings

network

  • Type: string
  • Default: mainnet
  • Options: mainnet, testnet, sepolia

Default blockchain network to use.

grapevine config set network testnet

rpc_url

  • Type: string
  • Default: auto

Custom RPC endpoint URL.

grapevine config set rpc_url "https://mainnet.infura.io/v3/your-key"

api_endpoint

  • Type: string
  • Default: https://api.grapevine.markets

Grapevine API endpoint.

grapevine config set api_endpoint "https://staging-api.grapevine.markets"

Display Preferences

page_size

  • Type: number
  • Default: 20
  • Range: 1-100

Default number of items per page.

grapevine config set page_size 50

color_output

  • Type: boolean
  • Default: true

Enable colored terminal output.

grapevine config set color_output false

table_format

  • Type: string
  • Default: table
  • Options: table, list, json

Default output format for list commands.

grapevine config set table_format json

Behavior Settings

auto_confirm

  • Type: boolean
  • Default: false

Skip confirmation prompts for destructive actions.

grapevine config set auto_confirm true

auto_update_check

  • Type: boolean
  • Default: true

Automatically check for CLI updates.

grapevine config set auto_update_check false

cache_enabled

  • Type: boolean
  • Default: true

Enable response caching for better performance.

grapevine config set cache_enabled false

cache_ttl

  • Type: number
  • Default: 300

Cache time-to-live in seconds.

grapevine config set cache_ttl 600

Content Defaults

default_price

  • Type: number
  • Default: 0.01

Default price for new entries in USDC.

grapevine config set default_price 0.25

default_tags

  • Type: string

Default tags to suggest for new content (comma-separated).

grapevine config set default_tags "tutorial,beginner"

editor

  • Type: string
  • Default: $EDITOR or vim

Default editor for content creation.

grapevine config set editor "code --wait"

Examples

View Current Configuration

grapevine config list
⚙️  Grapevine CLI Configuration
 
🌐 Network Settings:
   network: mainnet
   rpc_url: auto
   api_endpoint: https://api.grapevine.markets
 
🎨 Display Preferences:
   page_size: 20
   color_output: true
   table_format: table
 
⚡ Behavior Settings:
   auto_confirm: false
   auto_update_check: true
   cache_enabled: true
   cache_ttl: 300
 
📝 Content Defaults:
   default_price: 0.01
   default_tags: (not set)
   editor: vim
 
📁 File Locations:
   Config File: ~/.grapevine/config.json
   Cache Directory: ~/.grapevine/cache
   Log File: ~/.grapevine/cli.log

Set Multiple Values

# Development setup
grapevine config set network testnet
grapevine config set page_size 50
grapevine config set auto_confirm true
grapevine config set default_price 0.05

Get Specific Value

grapevine config get network
# Output: mainnet

Reset to Defaults

# Reset specific setting
grapevine config reset network
 
# Reset everything
grapevine config reset --all

Edit Configuration File

# Open in default editor
grapevine config edit

Advanced Configuration

Environment Variables

Some settings can be overridden with environment variables:

# Network settings
export GRAPEVINE_NETWORK="testnet"
export GRAPEVINE_RPC_URL="https://your-rpc.com"
export GRAPEVINE_API_ENDPOINT="https://api-staging.example.com"
 
# Authentication
export PRIVATE_KEY="0xYourPrivateKey"
 
# Behavior
export GRAPEVINE_AUTO_CONFIRM="true"
export GRAPEVINE_PAGE_SIZE="50"

Configuration File Location

The configuration file is stored at:

  • Linux/macOS: ~/.grapevine/config.json
  • Windows: %USERPROFILE%\.grapevine\config.json

Manual Configuration

You can edit the configuration file directly:

{
  "network": "mainnet",
  "rpc_url": "auto",
  "api_endpoint": "https://api.grapevine.markets",
  "page_size": 20,
  "color_output": true,
  "table_format": "table",
  "auto_confirm": false,
  "auto_update_check": true,
  "cache_enabled": true,
  "cache_ttl": 300,
  "default_price": 0.01,
  "default_tags": "",
  "editor": "vim"
}

Profile Management

Multiple Profiles

# Create development profile
grapevine config set --profile dev network testnet
grapevine config set --profile dev default_price 0.001
 
# Create production profile
grapevine config set --profile prod network mainnet
grapevine config set --profile prod default_price 0.50
 
# Switch profiles
grapevine --profile dev feed list
grapevine --profile prod feed list

Profile Commands

# List all profiles
grapevine config profiles
 
# Create new profile
grapevine config profile create staging
 
# Delete profile
grapevine config profile delete staging

Performance Tuning

Cache Settings

# Increase cache duration for stable data
grapevine config set cache_ttl 3600
 
# Disable cache for real-time data
grapevine config set cache_enabled false
 
# Clear cache manually
grapevine config cache clear

Network Optimization

# Use faster RPC endpoint
grapevine config set rpc_url "https://eth-mainnet.alchemyapi.io/v2/your-key"
 
# Reduce page size for faster loading
grapevine config set page_size 10

Troubleshooting

Invalid Configuration

# Check for configuration errors
grapevine config validate
 
# Reset corrupted config
grapevine config reset --all

Permission Issues

# Fix file permissions
chmod 600 ~/.grapevine/config.json
chown $USER ~/.grapevine/config.json

Migration

# Backup current config
cp ~/.grapevine/config.json ~/.grapevine/config.backup
 
# Migrate from older version
grapevine config migrate

Related Commands

  • auth - Configure authentication
  • info - View current configuration
  • installation - Installation and setup