squad-quest/cli/src/cli/mod.rs
2ndbeam 790fa88fe3 refactor(cli)!: Moved CLI stuff to crate::cli
- Bump version to 0.4.0
- Added Config::try_load
- Added Config.verbose field
- Made Config.path public
- Added -q/--quiet flag to CLI

BREAKING CHANGE: Moved CLI-related objects to squad-quest-cli::cli
2025-12-04 17:37:01 +03:00

36 lines
787 B
Rust

use std::path::PathBuf;
use clap::{Parser,Subcommand};
pub mod account;
pub mod map;
pub mod quest;
#[derive(Parser)]
#[command(version, about, long_about = None)]
#[command(propagate_version = true)]
pub struct Cli {
/// Path to config
#[arg(short, long)]
pub config: PathBuf,
/// Object to make operation on
#[command(subcommand)]
pub command: Objects,
/// Suppress most output
#[arg(short, long)]
pub quiet: bool,
}
#[derive(Subcommand)]
pub enum Objects {
/// Operations on the quests
#[command(subcommand)]
Quest(quest::QuestCommands),
/// Operations on the accounts
#[command(subcommand)]
Account(account::AccountCommands),
/// Operations on the map rooms
#[command(subcommand)]
Map(map::MapCommands),
}