chain_spec_generator/cli/
options.rs

1use std::path::PathBuf;
2
3use structopt::StructOpt;
4
5#[derive(Debug, StructOpt)]
6#[structopt(
7    name = "chain-spec-generator",
8    about = "A tool to generate Xand chainspecs."
9)]
10pub enum CliOptions {
11    /// Generates a chainspec given the initial on-chain nodes.
12    #[structopt(name = "generate")]
13    Generate {
14        #[structopt(flatten)]
15        args: GenerateCommandArgs,
16    },
17}
18
19#[derive(Debug, StructOpt)]
20pub struct GenerateCommandArgs {
21    /// Configuration file specifying the chainspec to generate.
22    #[structopt(long = "config", parse(from_os_str))]
23    pub config_file: PathBuf,
24
25    /// Path to a pre-build chainspec template zip file.
26    #[structopt(long = "chainspec-zip", parse(from_os_str))]
27    pub chainspec_zip: PathBuf,
28
29    /// Directory to write the chainspec into.
30    #[structopt(short = "o", long = "output-dir", parse(from_os_str))]
31    pub output_dir: PathBuf,
32}