### Quick Start Boba CLI Source: https://github.com/able-labs-xyz/boba-cli/blob/main/README.md A quick start guide for setting up and launching the Boba CLI. It involves initializing agent credentials, configuring Claude, and then launching the system. ```bash # 1. Set up your agent credentials (from agents.boba.xyz) boba init # 2. Configure Claude Desktop & Claude Code boba install # 3. Launch everything boba launch ``` -------------------------------- ### Launch Everything Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Starts the proxy server in a new terminal window and optionally opens Claude. ```APIDOC ## Launch Everything ### Description Launches the Boba proxy server in a new terminal and opens Claude. ### Method CLI Command ### Endpoint `boba launch` ### Parameters #### Command Flags - `--desktop` - Optional - Opens Claude Desktop instead of Claude Code. - `--iterm` - Optional - Uses iTerm instead of Terminal.app (macOS only). ### Request Example ```bash # Launch proxy and open Claude Code boba launch # Launch proxy and open Claude Desktop boba launch --desktop # Use iTerm instead of Terminal.app boba launch --iterm ``` ### Response #### Success Response - `● Ensuring boba MCP is configured for this directory...` - `✓ MCP installed for myproject` - `● Launching boba proxy...` - `✓ Proxy starting in new terminal window` - `● Opening Claude Code...` - `✓ Claude Code launched in new terminal` #### Response Example ``` ● Ensuring boba MCP is configured for this directory... ✓ MCP installed for myproject ● Launching boba proxy... ✓ Proxy starting in new terminal window ● Opening Claude Code... ✓ Claude Code launched in new terminal ``` ``` -------------------------------- ### Install Boba CLI Source: https://github.com/able-labs-xyz/boba-cli/blob/main/README.md Installs the Boba CLI globally using npm. This command requires Node.js and npm to be installed on your system. ```bash npm install -g @tradeboba/cli ``` -------------------------------- ### Start Proxy Server Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Launches the MCP proxy server, which handles authentication and forwards tool calls from AI agents to the Boba backend. ```APIDOC ## Start Proxy Server ### Description Starts the MCP proxy server for handling AI agent requests. ### Method CLI Command ### Endpoint `boba start` ### Parameters #### Command Flags - `--port` (integer) - Optional - The port to run the proxy server on. Defaults to 3456. ### Request Example ```bash # Start with default port boba start # Start with custom port boba start --port 4000 ``` ### Response #### Success Response - `🧋 BOBA PROXY ACTIVE` - `● Proxy:` (string) - The URL of the running proxy. - `● Agent:` (string) - The name of the agent. - `● EVM:` (string) - The agent's EVM address. - `● Solana:` (string) - The agent's Solana address. - `Press Ctrl+C to stop` #### Response Example ``` 🧋 BOBA PROXY ACTIVE ● Proxy: http://127.0.0.1:3456 ● Agent: MyAgent ● EVM: 0x1234...5678 ● Solana: ABC123...XYZ Press Ctrl+C to stop ``` ``` -------------------------------- ### Boba CLI Commands Source: https://github.com/able-labs-xyz/boba-cli/blob/main/README.md Lists the available commands for the Boba CLI and their descriptions. These commands cover initialization, starting services, configuration, and status checks. ```bash boba init # Set up agent credentials boba start # Start the MCP proxy server boba install # Auto-configure Claude Desktop & Code boba launch # Start proxy + open Claude boba status # Show connection status boba config # View or update configuration boba logout # Clear stored credentials ``` -------------------------------- ### Start Boba Proxy Server with CLI Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Launches the MCP proxy server, which handles authentication and forwards tool calls from AI agents to the Boba backend. Can be started with a default or custom port. ```bash boba start boba start --port 4000 ``` -------------------------------- ### MCP Server JSON-RPC Communication Examples Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Illustrates the JSON-RPC request and response structure for MCP server communication. Covers initialization, listing tools, and calling tools with parameters. ```json // Initialize request {"jsonrpc": "2.0", "id": 1, "method": "initialize"} // Response {"jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2024-11-05", "capabilities": {"tools": {}}, "serverInfo": {"name": "boba", "version": "0.2.0"} }} // List tools {"jsonrpc": "2.0", "id": 2, "method": "tools/list"} // Call tool {"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "get_portfolio", "arguments": {} }} ``` -------------------------------- ### Install MCP Configuration Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Automatically configures Claude Desktop and/or Claude Code to use the Boba MCP server. ```APIDOC ## Install MCP Configuration ### Description Configures Claude Desktop and/or Claude Code to use the Boba MCP server. ### Method CLI Command ### Endpoint `boba install` ### Parameters #### Command Flags - `--desktop-only` - Optional - Install only for Claude Desktop. - `--code-only` - Optional - Install only for Claude Code. - `--global` - Optional - Install globally for Claude Code. - `--project` (string) - Optional - Path to a specific project directory. ### Request Example ```bash # Install for both Claude Desktop and Claude Code boba install # Install only for Claude Desktop boba install --desktop-only # Install globally for Claude Code boba install --global # Install for a specific project directory boba install --project /path/to/project ``` ### Response #### Success Response - `MCP INSTALLATION COMPLETE` - `✓ Claude Desktop` (string) - Installation status for Claude Desktop. - `✓ Claude Code` (string) - Installation status for Claude Code. #### Response Example ``` MCP INSTALLATION COMPLETE ✓ Claude Desktop Installed ✓ Claude Code Installed ``` ``` -------------------------------- ### Install MCP Configuration with Boba CLI Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Automatically configures Claude Desktop and/or Claude Code to use the Boba MCP server. Supports installation for desktop only, code only, globally, or for specific projects. ```bash boba install boba install --desktop-only boba install --code-only boba install --global boba install --project /path/to/project ``` -------------------------------- ### Boba CLI Command Options Source: https://github.com/able-labs-xyz/boba-cli/blob/main/README.md Demonstrates various options available for Boba CLI commands, such as specifying ports, installing specific Claude components, or choosing application launch behavior. ```bash boba start --port 4000 # Custom port boba install --desktop-only # Claude Desktop only boba install --code-only # Claude Code only boba launch --desktop # Open Desktop instead of Code boba launch --iterm # Use iTerm instead of Terminal ``` -------------------------------- ### Launch Boba Proxy and Claude with CLI Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Starts the Boba proxy server in a new terminal window and optionally opens Claude (macOS only). Supports launching Claude Code or Claude Desktop, and using iTerm. ```bash boba launch boba launch --desktop boba launch --iterm ``` -------------------------------- ### Run Boba CLI as MCP Server for Claude Desktop (Bash) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Configures and runs the Boba CLI as an MCP server using JSON-RPC over stdio for direct integration with Claude Desktop. Includes example bash commands and Claude Desktop configuration. ```bash # Run as MCP server (called by Claude Desktop via config) boba mcp # Claude Desktop config (~/.config/claude/claude_desktop_config.json): { "mcpServers": { "boba": { "command": "boba", "args": ["mcp"] } } } ``` -------------------------------- ### Call Boba CLI Trading Tools (Bash) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Demonstrates how to call various trading tools provided by the Boba CLI using cURL. It covers fetching portfolio data, searching tokens, getting swap quotes, and executing swaps. Requires a SESSION_TOKEN for authentication. ```bash # Get portfolio curl -X POST http://127.0.0.1:3456/call \ -H "Authorization: Bearer $SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{"tool": "get_portfolio", "args": {}}' # Response: # { # "total_value_usd": 1234.56, # "pnl_24h": 5.2, # "tokens": [ # {"symbol": "SOL", "balance": "10.5", "value_usd": 1000}, # {"symbol": "USDC", "balance": "234.56", "value_usd": 234.56} # ] # } # Search tokens curl -X POST http://127.0.0.1:3456/call \ -H "Authorization: Bearer $SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{"tool": "search_tokens", "args": {"query": "BONK"}}' # Get swap quote curl -X POST http://127.0.0.1:3456/call \ -H "Authorization: Bearer $SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "tool": "get_swap_price", "args": { "src_token": "SOL", "dst_token": "USDC", "src_amount": "1.0", "src_chain": "solana" } }' # Execute swap (uses auto-filled wallet address) curl -X POST http://127.0.0.1:3456/call \ -H "Authorization: Bearer $SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "tool": "execute_swap", "args": { "src_token": "SOL", "dst_token": "USDC", "src_amount": "0.1", "src_chain": "solana" } }' ``` -------------------------------- ### Manage Boba CLI Authentication Tokens (TypeScript) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Handles the storage and retrieval of authentication tokens, including access and refresh tokens, with their expiry details. Sensitive token values are stored in the keychain, while metadata is kept on disk. Includes functions for setting, getting, checking expiry, and clearing tokens. ```typescript import { config, type AuthTokens } from './config.js'; // Store tokens after authentication const tokens: AuthTokens = { accessToken: 'jwt-access-token', refreshToken: 'refresh-token', accessTokenExpiresAt: '2024-01-15T12:00:00Z', refreshTokenExpiresAt: '2024-02-15T12:00:00Z', agentId: 'agent-id', agentName: 'MyAgent', evmAddress: '0x1234...5678', solanaAddress: 'ABC...XYZ', subOrganizationId: 'sub-org-id' }; await config.setTokens(tokens); // Retrieve tokens (async, reads from keychain) const storedTokens = await config.getTokens(); // Synchronous cache access for hot paths const cachedTokens = config.getTokensSync(); // Check token expiry (returns true if expired or expiring in <1 min) if (config.isTokenExpired()) { // Need to refresh } // Clear tokens await config.clearTokens(); ``` -------------------------------- ### Manage Boba CLI Credentials (TypeScript) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Provides functions for securely managing agent credentials using the operating system's keychain. It allows setting, getting, checking for existence, and clearing credentials. Sensitive data like agent secrets are stored securely. ```typescript import { config } from './config.js'; // Set credentials (secret stored in OS keychain) await config.setCredentials({ agentId: 'your-agent-id', agentSecret: 'your-agent-secret', name: 'MyAgent' }); // Get credentials (retrieves secret from keychain) const creds = await config.getCredentials(); // { agentId: '...', agentSecret: '...', name: 'MyAgent' } // Check if credentials exist (synchronous, checks config only) if (config.hasCredentials()) { console.log('Agent is configured'); } // Clear all credentials from keychain and config await config.clearCredentials(); ``` -------------------------------- ### Initialize Agent Credentials Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Sets up agent credentials from agents.boba.xyz, stores them securely in the OS keychain, and verifies authentication with the Boba backend. ```APIDOC ## Initialize Agent Credentials ### Description Initializes agent credentials, storing them securely and verifying with the Boba backend. ### Method CLI Command ### Endpoint `boba init` ### Parameters #### Command Flags - `--agent-id` (string) - Optional - Your agent ID. - `--secret` (string) - Optional - Your agent secret. - `--name` (string) - Optional - A name for your agent. ### Request Example ```bash # Interactive mode boba init # Non-interactive mode boba init --agent-id "your-agent-id" --secret "your-agent-secret" --name "MyAgent" ``` ### Response #### Success Response - `✓ Credentials verified!` - `Agent:` (string) - The name of the agent. - `ID:` (string) - The agent's unique identifier. - `EVM:` (string) - The agent's EVM address. - `Solana:` (string) - The agent's Solana address. #### Response Example ``` ✓ Credentials verified! Agent: MyAgent ID: abc12345... EVM: 0x1234...5678 Solana: ABC123...XYZ ``` ``` -------------------------------- ### Proxy Server API - List Available Tools Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Returns the list of trading tools available from the MCP backend. Requires session token authentication. ```APIDOC ## Proxy Server API - List Available Tools ### Description Retrieves a list of trading tools available through the MCP backend. Requires authentication. ### Method GET ### Endpoint `/tools` ### Parameters #### Headers - `Authorization` (string) - Required - Bearer token for authentication (e.g., `Bearer $SESSION_TOKEN`). ### Request Example ```bash curl -H "Authorization: Bearer $SESSION_TOKEN" \ http://127.0.0.1:3456/tools ``` ### Response #### Success Response (200) - The response body will contain a list of available tools. The exact structure depends on the backend implementation. #### Response Example ```json { "tools": [ { "name": "get_portfolio", "description": "Get the user's current portfolio." }, { "name": "search_tokens", "description": "Search for available trading tokens." }, { "name": "execute_swap", "description": "Execute a token swap." } ] } ``` ``` -------------------------------- ### Initialize Agent Credentials with Boba CLI Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Sets up agent credentials from agents.boba.xyz, storing them securely in the OS keychain and verifying with the Boba backend. Supports interactive and non-interactive modes. ```bash boba init boba init --agent-id "your-agent-id" --secret "your-agent-secret" --name "MyAgent" ``` -------------------------------- ### List Boba Trading Tools via API Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Retrieves the list of available trading tools from the Boba MCP backend. Requires session token authentication. ```bash curl -H "Authorization: Bearer $SESSION_TOKEN" \ http://127.0.0.1:3456/tools ``` -------------------------------- ### Configuration Module - URL and Port Configuration Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Configure network endpoints and ports, with URL allowlisting for security. ```APIDOC ## Configuration Module - URL and Port Configuration ### Description Manages the configuration of critical network endpoints like MCP and Authentication URLs, as well as the proxy port. Includes URL allowlisting to enhance security. ### Methods #### `getMcpUrl(): string` - **Description**: Retrieves the configured MCP (Main Control Plane) URL. - **Returns**: `string` - The MCP URL. #### `setMcpUrl(url: string, force: boolean = false): void` - **Description**: Sets the MCP URL. If `force` is `false`, the URL is validated against an allowlist. - **Parameters**: - `url` (string) - Required - The MCP URL to set. - `force` (boolean) - Optional - If `true`, bypasses the allowlist validation. #### `getAuthUrl(): string` - **Description**: Retrieves the configured Authentication service URL. - **Returns**: `string` - The Authentication URL. #### `setAuthUrl(url: string, force: boolean = false): void` - **Description**: Sets the Authentication service URL. If `force` is `false`, the URL is validated against an allowlist. - **Parameters**: - `url` (string) - Required - The Authentication URL to set. - `force` (boolean) - Optional - If `true`, bypasses the allowlist validation. #### `getProxyPort(): number` - **Description**: Retrieves the configured proxy port. - **Returns**: `number` - The proxy port number. #### `setProxyPort(port: number): void` - **Description**: Sets the proxy port. - **Parameters**: - `port` (number) - Required - The port number to set. #### `getAll(): object` - **Description**: Retrieves all current configuration settings, including URLs, port, log level, credentials, and tokens. - **Returns**: `object` - An object containing all configuration parameters. #### `getConfigPath(): string` - **Description**: Returns the file path where the configuration is stored. - **Returns**: `string` - The configuration file path. #### `reset(): void` - **Description**: Resets all configuration settings to their default values. ### Request Example (Setting URLs and Port) ```typescript import { config } from './config.js'; // Set MCP URL, bypassing allowlist config.setMcpUrl('https://localhost:8080', true); // Set Auth URL config.setAuthUrl('https://custom-auth.example.com'); // Set proxy port config.setProxyPort(4000); ``` ### Response Example (Getting All Config) ```json { "mcpUrl": "https://mcp-skunk.up.railway.app", "authUrl": "https://krakend-skunk.up.railway.app/v2", "proxyPort": 3456, "logLevel": "info", "credentials": { "agentId": "...", "name": "MyAgent" }, "tokens": { "accessToken": "..." } } ``` ``` -------------------------------- ### View or Update Configuration Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Displays current configuration settings or updates them, such as MCP URL, auth URL, and proxy port. ```APIDOC ## View or Update Configuration ### Description Manages Boba CLI configuration settings. ### Method CLI Command ### Endpoint `boba config` ### Parameters #### Command Flags - `--mcp-url` (string) - Optional - Set a custom MCP server URL. - `--auth-url` (string) - Optional - Set a custom authentication server URL. - `--port` (integer) - Optional - Set the default proxy port. - `--force` - Optional - Force override URL allowlist (for development). - `--reset` - Optional - Reset all configuration to defaults. ### Request Example ```bash # View current configuration boba config # Set custom MCP server URL boba config --mcp-url https://mcp-skunk.up.railway.app # Set custom auth server URL boba config --auth-url https://krakend-skunk.up.railway.app/v2 # Set default proxy port boba config --port 4000 # Force override URL allowlist boba config --mcp-url https://localhost:8080 --force # Reset all configuration to defaults boba config --reset ``` ### Response #### Success Response - Displays current configuration or confirmation of updates. #### Response Example (Viewing config) ``` MCP: https://mcp-skunk.up.railway.app Auth URL: https://krakend-skunk.up.railway.app/v2 Proxy Port: 3456 ``` ``` -------------------------------- ### Call a Tool Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt The main endpoint for executing trading tools. The proxy automatically injects user_id, wallet addresses, and handles authentication. ```APIDOC ## POST /call ### Description This endpoint allows you to execute various trading tools provided by the agent. The proxy handles authentication and injects necessary user context. ### Method POST ### Endpoint `/call` ### Parameters #### Request Body - **tool** (string) - Required - The name of the tool to execute (e.g., `get_portfolio`, `get_swap_price`, `execute_swap`). - **args** (object) - Required - An object containing the arguments for the specified tool. ### Request Example ```json { "tool": "get_portfolio", "args": {} } ``` ### Response #### Success Response (200) - **tool_output** (any) - The output from the executed tool. The structure depends on the tool called. #### Response Example (for `get_portfolio`) ```json { "total_value_usd": 1234.56, "pnl_24h": 5.2, "tokens": [ {"symbol": "SOL", "balance": "10.5", "value_usd": 1000}, {"symbol": "USDC", "balance": "234.56", "value_usd": 234.56} ] } ``` ``` -------------------------------- ### Format Trading Data for Terminal Display (TypeScript) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Provides functions to format various trading data for rich terminal output. This includes portfolio summaries with visual charts, token search results in a table format, and detailed token information with security audit results. ```typescript import { formatPortfolio, formatTokenSearch, formatTokenInfo } from './formatter.js'; // Format portfolio with visual charts and allocation bars const portfolioData = { total_value_usd: 5000, pnl_24h: 3.5, tokens: [ { symbol: 'SOL', value_usd: 3000, balance: 30, pnl_24h: 5 }, { symbol: 'USDC', value_usd: 2000, balance: 2000, pnl_24h: 0 } ] }; console.log(formatPortfolio(portfolioData)); // Outputs styled box with holdings, allocation bars, and PnL indicators // Format token search results as table const searchResults = { tokens: [ { symbol: 'BONK', price_usd: 0.00001, market_cap: 500000000, volume_24h: 10000000 } ] }; console.log(formatTokenSearch(searchResults)); // Format detailed token info with security audit const tokenInfo = { name: 'Bonk', symbol: 'BONK', price_usd: 0.00001, market_cap: 500000000, liquidity: 10000000, holders: 500000, address: 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263', audit: { is_honeypot: false, is_mintable: false, buy_tax: 0, sell_tax: 0 } }; console.log(formatTokenInfo(tokenInfo)); ``` -------------------------------- ### Visualize Price and PnL Charts in Terminal (TypeScript) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Enables the display of price and PnL charts within the terminal using ASCII art. It includes functions for formatting PnL sparklines, token OHLC charts, swap quotes, and trade execution results. ```typescript import { formatPnLChart, formatTokenChart, formatSwapQuote, formatTradeResult } from './formatter.js'; // Format PnL chart with sparkline const pnlData = { chart: [ { value: 4800 }, { value: 4900 }, { value: 5100 }, { value: 5000 } ] }; console.log(formatPnLChart(pnlData)); // Format token OHLC chart const ohlcData = { symbol: 'SOL', timeframe: '1h', candles: [ { close: 100 }, { close: 102 }, { close: 101 }, { close: 105 } ] }; console.log(formatTokenChart(ohlcData)); // Format swap quote const quote = { src_amount: 1.0, dst_amount: 99.5, src_token: { symbol: 'SOL' }, dst_token: { symbol: 'USDC' }, price_impact: 0.5, gas_estimate: 0.001 }; console.log(formatSwapQuote(quote)); // Format trade execution result const tradeResult = { success: true, tx_hash: '5xK9Fn...abc123', amount_in: 1.0, amount_out: 99.5 }; console.log(formatTradeResult(tradeResult)); ``` -------------------------------- ### Configuration Module - Token Management Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Manage authentication tokens, storing sensitive data in the keychain. ```APIDOC ## Configuration Module - Token Management ### Description Handles the storage and retrieval of authentication tokens, including access and refresh tokens, with sensitive values secured in the OS keychain. ### Types ```typescript type AuthTokens = { accessToken: string; refreshToken: string; accessTokenExpiresAt: string; refreshTokenExpiresAt: string; agentId: string; agentName: string; evmAddress: string; solanaAddress: string; subOrganizationId: string; }; ``` ### Methods #### `setTokens(tokens: AuthTokens): Promise` - **Description**: Stores the provided authentication tokens. Sensitive token data is stored in the OS keychain. - **Parameters**: - `tokens` (AuthTokens) - Required - The authentication tokens object to store. - **Returns**: `Promise` #### `getTokens(): Promise` - **Description**: Asynchronously retrieves authentication tokens, reading sensitive data from the keychain. - **Returns**: `Promise` resolving to the `AuthTokens` object or `undefined` if not found. #### `getTokensSync(): AuthTokens | undefined` - **Description**: Synchronously retrieves authentication tokens from a local cache for quick access. - **Returns**: `AuthTokens | undefined` - The cached tokens or `undefined`. #### `isTokenExpired(): boolean` - **Description**: Checks if the current access token is expired or expiring within the next minute. - **Returns**: `boolean` - `true` if the token is expired or expiring soon, `false` otherwise. #### `clearTokens(): Promise` - **Description**: Clears all stored authentication tokens. - **Returns**: `Promise` ### Request Example (Setting Tokens) ```typescript import { config, type AuthTokens } from './config.js'; const tokens: AuthTokens = { accessToken: 'jwt-access-token', refreshToken: 'refresh-token', accessTokenExpiresAt: '2024-01-15T12:00:00Z', refreshTokenExpiresAt: '2024-02-15T12:00:00Z', agentId: 'agent-id', agentName: 'MyAgent', evmAddress: '0x1234...5678', solanaAddress: 'ABC...XYZ', subOrganizationId: 'sub-org-id' }; await config.setTokens(tokens); ``` ### Response Example (Getting Tokens) ```json { "accessToken": "jwt-access-token", "refreshToken": "refresh-token", "accessTokenExpiresAt": "2024-01-15T12:00:00Z", "refreshTokenExpiresAt": "2024-02-15T12:00:00Z", "agentId": "agent-id", "agentName": "MyAgent", "evmAddress": "0x1234...5678", "solanaAddress": "ABC...XYZ", "subOrganizationId": "sub-org-id" } ``` ``` -------------------------------- ### View or Update Boba CLI Configuration Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Allows viewing the current configuration or updating settings such as the MCP URL, authentication URL, and proxy port. Supports resetting to defaults and forcing URL overrides. ```bash boba config boba config --mcp-url https://mcp-skunk.up.railway.app boba config --auth-url https://krakend-skunk.up.railway.app/v2 boba config --port 4000 boba config --mcp-url https://localhost:8080 --force boba config --reset ``` -------------------------------- ### Upgrade Boba CLI to v0.2.0 Source: https://github.com/able-labs-xyz/boba-cli/blob/main/README.md Instructions for upgrading the Boba CLI to version 0.2.0. This version moves credentials to the OS Keychain, requiring re-initialization after updating. ```bash npm install -g @tradeboba/cli boba init ``` -------------------------------- ### Check Boba Connection Status with CLI Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Displays the current connection status of the Boba agent, including credentials, token validity, agent details, and configuration settings. ```bash boba status ``` -------------------------------- ### Configure Boba CLI URLs and Ports (TypeScript) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Manages network configuration settings for the Boba CLI, including the Main Control Plane (MCP) URL, Authentication URL, and proxy port. It enforces URL allowlisting to prevent credential exfiltration, with an option to bypass this validation using a force flag. ```typescript import { config } from './config.js'; // Get/set MCP URL (validates against allowlist) const mcpUrl = config.getMcpUrl(); // 'https://mcp-skunk.up.railway.app' config.setMcpUrl('https://localhost:8080', true); // force=true bypasses allowlist // Get/set Auth URL const authUrl = config.getAuthUrl(); // 'https://krakend-skunk.up.railway.app/v2' config.setAuthUrl('https://custom-auth.example.com', true); // Get/set proxy port const port = config.getProxyPort(); // 3456 config.setProxyPort(4000); // Get all config const allConfig = config.getAll(); // { mcpUrl, authUrl, proxyPort, logLevel, credentials, tokens } // Get config file path const configPath = config.getConfigPath(); // ~/.config/boba-cli/config.json // Reset to defaults config.reset(); ``` -------------------------------- ### Configuration Module - Credential Management Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Manage agent credentials securely using the OS keychain. ```APIDOC ## Configuration Module - Credential Management ### Description Provides functions to set, get, check, and clear agent credentials, which are securely stored in the operating system's keychain. ### Methods #### `setCredentials(credentials: { agentId: string, agentSecret: string, name: string })` - **Description**: Sets and stores agent credentials. The `agentSecret` is stored in the OS keychain. - **Parameters**: - `agentId` (string) - Required - The agent's unique identifier. - `agentSecret` (string) - Required - The agent's secret key. - `name` (string) - Required - The name of the agent. - **Returns**: `Promise` #### `getCredentials(): Promise<{ agentId: string, agentSecret: string, name: string }>` - **Description**: Retrieves agent credentials from storage. Returns the secret stored in the keychain. - **Returns**: `Promise` resolving to an object containing `agentId`, `agentSecret`, and `name`. #### `hasCredentials(): boolean` - **Description**: Synchronously checks if credentials exist in the configuration. - **Returns**: `boolean` - `true` if credentials are found, `false` otherwise. #### `clearCredentials(): Promise` - **Description**: Clears all stored credentials from the keychain and configuration. - **Returns**: `Promise` ### Request Example (Setting Credentials) ```typescript import { config } from './config.js'; await config.setCredentials({ agentId: 'your-agent-id', agentSecret: 'your-agent-secret', name: 'MyAgent' }); ``` ### Response Example (Getting Credentials) ```json { "agentId": "your-agent-id", "agentSecret": "your-agent-secret", "name": "MyAgent" } ``` ``` -------------------------------- ### Test Authentication Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Tests authentication and refreshes tokens, useful for debugging. ```APIDOC ## Test Authentication ### Description Tests the authentication process and refreshes tokens. ### Method CLI Command ### Endpoint `boba auth` ### Parameters None ### Request Example ```bash boba auth ``` ### Response #### Success Response - `✓ Authentication successful!` - `Agent:` (string) - The name of the agent. - `Agent ID:` (string) - The agent's unique identifier. - `EVM:` (string) - The agent's EVM address. - `Expires:` (string) - The expiration time of the token. #### Response Example ``` ✓ Authentication successful! Agent: MyAgent Agent ID: abc12345-... EVM: 0x1234...5678 Expires: 2024-01-15T12:00:00Z ``` ``` -------------------------------- ### Check Connection Status Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Displays the current connection status, including credentials, token validity, and configuration. ```APIDOC ## Check Connection Status ### Description Displays the current status of the Boba connection, including credentials and configuration. ### Method CLI Command ### Endpoint `boba status` ### Parameters None ### Request Example ```bash boba status ``` ### Response #### Success Response - `BOBA CONNECTION STATUS` - `Credentials:` (string) - Status of credentials (e.g., Configured). - `Agent ID:` (string) - The agent's unique identifier. - `Token:` (string) - Status of the authentication token (e.g., Valid). - `Agent:` (string) - The name of the agent. - `EVM:` (string) - The agent's EVM address. - `Solana:` (string) - The agent's Solana address. - `CONFIGURATION` - `MCP:` (string) - The MCP server URL. - `Proxy Port:` (integer) - The port the proxy server is running on. #### Response Example ``` BOBA CONNECTION STATUS Credentials: Configured Agent ID: abc12345... Token: Valid Agent: MyAgent EVM: 0x1234...5678 Solana: ABC123...XYZ CONFIGURATION MCP: mcp-skunk.up.railway.app Proxy Port: 3456 ``` ``` -------------------------------- ### Test Boba Agent Authentication with CLI Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Tests the agent's authentication with the Boba backend and refreshes tokens, which is useful for debugging connection issues. ```bash boba auth ``` -------------------------------- ### Authenticate and Manage Tokens with Boba Backend (TypeScript) Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Handles JWT authentication and token refresh with the Boba backend. It includes functions for initial authentication, refreshing expired tokens, ensuring valid authentication, and retrieving the access token. ```typescript import { authenticate, refreshTokens, ensureAuthenticated, getAccessToken } from './auth.js'; // Initial authentication (uses stored credentials) const tokens = await authenticate(); if (tokens) { console.log(`Authenticated as ${tokens.agentName}`); console.log(`EVM: ${tokens.evmAddress}`); console.log(`Solana: ${tokens.solanaAddress}`); } // Refresh expired access token const refreshed = await refreshTokens(); // Ensure valid authentication (auto-refreshes if needed) const validTokens = await ensureAuthenticated(); // Get just the access token for API calls const accessToken = await getAccessToken(); ``` -------------------------------- ### Logout Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Clears all stored agent credentials from the OS keychain. ```APIDOC ## Logout ### Description Logs out the agent by clearing stored credentials from the OS keychain. ### Method CLI Command ### Endpoint `boba logout` ### Parameters None ### Request Example ```bash boba logout ``` ### Response #### Success Response - `✓ Logged out. Credentials cleared from keychain.` #### Response Example ``` ✓ Logged out. Credentials cleared from keychain. ``` ``` -------------------------------- ### Logout from Boba CLI Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Clears all stored agent credentials from the operating system's keychain, effectively logging out the agent. ```bash boba logout ``` -------------------------------- ### Proxy Server API - Health Check Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt The health endpoint returns the proxy status and is the only unauthenticated endpoint. ```APIDOC ## Proxy Server API - Health Check ### Description Checks the health status of the Boba proxy server. This is an unauthenticated endpoint. ### Method GET ### Endpoint `/health` ### Parameters None ### Request Example ```bash curl http://127.0.0.1:3456/health ``` ### Response #### Success Response (200) - `status` (string) - The health status of the proxy (e.g., "ok"). - `agent` (string) - The name of the agent connected to the proxy. - `agentId` (string) - The unique identifier of the agent. - `requests` (integer) - The number of requests processed by the proxy. #### Response Example ```json { "status": "ok", "agent": "MyAgent", "agentId": "abc12345", "requests": 42 } ``` ``` -------------------------------- ### Health Check Boba Proxy API Source: https://context7.com/able-labs-xyz/boba-cli/llms.txt Performs a health check on the Boba proxy server. This is the only unauthenticated endpoint and returns the proxy status. ```bash curl http://127.0.0.1:3456/health ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.