ChainBrain Framework CLI v2
Quickstart guide to the OnChainBrain Framework CLI v2
Overview
The OnChainBrain V2 Framework CLI is our premium solution designed for developers, traders, and analysts looking for advanced blockchain intelligence tools. Built on the existing OnChainBrain ecosystem, V2 expands capabilities with enhanced analytics, real-time data processing, and optimized agent interaction workflows.
✨ Core Features
Advanced Blockchain Integration: Seamlessly interact with Solana, Ethereum, and Binance Smart Chain.
AI-Driven Agent Communication: Deploy and manage intelligent agents with enhanced reasoning capabilities.
Live Data Analytics: Access and analyze real-time blockchain statistics.
Market Behavior Insights: Monitor whale movements, token velocity, and on-chain liquidity.
Automated Smart Contract Interaction: Execute and track transactions via AI-powered commands.
Data Provider Expansion: Direct integration with Bitquery, The Graph, and Chainlink for real-time blockchain data.
💡 Technical Capabilities
Asset Intelligence: Extract token data, liquidity metrics, and price movements.
Trading Strategy Optimization: Generate AI-driven trading strategies and execute limit orders via CLI.
Cross-Chain Analytics: Monitor transactions across multiple blockchains.
High-Speed Query Processing: Optimized for performance using parallelized data retrieval.
DeFi & NFT Insights: Track protocol activity and NFT collection trends.
✨ Unlock Advanced AI Agent Interactions
With OnChainBrain V2, users gain access to an upgraded set of intelligent AI agents directly within the CLI. These agents provide:
Enhanced reasoning and problem-solving capabilities.
Deep blockchain insights, combining real-time data with AI-driven analysis.
Personalized agent responses based on advanced models.
Supported Advanced AI Agents
To unlock interaction with more advanced AI agents, API key holders will gain access to:
Deepseek R1 – Cutting-edge AI designed for high-level blockchain intelligence.
Luma – A data-driven agent providing advanced analytics and strategic insights.
Meta AI – A next-generation AI for real-time market predictions and pattern recognition.
For API key access, users should contact support@onbrainchain.xyz for additional information and activation.
🔧 Setup Guide
System Requirements
Node.js version 18 or higher
Package manager (npm/yarn)
API keys for Bitquery, The Graph, OpenAI
Additional requirements listed in
.env.example
Installation
Clone the repository:
git clone https://github.com/onchainbrain/onchainbrain-fw-v2.git cd onchainbrain-fw-v2
Install dependencies:
npm install
Set up environment variables: Create a
.env
file with:PRIVATE_KEYPAIR=<YOUR_SOLANA_KEYPAIR> OPENAI_API_KEY=<YOUR_OPENAI_KEY> RPC_ENDPOINT=https://api.mainnet-beta.solana.com BITQUERY_API_KEY=<YOUR_BITQUERY_KEY> DEEPSEEK_API_KEY=<YOUR_DEEPSEEK_R1_KEY> LUMA_API_KEY=<YOUR_LUMA_KEY> META_AI_API_KEY=<YOUR_META_AI_KEY>
Compile the framework:
npm run build
📋 Framework Commands
Agent Interaction
npm run interact-ocb-agent {agent_name} ask "Your question"
Example:
npm run interact-ocb-agent Aura ask "Trending token 24h"
Advanced Market Analysis
Mempool Transaction Analyzer
npm run mempool-analyze --token [TOKEN_SYMBOL]
Example:
npm run mempool-analyze --token ETH
Comprehensive Address Profiling
npm run address-profile --address [WALLET_ADDRESS]
Example:
npm run address-profile --address 0xABC123...
Smart Contract Interaction Tracker
npm run contract-interactions --contract [CONTRACT_ADDRESS]
Example:
npm run contract-interactions --contract 0xDEF456...
Token Flow Visualization
npm run token-flow --token [TOKEN_SYMBOL] --start [START_DATE] --end [END_DATE]
Example:
npm run token-flow --token BTC --start 2025-01-01 --end 2025-01-31
DEX Arbitrage Opportunities
npm run dex-arbitrage --token [TOKEN_SYMBOL]
Example:
npm run dex-arbitrage --token UNI
Gas Fee Trend Analyzer
npm run gas-trend --period [TIME_PERIOD]
Example:
npm run gas-trend --period 7d
NFT Collection Performance Monitor
npm run nft-monitor --collection [COLLECTION_NAME]
Example:
npm run nft-monitor --collection CryptoKitties
Cross-Chain Asset Tracker
npm run cross-chain-track --asset [ASSET_NAME]
Example:
npm run cross-chain-track --asset USDT
Whale Alert System
npm run whale-alert --token [TOKEN_SYMBOL] --threshold [AMOUNT]
Example:
npm run whale-alert --token ADA --threshold 1000000
DeFi Protocol Risk Analyzer
npm run defi-risk --protocol [PROTOCOL_NAME]
Example:
npm run defi-risk --protocol Aave
📚 Technology Stack
Core Dependencies
Package
Version
Purpose
@solana/web3.js
^1.98.0
Solana blockchain connectivity
dotenv
^16.4.7
Environment configuration
firebase
^11.1.0
Data persistence and management
node-fetch
^3.3.2
Network request handling
openai
^4.77.3
AI processing capabilities
bs58
^6.0.0
Address encoding utilities
form-data
^4.0.1
Data structure handling
punycode
^2.3.1
Unicode processing
🛠️ Running the OnChainBrain V2 Framework
Ensure dependencies are installed using:
npm install
Set up environment variables via the
.env
file.Build the project:
npm run build
Run an agent query:
npm run interact-ocb-agent {agent_name} ask "Your question"
Execute advanced market analytics using the newly added commands.
Last updated