https://github.com/opensvm/osvm-cli
Open SVM cli, interact with any SVM with ease
https://github.com/opensvm/osvm-cli
Last synced: over 1 year ago
JSON representation
Open SVM cli, interact with any SVM with ease
- Host: GitHub
- URL: https://github.com/opensvm/osvm-cli
- Owner: openSVM
- Created: 2025-02-12T06:07:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-16T13:58:43.000Z (over 1 year ago)
- Last Synced: 2025-03-16T14:35:00.548Z (over 1 year ago)
- Language: Rust
- Size: 1.59 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OSVM CLI 🚀
[](LICENSE)
[](https://www.rust-lang.org/)
[](https://solana.com/)
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.
```mermaid
graph TB
User((User))
subgraph "OSVM CLI System"
subgraph "CLI Interface"
MainCLI["Main CLI
Rust/Clap"]
CommandParser["Command Parser
Clap"]
subgraph "Core Commands"
SVMCommands["SVM Commands
Rust"]
NodeCommands["Node Commands
Rust"]
SolanaCommands["Solana Commands
Rust"]
RPCCommands["RPC Commands
Rust"]
end
end
subgraph "Node Management"
NodeManager["Node Manager
Rust"]
subgraph "Node Components"
NodeDB["Node Database
JSON"]
NodeMonitor["Node Monitor
Rust"]
NodeDashboard["Node Dashboard
Ratatui"]
NodeMetrics["Node Metrics
Rust"]
NodeLogs["Log Manager
Rust"]
end
end
subgraph "SSH Deployment"
SSHManager["SSH Manager
SSH2"]
subgraph "Deployment Components"
DeployConfig["Deployment Config
Rust"]
DiskManager["Disk Manager
Rust"]
ServiceManager["Service Manager
Rust"]
HotSwap["Hot Swap Manager
Rust"]
Dependencies["Dependency Manager
Rust"]
end
end
subgraph "Utilities"
Logger["Logger
env_logger"]
Config["Config Manager
YAML"]
Dashboard["Dashboard Generator
HTML/CSS"]
Examples["Examples Manager
Rust"]
end
end
subgraph "External Systems"
SolanaNode["Solana Node
Rust"]
RPCNode["RPC Node
JSON-RPC"]
RemoteServer["Remote Server
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
```
## ⚡ One-Line Installation
### Linux/macOS
```bash
curl -sSf https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.sh | sh
```
### Windows
```bash
powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.ps1' -OutFile 'install.ps1'; .\install.ps1"
```
## 🌟 Key Features
- **SVM Management**: List and inspect Solana Virtual Machines
- **Node Deployment**: Deploy validator or dedicated RPC nodes with a single command
- **Interactive Dashboard**: Real-time monitoring with a terminal-based UI
- **Network Configuration**: Configure nodes for mainnet, testnet, or devnet
- **Performance Metrics**: Track TPS, latency, and system requirements
- **Colorized Output**: Enhanced readability with consistent color-coding for status, commands, and data
- **Command Examples**: Built-in examples for common workflows and operations
- **SSH Deployment**: Remote deployment and management capabilities
## 📋 Command Reference
### SVM Management
```bash
# 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
```
### Command Examples and Help
```bash
# 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
```
### Node Deployment
```bash
# 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,sei --node-type validator --network devnet
```
### RPC Node Deployment
```bash
# 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
```
The `rpc` command provides a streamlined way to deploy specific RPC nodes:
- **Sonic RPC**: Deploys a Sonic RPC node using Docker containers from the official repository
- **Network Selection**: Choose between mainnet, testnet, or devnet environments
- **Automatic Configuration**: Handles all dependencies and configuration automatically
## 🔧 Detailed Installation
### Prerequisites
- Rust 1.80.0 or later
- Solana CLI tools 1.14.29 or later
### From Source
```bash
# 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/
```
## 📊 Dashboard Features
The interactive dashboard provides real-time monitoring of your SVM infrastructure, including:
- Overview of all installed SVMs with status indicators
- Network details for each SVM (mainnet, testnet, devnet)
- Performance metrics with real-time visualization
- Node status monitoring with resource usage
- Aggregated logs from all nodes
Launch the dashboard with:
```bash
osvm svm dashboard
```
### Keyboard Controls
- `Tab`, `Right Arrow`, `Left Arrow`: Switch between tabs
- `Up Arrow`, `Down Arrow`: Navigate through items
- `n`: Select next SVM
- `v`: Toggle verbosity level (affects displayed information detail)
- `p`: Select previous SVM
- `h`: Toggle help overlay
- `q` or `Ctrl+C`: Quit the dashboard
## 📚 Documentation
For complete documentation, visit [our official documentation](https://docs.opensvm.org).
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.