forest/tool/subcommands/
mod.rs1pub(crate) mod api_cmd;
5pub(crate) mod archive_cmd;
6mod backup_cmd;
7mod benchmark_cmd;
8mod car_cmd;
9mod db_cmd;
10mod fetch_params_cmd;
11mod index_cmd;
12mod net_cmd;
13mod shed_cmd;
14mod snapshot_cmd;
15mod state_migration_cmd;
16
17use crate::cli_shared::cli::*;
18use crate::cli_shared::cli::{CompletionCommand, HELP_MESSAGE};
19use crate::utils::version::FOREST_VERSION_STRING;
20use clap::Parser;
21
22#[derive(Parser)]
24#[command(name = env!("CARGO_PKG_NAME"), bin_name = "forest-tool", author = env!("CARGO_PKG_AUTHORS"), version = FOREST_VERSION_STRING.as_str(), about = env!("CARGO_PKG_DESCRIPTION")
25)]
26#[command(help_template(HELP_MESSAGE))]
27pub struct Cli {
28 #[command(subcommand)]
29 pub cmd: Subcommand,
30}
31
32#[derive(clap::Subcommand)]
34#[allow(clippy::large_enum_variant)]
35pub enum Subcommand {
36 #[command(subcommand)]
38 Backup(backup_cmd::BackupCommands),
39
40 #[command(subcommand)]
42 Benchmark(benchmark_cmd::BenchmarkCommands),
43
44 #[command(subcommand)]
46 StateMigration(state_migration_cmd::StateMigrationCommands),
47
48 #[command(subcommand)]
50 Snapshot(snapshot_cmd::SnapshotCommands),
51
52 #[command(name = "fetch-params")]
54 Fetch(fetch_params_cmd::FetchCommands),
55
56 #[command(subcommand)]
58 Archive(archive_cmd::ArchiveCommands),
59
60 #[command(subcommand)]
62 DB(db_cmd::DBCommands),
63
64 #[command(subcommand)]
66 Index(index_cmd::IndexCommands),
67
68 #[command(subcommand)]
70 Car(car_cmd::CarCommands),
71
72 #[command(subcommand)]
74 Api(api_cmd::ApiCommands),
75
76 #[command(subcommand)]
78 Net(net_cmd::NetCommands),
79
80 #[command(subcommand)]
82 Shed(shed_cmd::ShedCommands),
83
84 Completion(CompletionCommand),
85}