CLI Reference
Command-line interface for SocketCloud management and operations
Command Categories
Installation & Setup
Install and configure the SocketCloud CLI for your environment.
⚠ Enterprise License Required
Access to SocketCloud packages requires an active enterprise license. Contact contact@socketcloud.com to obtain credentials.
# Install SocketCloud CLI globally
npm install -g @aaimplatform/socketcloud-cli
# Initialize new mesh network
socketcloud init --network-id financial-mesh --node-id node-001
# Generate quantum-resistant certificates
socketcloud security generate-certs --type ed25519 --quantum-ready
# Verify installation
socketcloud --version
socketcloud health --self-check
System Lifecycle Management
Core system operations for starting, stopping, and managing SocketCloud nodes.
socketcloud start
Starts the SocketCloud node with specified configuration.
Option | Description | Default |
---|---|---|
--config, -c | Configuration file path | ./socketcloud.json |
--port, -p | Network port for mesh communication | 8001 |
--bootstrap | Bootstrap peer addresses | None |
--consensus | Consensus algorithm (pbft, raft, tendermint) | pbft |
--daemon, -d | Run as background daemon | false |
# Start node with custom configuration
socketcloud start --config /etc/socketcloud/prod.json --daemon
# Start with specific consensus algorithm
socketcloud start --consensus tendermint --port 8001
# Start and join existing mesh
socketcloud start --bootstrap tcp://seed1.example.com:8001,tcp://seed2.example.com:8001
# Start with enterprise security features
socketcloud start --security-mode enterprise --audit-level full
socketcloud stop
Gracefully stops the SocketCloud node and all services.
# Graceful shutdown with 30s timeout
socketcloud stop --timeout 30s
# Force shutdown if graceful fails
socketcloud stop --force
# Stop and backup state before shutdown
socketcloud stop --backup --backup-location /backups/emergency
socketcloud status
Display comprehensive node and mesh status information.
# Basic status overview
socketcloud status
# Detailed status with performance metrics
socketcloud status --detailed --include-metrics
# Export status to JSON for monitoring systems
socketcloud status --format json --output /monitoring/status.json
# Check specific component status
socketcloud status --component mesh-networking --component consensus
Network Management
Manage mesh topology, peer connections, and network optimization.
socketcloud mesh
Peer Management
# List connected peers
socketcloud mesh peers --format table
# Add trusted peer
socketcloud mesh add-peer tcp://trusted-node.example.com:8001 --trust-level high
# Remove problematic peer
socketcloud mesh remove-peer node-id-123 --reason "security-violation"
# Get detailed peer information
socketcloud mesh peer-info node-id-456 --include-metrics
Network Topology
# Visualize mesh topology
socketcloud mesh topology --output topology.svg --format graphviz
# Optimize routing table
socketcloud mesh optimize --algorithm kademlia --max-peers 50
# Check network health
socketcloud mesh health --run-diagnostics --include-latency
Service Discovery
# Register service in mesh
socketcloud mesh register-service \
--name trading-engine \
--capabilities "memory-write,subprocess-run" \
--endpoints "tcp://service.internal:9001"
# Discover available services
socketcloud mesh discover --service-type financial --region us-east
# Update service capabilities
socketcloud mesh update-service trading-engine \
--add-capability "web-fetch" \
--remove-capability "filesystem-delete"
Backup & Restore Operations
Comprehensive backup and disaster recovery management with multi-cloud support.
socketcloud backup
Enterprise Backup Features
- Multi-Cloud Storage: S3, Azure Blob, Google Cloud Storage adapters
- Encryption: XSalsa20-Poly1305 authenticated encryption with Argon2id key derivation
- Compression: Advanced lossless compression algorithms
- Integrity Verification: Cryptographic checksums and validation
- Incremental Backups: Efficient delta-based backups
Create Backups
# Full mesh state backup with encryption
socketcloud backup create \
--type full \
--encrypt \
--compression lz4 \
--storage s3://example-backups/socketcloud/ \
--name "production-backup-$(date +%Y%m%d)"
# Incremental backup with multi-cloud replication
socketcloud backup create \
--type incremental \
--base-backup production-backup-20241201 \
--replicate-to azure://backup-vault/socketcloud/ \
--replicate-to gcs://disaster-recovery/socketcloud/
# Node-specific configuration backup
socketcloud backup create \
--scope node-config \
--include-certificates \
--include-keys \
--secure-vault /secure/backups/
Restore Operations
# Full mesh restore with validation
socketcloud backup restore \
--backup-id production-backup-20241201 \
--verify-integrity \
--rollback-on-failure \
--staging-area /tmp/restore/
# Point-in-time restore to specific timestamp
socketcloud backup restore \
--timestamp "2024-12-01T15:30:00Z" \
--selective \
--components "state,config,certificates"
# Cross-region disaster recovery
socketcloud backup restore \
--from-region us-west-2 \
--to-region us-east-1 \
--update-network-config \
--new-node-id disaster-recovery-node
Backup Management
# List available backups across all storage providers
socketcloud backup list --all-providers --sort-by date
# Verify backup integrity
socketcloud backup verify production-backup-20241201 --deep-check
# Cleanup old backups with retention policy
socketcloud backup cleanup \
--retention-days 90 \
--keep-monthly 12 \
--keep-yearly 7 \
--dry-run
Monitoring & Metrics
Real-time monitoring, performance metrics, and system observability.
socketcloud metrics
# Real-time performance dashboard
socketcloud metrics dashboard --refresh 1s --components all
# Export Prometheus metrics
socketcloud metrics export --format prometheus --output /metrics/socketcloud.txt
# Generate performance report
socketcloud metrics report \
--timeframe 24h \
--include-latency \
--include-throughput \
--format pdf \
--output performance-report.pdf
# Monitor specific metrics with alerts
socketcloud metrics watch \
--metric "mesh.latency" \
--threshold 5ms \
--alert-webhook https://monitoring.example.com/alerts
socketcloud logs
# Tail logs with filtering
socketcloud logs --follow --level error --component consensus
# Export logs for analysis
socketcloud logs \
--since 24h \
--format json \
--output logs-$(date +%Y%m%d).json
# Search logs with pattern matching
socketcloud logs --grep "security violation" --context 5
# Aggregate logs from mesh peers
socketcloud logs --mesh-wide --node-filter "region=us-east"
socketcloud alerts
# Configure alert rules
socketcloud alerts create \
--name "high-latency" \
--condition "mesh.latency > 10ms" \
--severity critical \
--notification slack://operations-channel
# List active alerts
socketcloud alerts list --active --sort-by severity
# Acknowledge alert
socketcloud alerts ack alert-id-12345 --comment "investigating"
Security Operations
Advanced security management including MCP integration, identity management, and compliance.
socketcloud security
Identity Management
# Register distributed service identity
socketcloud security register-identity \
--service-id trading-service-001 \
--capabilities "memory-write,subprocess-run" \
--attestation quantum-resistant \
--consensus-required
# Revoke compromised identity
socketcloud security revoke-identity \
--service-id compromised-service \
--reason security-breach \
--immediate
# List active identities with permissions
socketcloud security list-identities \
--include-capabilities \
--filter-by-risk high
MCP Security Gateway
# Start MCP security gateway
socketcloud security start-mcp-gateway \
--consensus-algorithm pbft \
--audit-level comprehensive \
--threat-detection enabled
# Authorize high-risk operation with consensus
socketcloud security authorize \
--session-id session-12345 \
--capability subprocess-run \
--resource trading-algorithm \
--consensus-required \
--timeout 30s
# Generate security compliance report
socketcloud security compliance-report \
--frameworks SOX,PCI-DSS,MiFID-II \
--timeframe 30days \
--include-violations \
--format regulatory
Certificate Management
# Generate quantum-resistant certificates
socketcloud security generate-certs \
--algorithm ed25519 \
--quantum-ready \
--validity 365days \
--output /secure/certs/
# Rotate certificates across mesh
socketcloud security rotate-certs \
--mesh-wide \
--grace-period 24h \
--verify-before-apply
# Audit certificate usage
socketcloud security audit-certs \
--check-expiry \
--check-revocation \
--format detailed
Agent Orchestration
Manage AI agent coordination, workflows, and distributed processing.
socketcloud agents
# Deploy agent orchestration cluster
socketcloud agents deploy-orchestrator \
--max-agents 10000 \
--load-balancing adaptive \
--fault-tolerance byzantine
# Create agent workflow
socketcloud agents create-workflow \
--name trading-analysis \
--steps market-analyzer,risk-assessor,order-executor \
--parallelism 1000 \
--error-handling retry-with-backoff
# Scale agent capacity
socketcloud agents scale \
--target-capacity 15000 \
--scaling-policy predictive \
--resource-optimization enabled
# Monitor agent performance
socketcloud agents monitor \
--real-time \
--metrics "throughput,latency,error-rate" \
--alert-on-anomalies
Compliance & Audit
Regulatory compliance, audit trail management, and reporting.
socketcloud compliance
# Generate comprehensive compliance report
socketcloud compliance report \
--frameworks "SOX,PCI-DSS,GDPR,MiFID-II,Basel-III" \
--period quarterly \
--include-audit-trails \
--include-violations \
--format regulatory-submission
# Real-time compliance monitoring
socketcloud compliance monitor \
--real-time \
--violation-threshold zero-tolerance \
--auto-remediation enabled \
--notification-webhook https://compliance.example.com/alerts
# Audit trail verification
socketcloud compliance verify-audit-trail \
--timeframe 90days \
--check-integrity \
--check-completeness \
--export-violations
Advanced Operations
Advanced features for enterprise deployments and specialized use cases.
Consensus Operations
# Switch consensus algorithm
socketcloud consensus switch \
--from raft \
--to pbft \
--migration-strategy rolling \
--safety-checks enabled
# Consensus health check
socketcloud consensus health \
--check-participation \
--check-latency \
--check-fault-tolerance
State Management
# Synchronize state across mesh
socketcloud state sync \
--force-reconciliation \
--conflict-resolution crdt \
--verify-consistency
# Export mesh state for analysis
socketcloud state export \
--format binary \
--compress \
--encrypt \
--output mesh-state-$(date +%Y%m%d).bin
Performance Tuning
# Auto-tune performance parameters
socketcloud tune \
--target-latency 1ms \
--target-throughput 1000000ops \
--optimize-for latency \
--apply-immediately
# Benchmark mesh performance
socketcloud benchmark \
--duration 5m \
--concurrency 1000 \
--measure-latency \
--measure-throughput \
--report performance-benchmark.html