1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
//! # Zenobuf CLI - Command-line tools for the Zenobuf framework
//!
//! The Zenobuf CLI provides essential tools for developing, debugging, and monitoring
//! Zenobuf applications. It allows you to inspect running systems, monitor message
//! flows, call services, and manage parameters.
//!
//! ## Installation
//!
//! ```bash
//! cargo install zenobuf-cli
//! ```
//!
//! ## Usage
//!
//! ### List System Components
//!
//! ```bash
//! # List all active nodes
//! zenobuf-cli list nodes
//!
//! # List all active topics
//! zenobuf-cli list topics
//!
//! # List all available services
//! zenobuf-cli list services
//! ```
//!
//! ### Monitor Topics
//!
//! ```bash
//! # Monitor messages on a topic
//! zenobuf-cli monitor sensor_data
//!
//! # Monitor with custom timeout
//! zenobuf-cli monitor sensor_data --timeout 30
//! ```
//!
//! ### Call Services
//!
//! ```bash
//! # Call a service with JSON data
//! zenobuf-cli call add_service --data '{"a": 5, "b": 3}'
//!
//! # Call with custom timeout
//! zenobuf-cli call status_service --timeout 10
//! ```
//!
//! ### Manage Parameters
//!
//! ```bash
//! # Get a parameter value
//! zenobuf-cli param get max_speed
//!
//! # Set a parameter value
//! zenobuf-cli param set max_speed 15.0
//!
//! # List all parameters
//! zenobuf-cli param list
//! ```
//!
//! ## Examples
//!
//! ### Development Workflow
//!
//! ```bash
//! # 1. Check what's running
//! zenobuf-cli list nodes
//! zenobuf-cli list topics
//!
//! # 2. Monitor your application's messages
//! zenobuf-cli monitor /robot/sensors/camera &
//! zenobuf-cli monitor /robot/control/velocity &
//!
//! # 3. Test services manually
//! zenobuf-cli call /robot/navigation/goto --data '{"x": 1.0, "y": 2.0}'
//!
//! # 4. Adjust parameters on the fly
//! zenobuf-cli param set /robot/max_speed 2.0
//! ```
//!
//! ### Debugging
//!
//! ```bash
//! # Check if your publisher is working
//! zenobuf-cli list topics | grep my_topic
//! zenobuf-cli monitor my_topic
//!
//! # Verify service availability
//! zenobuf-cli list services | grep my_service
//! zenobuf-cli call my_service --data '{}'
//!
//! # Check parameter values
//! zenobuf-cli param list | grep config
//! zenobuf-cli param get /app/config/debug_mode
//! ```
use ;
use Result;
/// Command-line tools for the Zenobuf framework
/// Subcommands for the Zenobuf CLI
async