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
//! # Apicurio CLI
//!
//! A powerful Rust-based command-line tool for managing schema artifacts from Apicurio Registry.
//!
//! The `apicurio` CLI provides dependency management for Protobuf, Avro, JSON Schema, and other
//! schema artifacts with lockfile-based reproducible builds.
//!
//! ## Features
//!
//! - 🔒 **Lockfile-based dependency management** - Reproducible builds with exact version locking
//! - 📦 **Multiple artifact types** - Support for Protobuf, Avro, JSON Schema, OpenAPI, GraphQL, and more
//! - 🔐 **Flexible authentication** - Basic, token, and bearer authentication support
//! - 🌐 **Multi-registry support** - Work with multiple Apicurio Registry instances
//! - 📋 **Semver resolution** - Smart semantic version resolution with range support
//!
//! ## Quick Start
//!
//! ```bash
//! # Initialize a new project
//! apicurio init
//!
//! # Add a dependency
//! apicurio add my-registry/com.example/user-service@^1.0.0
//!
//! # Pull dependencies
//! apicurio pull
//!
//! # Check status
//! apicurio status
//! ```
//!
//! ## Configuration
//!
//! The tool uses two main configuration files:
//! - `apicurioconfig.yaml` - Project-specific configuration
//! - `apicuriolock.yaml` - Lock file with exact resolved versions
//!
//! Global registries can be configured in `~/.config/apicurio/registries.yaml`.
use Result;
use Parser;
/// CLI tool for managing schema artifacts from Apicurio Registry
///
/// The Apicurio CLI provides lockfile-based dependency management for schema artifacts
/// including Protobuf, Avro, JSON Schema, OpenAPI, and more. It supports multiple
/// registries, flexible authentication, and semantic version resolution.
/// Main entry point for the Apicurio CLI
///
/// Parses command-line arguments and delegates to the appropriate command handler.
/// If no command is provided, displays an error message and exits.
async