revoke-cli-0.3.0 is not a library.
Revoke CLI
Command-line tool for managing Revoke microservices infrastructure.
Installation
Usage
Service Management
# List all services
# Register a new service
# Deregister a service
# Get service details
# Check service health
Configuration Management
# Get configuration value
# Set configuration value
# Delete configuration
# List configurations
# Watch configuration changes
# Export configuration
# Import configuration
Gateway Management
# List routes
# Add a route
# Remove a route
# View statistics
# Test configuration
Distributed Tracing
# List recent traces
# Get trace details
# Search traces
# Export traces
Health Monitoring
# Check system health
# Check specific service
# Monitor health status
Project Management
# Initialize a new project
# Start development environment
# Start specific services
Configuration
The CLI tool can be configured through:
- Command-line flag
--config - Environment variable
REVOKE_CONFIG - Default config file
~/.config/revoke/config.toml
Example configuration file:
= "http://localhost:8500"
= "revoke"
= "http://localhost:4317"
= 30
Global Options
-c, --config <FILE>: Specify config file-v, --verbose: Increase verbosity (can be used multiple times)
Output Formats
Many commands support different output formats:
table: Table format (default)json: JSON formatyaml: YAML format
Example:
Environment Variables
REVOKE_CONFIG: Config file pathCONSUL_ADDR: Consul addressRUST_LOG: Log level
Examples
Complete Service Deployment Workflow
# 1. Initialize project
# 2. Change to project directory
# 3. Start development environment
# 4. Check service status
# 5. Configure service
# 6. View service traces
Monitoring and Debugging
# Real-time health monitoring
# View gateway statistics
# Search error traces
# Export configuration backup
Project Templates
The init command supports several templates:
basic: Minimal Rust projectmicroservice: Service with HTTP APIgateway: API gateway projectfull-stack: Complete microservices setup
Template Features
Microservice Template
- Axum HTTP server
- Service registration
- Health endpoints
- Configuration integration
- Distributed tracing
Gateway Template
- Pingora-based gateway
- Route configuration
- Load balancing setup
- Circuit breaker configuration
Full-stack Template
- Multiple services
- Gateway configuration
- Docker Compose setup
- Development scripts
Advanced Usage
Custom Commands
Create custom commands by extending the CLI:
use Parser;
use CustomCommand;
Scripting
The CLI is designed to be scriptable:
#!/bin/bash
# Deploy script
services=
for; do
if [; then
fi
done
Troubleshooting
Common Issues
- Connection refused: Check if Consul is running
- Service not found: Verify service name and registration
- Permission denied: Check file permissions for config files
- Command not found: Ensure
~/.cargo/binis in PATH
Debug Mode
Enable debug logging:
RUST_LOG=debug
Getting Help
# General help
# Command-specific help