forest/tool/subcommands/
mod.rs1mod 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_compute_cmd;
16mod state_migration_cmd;
17
18use crate::cli_shared::cli::*;
19use crate::cli_shared::cli::{CompletionCommand, HELP_MESSAGE};
20use crate::utils::version::FOREST_VERSION_STRING;
21use clap::Parser;
22
23#[derive(Parser)]
25#[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")
26)]
27#[command(help_template(HELP_MESSAGE))]
28pub struct Cli {
29 #[command(subcommand)]
30 pub cmd: Subcommand,
31}
32
33#[derive(clap::Subcommand)]
35#[allow(clippy::large_enum_variant)]
36pub enum Subcommand {
37 #[command(subcommand)]
39 Backup(backup_cmd::BackupCommands),
40
41 #[command(subcommand)]
43 Benchmark(benchmark_cmd::BenchmarkCommands),
44
45 #[command(subcommand)]
47 StateMigration(state_migration_cmd::StateMigrationCommands),
48
49 #[command(subcommand)]
51 Snapshot(snapshot_cmd::SnapshotCommands),
52
53 #[command(name = "fetch-params")]
55 Fetch(fetch_params_cmd::FetchCommands),
56
57 #[command(subcommand)]
59 Archive(archive_cmd::ArchiveCommands),
60
61 #[command(subcommand)]
63 DB(db_cmd::DBCommands),
64
65 #[command(subcommand)]
67 Index(index_cmd::IndexCommands),
68
69 #[command(subcommand)]
71 Car(car_cmd::CarCommands),
72
73 #[command(subcommand)]
75 Api(api_cmd::ApiCommands),
76
77 #[command(subcommand)]
79 Net(net_cmd::NetCommands),
80
81 #[command(subcommand)]
83 Shed(shed_cmd::ShedCommands),
84
85 #[command(subcommand)]
86 State(state_compute_cmd::StateCommand),
87
88 Completion(CompletionCommand),
89}