thot_cli/commands/config/
mod.rs

1use crate::result::Result;
2use clap::{Args, Subcommand};
3use std::path::PathBuf;
4use thot_core::types::UserId;
5mod commands;
6
7/// Configures a Thot project.
8pub fn main(args: ConfigArgs, verbose: bool) -> Result {
9    // run command
10    match args.command {
11        Command::SetUser(user) => commands::set_active_user(&user),
12    }
13}
14
15#[derive(Debug, Args)]
16pub struct ConfigArgs {
17    #[clap(subcommand)]
18    command: Command,
19    root: Option<PathBuf>,
20}
21
22#[derive(Debug, Subcommand)]
23enum Command {
24    SetUser(UserId),
25}