thot_cli/commands/project/
mod.rs1use crate::result::Result;
2use crate::types::ResourcePathType;
3use clap::{Args, Subcommand};
4use std::path::PathBuf;
5mod commands;
6
7pub mod init;
11pub mod r#move;
12pub mod new;
13
14pub fn main(args: ProjectArgs, verbose: bool) -> Result {
19 match args.command {
20 Command::AddScript(add_args) => commands::add_script(add_args, verbose),
21 }
22}
23
24#[derive(Debug, Args)]
25pub struct ProjectArgs {
26 #[clap(subcommand)]
27 command: Command,
28}
29
30#[derive(Debug, Subcommand)]
31enum Command {
32 AddScript(AddScriptArgs),
33}
34
35#[derive(Debug, Args)]
36pub struct AddScriptArgs {
37 #[clap(parse(from_os_str))]
38 path: PathBuf,
39
40 #[clap(short, long, parse(from_os_str))]
41 project: Option<PathBuf>,
42
43 }