| Crates.io | osvm |
| lib.rs | osvm |
| version | 0.8.3 |
| created_at | 2025-06-26 23:27:09.214275+00 |
| updated_at | 2025-09-29 17:57:54.473879+00 |
| description | OpenSVM CLI tool for managing SVM nodes and deployments |
| homepage | https://github.com/openSVM/osvm-cli |
| repository | https://github.com/openSVM/osvm-cli |
| max_upload_size | |
| id | 1727985 |
| size | 3,294,610 |
A powerful command-line interface for managing Solana Virtual Machines (SVMs) across networks. Deploy, monitor, and manage SVM infrastructure with AI assistance, MCP server integration, and extensible plugin architecture.
One-line install:
curl -sSf https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.sh | sh
Alternative methods:
Windows:
powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.ps1' -OutFile 'install.ps1'; .\install.ps1"
Docker:
docker pull ghcr.io/opensvm/osvm-cli:latest
docker run --rm ghcr.io/opensvm/osvm-cli:latest --version
From Source:
git clone https://github.com/opensvm/osvm-cli.git
cd osvm-cli && cargo build --release
sudo cp target/release/osvm /usr/local/bin/
# Check installation
osvm --version
# List available SVMs
osvm svm list
# Get help and examples
osvm examples
# Launch interactive dashboard
osvm svm dashboard
# Get help and examples
osvm examples
osvm examples --category svm
# Check system health
osvm doctor
osvm doctor --fix
# Get wallet balance
osvm balance [ADDRESS]
# List all SVMs
osvm svm list
# Get SVM details
osvm svm get sonic
# Interactive SVM dashboard
osvm svm dashboard
# Ask AI questions
osvm "How do I deploy a validator?"
osvm "What are Solana security best practices?"
osvm "Explain this error message: [paste error]"
# List all available SVMs
osvm svm list
# Get detailed information about a specific SVM
osvm svm get sonic
osvm svm get solana
osvm svm get eclipse
# Launch comprehensive SVM monitoring dashboard
osvm svm dashboard
Dashboard Features:
Keyboard Controls:
Tab, →, ←: Switch between tabs↑, ↓: Navigate through itemsn/p: Select next/previous SVMv: Toggle verbosity levelh: Toggle help overlayq or Ctrl+C: Quit# Deploy validator node (mainnet)
osvm user@host --svm sonic --node-type validator --network mainnet
# Deploy RPC node (testnet)
osvm user@host --svm sonic --node-type rpc --network testnet
# Deploy to devnet for testing
osvm user@host --svm solana --node-type validator --network devnet
# Deploy multiple SVMs to a single server
osvm user@host --svm sonic,solana,eclipse,soon --node-type validator --network devnet
# List deployed nodes
osvm nodes list
# Check node status
osvm nodes status NODE-ID
# View node logs
osvm nodes logs NODE-ID
osvm nodes logs NODE-ID --follow
# Control node operations
osvm nodes restart NODE-ID
osvm nodes stop NODE-ID
# Deploy Sonic RPC node
osvm rpc sonic user@host --network mainnet
# Deploy with specific configuration
osvm rpc sonic user@host --network testnet --version latest
# Start local test validator (instant setup)
osvm rpc-manager test --background --reset
# Check test validator status
osvm rpc-manager test --status
# Stop test validator
osvm rpc-manager test --stop
# Monitor RPC logs
osvm rpc-manager devnet --logs
osvm rpc-manager devnet --logs --follow --lines 100
# Query Solana network
osvm rpc-manager query-solana --info
osvm rpc-manager query-solana --health
RPC Features:
# Deploy to all networks
osvm deploy ./program.so \
--program-id ./program-id.json \
--owner ./owner-keypair.json \
--fee ./fee-payer.json \
--publish-idl
# Deploy to specific network
osvm deploy ./program.so \
--program-id ./program-id.json \
--owner ./owner-keypair.json \
--fee ./fee-payer.json \
--network mainnet
# Deploy with custom IDL
osvm deploy ./program.so \
--program-id ./program-id.json \
--owner ./owner-keypair.json \
--fee ./fee-payer.json \
--publish-idl \
--idl-file ./custom-idl.json
Keypair files (for new deployments):
[123,45,67,89,...,234] // Array of 64 bytes
Pubkey-only files (for upgrades):
{"programId": "HN4tEEGheziD9dqcWg4xZd29htcerjXKGoGiQXM5hxiS"}
Required files:
# Set up OpenAI
export OPENAI_URL="https://api.openai.com/v1/chat/completions"
export OPENAI_KEY="sk-your-openai-api-key"
# Use local AI (Ollama)
export OPENAI_URL="http://localhost:11434/v1/chat/completions"
export OPENAI_KEY="ollama-key"
# General blockchain questions
osvm "What are the best practices for Solana smart contract security?"
# Deployment guidance
osvm "Help me optimize my validator performance"
# Error analysis
osvm "Analyze this smart contract for vulnerabilities"
# Audit local code
osvm audit
# Audit GitHub repository
osvm audit https://github.com/user/solana-program
# Audit with specific output format
osvm audit ./contracts --format json --output ./audit-report.json
AI Features:
Model Context Protocol (MCP) integration provides specialized blockchain data access and external service connections.
# Quick setup with Solana MCP server
osvm mcp setup --auto-enable
# List configured servers
osvm mcp list
# Test connectivity
osvm mcp test solana-server
From GitHub:
# Add official Solana MCP server
osvm mcp add-github solana-mcp https://github.com/openSVM/solana-mcp-server --enabled
# Add custom server
osvm mcp add-github my-server https://github.com/user/custom-mcp-server --enabled
Manual Configuration:
# HTTP server with authentication
osvm mcp add blockchain-data \
--server-url https://api.blockchain-mcp.com \
--transport http \
--auth-type bearer \
--auth-token your-token \
--enabled
# WebSocket server
osvm mcp add realtime-data \
--server-url wss://ws.realtime-mcp.com \
--transport websocket \
--auth-type api_key \
--auth-token your-key \
--enabled
# List available tools
osvm mcp tools
osvm mcp tools solana-server
# Execute blockchain queries
osvm mcp call solana-server getBalance \
--args '{"pubkey":"11111111111111111111111111111112"}'
# Chain operations
osvm mcp call solana-server getStakeAccounts \
--args '{"staker":"Your-Address"}' | \
osvm mcp call solana-server getStakeRewards \
--args '{"accounts":"@stdin"}'
# Enable/disable servers
osvm mcp enable solana-server
osvm mcp disable old-server
# Remove server
osvm mcp remove unused-server
# Search servers
osvm mcp search "solana balance"
Bearer Token:
osvm mcp add api-server \
--server-url https://api.example.com \
--auth-type bearer \
--auth-token "Bearer eyJ0eXAiOiJKV1Q..."
API Key:
osvm mcp add data-server \
--server-url https://data.example.com \
--auth-type api_key \
--auth-token "your-api-key"
Basic Auth:
osvm mcp add secure-server \
--server-url https://secure.example.com \
--auth-type basic \
--username your-username \
--password your-password
OSVM's plugin architecture allows extending functionality with custom commands, tools, themes, and integrations.
# List installed plugins
osvm plugins list
# Install from directory
osvm plugins install ./my-plugin/
# Install from GitHub
osvm plugins install github.com/user/osvm-weather-plugin
# Enable/disable plugins
osvm plugins enable weather-plugin
osvm plugins disable old-plugin
# Get plugin info
osvm plugins info weather-plugin
Command Plugins - Add slash commands:
/echo Hello World # Built-in example
/weather Boston # Custom weather plugin
/deploy contracts/ # Custom deployment plugin
Tool Plugins - Provide AI-accessible tools:
# Tools become available to AI automatically
osvm chat "Get the weather in Boston"
Theme Plugins - Visual customization:
osvm chat --theme cyberpunk
osvm chat --theme minimal-dark
Integration Plugins - External services:
/github create-issue "Fix deployment bug"
/db query "SELECT * FROM transactions LIMIT 10"
For detailed plugin development instructions, see Plugin Development.
Launch the interactive monitoring dashboard:
osvm svm dashboard
Features:
Navigation:
Tab/Shift+Tab: Switch tabs↑/↓: Navigate listsEnter: Select/activateq: Quit dashboard# Run comprehensive diagnostics
osvm doctor
# Auto-fix issues
osvm doctor --fix
# Check specific components
osvm doctor --system-only
osvm doctor --network-only
The built-in self-repair system automatically detects and fixes common issues:
Deploy SVM nodes directly from GitHub workflows:
- name: Deploy SVM Node
uses: ./.github/actions/svm-deploy
with:
svm-name: 'my-svm'
host: 'user@example.com'
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
network: 'devnet'
node-type: 'validator'
Features:
View Complete CI/CD Documentation
1. Setup Plugin Directory:
mkdir ~/.osvm/plugins/weather-plugin
cd ~/.osvm/plugins/weather-plugin
2. Create Plugin Manifest (plugin.json):
{
"name": "weather-plugin",
"version": "1.0.0",
"description": "Get weather information for any city",
"author": "Your Name",
"license": "MIT",
"plugin_type": "Command",
"entry_point": "weather.py",
"dependencies": ["requests"],
"permissions": [
{"NetworkAccess": ["api.openweathermap.org"]},
"EnvironmentAccess"
],
"min_osvm_version": "0.8.0",
"supported_platforms": ["linux", "macos", "windows"]
}
3. Create Plugin Script (weather.py):
#!/usr/bin/env python3
import json
import sys
import requests
from datetime import datetime
def main():
# Read context from stdin
context = json.loads(sys.stdin.read())
# Parse command
user_input = context["user_input"]
city = user_input.replace("/weather", "").strip()
if not city:
result = {
"success": False,
"error": "Please specify a city: /weather Boston"
}
print(json.dumps(result))
return
# Get weather data (simplified example)
try:
# Your weather API logic here
result = {
"success": True,
"output": f"🌤️ Weather in {city}: 22°C, Partly Cloudy",
"suggestions": [f"/weather forecast {city}"]
}
except Exception as e:
result = {
"success": False,
"error": f"Failed to get weather: {str(e)}"
}
print(json.dumps(result))
if __name__ == "__main__":
main()
4. Make Executable and Test:
chmod +x weather.py
osvm plugins install .
osvm plugins enable weather-plugin
# Test in chat
osvm chat
# Type: /weather Boston
Cargo.toml:
[package]
name = "osvm-database-plugin"
version = "1.0.0"
edition = "2021"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.0", features = ["full"] }
anyhow = "1.0"
src/main.rs:
use anyhow::Result;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[derive(Deserialize)]
struct PluginContext {
user_input: String,
session_id: String,
config: HashMap<String, serde_json::Value>,
}
#[derive(Serialize)]
struct PluginResult {
success: bool,
output: String,
error: Option<String>,
suggestions: Vec<String>,
}
#[tokio::main]
async fn main() -> Result<()> {
let mut input = String::new();
std::io::stdin().read_line(&mut input)?;
let context: PluginContext = serde_json::from_str(&input)?;
// Your plugin logic here
let result = PluginResult {
success: true,
output: "Database query executed successfully".to_string(),
error: None,
suggestions: vec![]
};
println!("{}", serde_json::to_string(&result)?);
Ok(())
}
theme.json:
{
"name": "cyberpunk-theme",
"version": "1.0.0",
"plugin_type": "Theme",
"colors": {
"primary": "#00ff41",
"secondary": "#ff00ff",
"background": "#0d0208",
"text": "#00ff41",
"accent": "#00ffff"
},
"styles": {
"chat_input": {
"background": "background",
"text": "primary",
"border": "accent"
},
"message_user": {
"text": "primary",
"prefix": "► "
},
"message_assistant": {
"text": "text",
"prefix": "◉ "
}
}
}
Permission System:
ReadFiles(["~/data"]) - File read accessWriteFiles(["~/output"]) - File write accessExecuteCommands - System command executionNetworkAccess(["api.example.com"]) - Network accessEnvironmentAccess - Environment variablesMCPAccess - MCP server accessAIAccess - AI service accessBest Practices:
For complete documentation, visit docs.opensvm.org.
Contributions are welcome! Please feel free to submit a Pull Request.
Install Pre-commit Hooks:
./install-pre-commit-hook.sh
Development Commands:
# Format code
cargo fmt --all
# Run linting
cargo clippy --all-targets --all-features
# Run tests
cargo test
# Build and test
make dev
Code Quality Checks:
cargo fmt --all -- --check - Formatting verification
cargo clippy - Linting checks
cargo test - Test suite
Tiered Token Gating System:
Premium Feature Gates:
Social Features: Minimum 100,000 $OVSM token holding required
Advanced Analytics: Token consumption for complex queries
Unlimited Threads: Premium tier exclusive (free users limited to 10)
Extended AI Reasoning: 5 expansions for free, unlimited for premium
This project is licensed under the MIT License - see the LICENSE file for details.
Need Help?