Skip to main content

solana_tools_lite_cli/shell/
cli.rs

1use crate::models::cmds::Commands;
2use clap::Parser;
3
4#[derive(Parser, Debug)]
5#[command(name = "solana-tools-lite")]
6#[command(about = "Lightweight Solana CLI Toolkit", long_about = None,
7// If no subcommand is supplied, show help (stdout) and exit code 0
8    arg_required_else_help = true)]
9#[command(infer_long_args = true)]
10pub struct Cli {
11    #[arg(
12        global = true,
13        long = "json",
14        help = "Output as JSON (pretty) [env: SOLANA_TOOLS_LITE_JSON]"
15    )]
16    pub json: bool,
17    #[command(subcommand)]
18    pub command: Commands,
19}