auth
Configure authentication credentials for the Grapevine CLI to interact with your wallet and create content.
Commands
login
Configure authentication with your private key and network settings.
grapevine auth login [options]Options
--key, -k
- Type:
string - Required: Yes
Set your private key for authentication.
grapevine auth login --key "0xYourPrivateKeyHere"--network, -n
- Type:
string - Default:
testnet - Options:
testnet,mainnet
Set the blockchain network to use.
grapevine auth login --key "0x..." --network testnetstatus
Display current authentication status and wallet information.
grapevine auth statusShows:
- Current wallet address
- Network configuration
- API endpoint being used
- Basic wallet statistics
logout
Remove all stored authentication data.
grapevine auth logoutExamples
Initial Setup
# Set up authentication with private key for testnet
grapevine auth login --key "0xYourPrivateKeyHere" --network testnetMainnet Setup
# Configure for mainnet (production)
grapevine auth login --key "0x..." --network mainnetCheck Status
# View current authentication status
grapevine auth statusReset Authentication
# Clear all saved credentials
grapevine auth logoutOutput
Successful Login
grapevine auth login --key "0x..." --network testnetđ Configuring Grapevine CLI Authentication
â
Private key configured
â
Network set to: testnet
â
Wallet address: 0x1234567890abcdef1234567890abcdef12345678
â
Configuration saved to: ~/.grapevine/config.json
đ° Wallet Status:
ETH Balance: 0.45 ETH
USDC Balance: 127.50 USDC
đ Authentication setup complete!
You can now create feeds and add entries.
Next steps:
âĸ Create your first feed: grapevine feed create "My Blog"
âĸ List categories: grapevine categories
âĸ View CLI info: grapevine infoAuthentication Status
grapevine auth statusđ Grapevine CLI Authentication Status
â
Authenticated
Wallet: 0x1234567890abcdef1234567890abcdef12345678
Network: testnet
API: https://api.grapevine.markets
đ° Wallet Balances:
ETH: 0.45 ETH
USDC: 127.50 USDC
đ Account Stats:
Feeds Created: 3
Entries Published: 47
Total Revenue: $23.75 USDC
đ Last Activity: 2 hours agoLogout
grapevine auth logoutđ Clearing Grapevine CLI Authentication
â
Authentication data cleared
â
Configuration file updated
âšī¸ You'll need to run 'grapevine auth login' to authenticate again.Security Methods
Environment Variable (Recommended)
# Set environment variable
export PRIVATE_KEY="0xYourPrivateKeyHere"
# Use CLI without --key flag
grapevine feed create "My Blog"Command Line Flag
# Pass key directly (less secure)
grapevine --key "0xYourPrivateKeyHere" feed create "My Blog"Configuration File
# Store in config file
grapevine auth login --key "0xYourPrivateKeyHere" --network testnet
# Use CLI without specifying key
grapevine feed create "My Blog"Security Best Practices
Private Key Safety
- Never Share: Never share your private key with anyone
- Secure Storage: Use environment variables or secure config files
- Regular Rotation: Consider rotating keys periodically
- Backup: Keep secure backups of your private key
Environment Setup
# Add to your shell profile (.bashrc, .zshrc, etc.)
export PRIVATE_KEY="0xYourPrivateKeyHere"
# Reload your shell
source ~/.zshrc
# Verify it works
grapevine auth statusTest Account Setup
For development and testing:
# Use testnet for development
grapevine auth login --key "0xTestPrivateKey" --network testnet
# Get testnet funds from faucet
# https://www.alchemy.com/faucets/base-sepoliaNetwork Configuration
Mainnet (Production)
grapevine auth login --key "0x..." --network mainnet
# Uses real ETH and USDC on BaseTestnet (Development)
grapevine auth login --key "0x..." --network testnet
# Uses test tokens on Base Sepolia, safe for developmentTroubleshooting
Invalid Private Key
â Error: Invalid private key format
Expected: 64-character hexadecimal string starting with '0x'
Example: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdefNetwork Connection Issues
# Check current authentication status
grapevine auth status
# Try switching networks
grapevine auth login --key "0x..." --network testnetInsufficient Funds
â ī¸ Warning: Low wallet balance
ETH: 0.001 ETH (need ~0.01 ETH for gas)
USDC: 0.00 USDC (need USDC for payments)
Please fund your wallet before creating content.Configuration File
The authentication data is stored in ~/.grapevine/config.json:
{
"network": "testnet",
"apiUrl": "https://api.grapevine.markets",
"walletAddress": "0x1234...5678",
"encryptedPrivateKey": "encrypted-key-data"
}Note: Private keys are encrypted before storage for security.
Related Commands
- info - View system and authentication status
- configuration - Manage CLI settings
- feed create - Create your first feed (requires auth)