| Crates.io | osvm |
| lib.rs | osvm |
| version | 0.8.2 |
| created_at | 2025-06-26 23:27:09.214275+00 |
| updated_at | 2025-09-22 04:37:30.306024+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 | 2,342,615 |
A powerful command-line interface for managing Solana Virtual Machines (SVMs) across various networks. Monitor, deploy, and manage your SVM infrastructure with a single tool.
For comprehensive documentation, please visit the docs directory:
graph TB
User((User))
subgraph "OSVM CLI System"
subgraph "CLI Interface"
MainCLI["Main CLI<br>Rust/Clap"]
CommandParser["Command Parser<br>Clap"]
subgraph "Core Commands"
SVMCommands["SVM Commands<br>Rust"]
NodeCommands["Node Commands<br>Rust"]
SolanaCommands["Solana Commands<br>Rust"]
RPCCommands["RPC Commands<br>Rust"]
end
end
subgraph "Node Management"
NodeManager["Node Manager<br>Rust"]
subgraph "Node Components"
NodeDB["Node Database<br>JSON"]
NodeMonitor["Node Monitor<br>Rust"]
NodeDashboard["Node Dashboard<br>Ratatui"]
NodeMetrics["Node Metrics<br>Rust"]
NodeLogs["Log Manager<br>Rust"]
end
end
subgraph "SSH Deployment"
SSHManager["SSH Manager<br>SSH2"]
subgraph "Deployment Components"
DeployConfig["Deployment Config<br>Rust"]
DiskManager["Disk Manager<br>Rust"]
ServiceManager["Service Manager<br>Rust"]
HotSwap["Hot Swap Manager<br>Rust"]
Dependencies["Dependency Manager<br>Rust"]
end
end
subgraph "Utilities"
Logger["Logger<br>env_logger"]
Config["Config Manager<br>YAML"]
Dashboard["Dashboard Generator<br>HTML/CSS"]
Examples["Examples Manager<br>Rust"]
end
end
subgraph "External Systems"
SolanaNode["Solana Node<br>Rust"]
RPCNode["RPC Node<br>JSON-RPC"]
RemoteServer["Remote Server<br>Linux"]
end
User -->|Uses| MainCLI
MainCLI -->|Parses| CommandParser
CommandParser -->|Executes| SVMCommands
CommandParser -->|Executes| NodeCommands
CommandParser -->|Executes| SolanaCommands
CommandParser -->|Executes| RPCCommands
NodeCommands -->|Manages| NodeManager
NodeManager -->|Stores| NodeDB
NodeManager -->|Monitors| NodeMonitor
NodeMonitor -->|Displays| NodeDashboard
NodeMonitor -->|Collects| NodeMetrics
NodeManager -->|Manages| NodeLogs
SolanaCommands -->|Deploys| SSHManager
RPCCommands -->|Deploys| SSHManager
SSHManager -->|Uses| DeployConfig
SSHManager -->|Manages| DiskManager
SSHManager -->|Controls| ServiceManager
SSHManager -->|Handles| HotSwap
SSHManager -->|Installs| Dependencies
MainCLI -->|Uses| Logger
MainCLI -->|Reads| Config
NodeDashboard -->|Generates| Dashboard
MainCLI -->|Shows| Examples
SSHManager -->|Connects to| RemoteServer
NodeMonitor -->|Monitors| SolanaNode
NodeMonitor -->|Monitors| RPCNode
curl -sSf https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.sh | sh
powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.ps1' -OutFile 'install.ps1'; .\install.ps1"
Run OSVM CLI in a Docker container without installing it locally:
# Pull the latest image
docker pull ghcr.io/opensvm/osvm-cli:latest
# Run with version check
docker run --rm ghcr.io/opensvm/osvm-cli:latest --version
# Run with interactive mode (mount current directory)
docker run --rm -it -v $(pwd):/workspace ghcr.io/opensvm/osvm-cli:latest
# Use as an alias
alias osvm='docker run --rm -it -v $(pwd):/workspace ghcr.io/opensvm/osvm-cli:latest'
OSVM CLI now includes a dedicated GitHub Action for seamless CI/CD integration! Deploy SVM nodes directly from your workflows with minimal configuration.
- 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'
📖 View Complete Documentation | 🔧 See Examples
# List all SVMs installed in the chain
osvm svm list
# Get detailed information about a specific SVM
osvm svm get sonic
# Launch interactive dashboard
osvm svm dashboard
# Show examples for all command categories
osvm examples
# Show examples for a specific category
osvm examples --category svm
# Available categories: basic, svm, node, monitoring, workflow
# List all available example categories
osvm examples --list-categories
# Deploy a validator node to a remote server (mainnet)
osvm user@host --svm sonic --node-type validator --network mainnet
# Deploy an RPC node to a remote server (testnet)
osvm user@host --svm sonic --node-type rpc --network testnet
# Deploy a Sonic RPC node to a remote server
osvm rpc sonic root@host.example.com --network mainnet
# Deploy multiple SVMs to a single server
osvm user@host --svm sonic,solana,eclipse,soon --node-type validator --network devnet
# Deploy an eBPF binary to all available SVM networks
osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --publish-idl
# Deploy a Sonic RPC node to a remote server (mainnet)
osvm rpc sonic user@host --network mainnet
# Deploy a Sonic RPC node to a remote server (testnet)
osvm rpc sonic user@host --network testnet
# Deploy a Sonic RPC node to a remote server (devnet)
osvm rpc sonic user@host --network devnet
# Monitor devnet RPC node logs (automatically finds the most recent log file)
osvm rpc-manager devnet --logs
# Show specific number of recent log lines
osvm rpc-manager devnet --logs --lines 100
# Follow logs in real-time (similar to tail -f)
osvm rpc-manager devnet --logs --follow
# Start a local test validator for development (guaranteed to work)
osvm rpc-manager test --background --reset
# Check test validator status
osvm rpc-manager test --status
# Stop test validator
osvm rpc-manager test --stop
The rpc-manager command provides comprehensive RPC node management:
osvm.log for debugging# Deploy an eBPF binary to all available SVM networks
osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --publish-idl
# Deploy with custom Anchor IDL file
osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --publish-idl --idl-file ./path/to/program.json
# Deploy to a specific network only
osvm deploy ./path/to/ebpf.so --program-id ./path/to/program-address.json --owner ./path/to/program-owner.json --fee ./path/to/deployment-fee-payer.json --network mainnet
The deploy command provides a streamlined way to deploy eBPF programs:
--idl-file optionKeypair files (generated with solana-keygen new):
[123,45,67,89,...,234] // Array of 64 bytes containing private key
Pubkey-only files (for upgrades only):
{"programId": "HN4tEEGheziD9dqcWg4xZd29htcerjXKGoGiQXM5hxiS"}
or plain string:
HN4tEEGheziD9dqcWg4xZd29htcerjXKGoGiQXM5hxiS
# Clone the repository
git clone https://github.com/opensvm/osvm-cli.git
cd osvm-cli
# Build the project
cargo build --release
# Install the binary
sudo cp target/release/osvm /usr/local/bin/
The interactive dashboard provides real-time monitoring of your SVM infrastructure, including:
Launch the dashboard with:
osvm svm dashboard
Tab, Right Arrow, Left Arrow: Switch between tabsUp Arrow, Down Arrow: Navigate through itemsn: Select next SVMv: Toggle verbosity level (affects displayed information detail)p: Select previous SVMh: Toggle help overlayq or Ctrl+C: Quit the dashboardFor complete documentation, visit our official documentation.
Contributions are welcome! Please feel free to submit a Pull Request.
To ensure code quality and consistency, this project uses pre-commit hooks that enforce code formatting and linting.
Run the following command from the project root to install the pre-commit hooks:
./install-pre-commit-hook.sh
This will install a git hook that automatically runs:
cargo fmt --all -- --check - Ensures code is properly formattedcargo clippy - Runs linting checksYou can also run these checks manually:
# Format your code
cargo fmt --all
# Check formatting without modifying files
cargo fmt --all -- --check
# Run clippy linting
cargo clippy --all-targets --all-features
If you need to skip the pre-commit hook for a specific commit (not recommended), use:
git commit --no-verify -m "your message"
This project is licensed under the MIT License - see the LICENSE file for details.