systemprompt_cli/commands/web/assets/
mod.rs1mod asset_type;
7mod list;
8mod show;
9
10use anyhow::{Context, Result};
11use clap::Subcommand;
12
13use crate::CliConfig;
14use crate::shared::render_result;
15
16#[derive(Debug, Subcommand)]
17pub enum AssetsCommands {
18 #[command(about = "List all assets")]
19 List(list::ListArgs),
20
21 #[command(about = "Show asset details")]
22 Show(show::ShowArgs),
23}
24
25pub fn execute(command: AssetsCommands, config: &CliConfig) -> Result<()> {
26 match command {
27 AssetsCommands::List(args) => {
28 let result = list::execute(args, config).context("Failed to list assets")?;
29 render_result(&result);
30 Ok(())
31 },
32 AssetsCommands::Show(args) => {
33 let result = show::execute(&args, config).context("Failed to show asset")?;
34 render_result(&result);
35 Ok(())
36 },
37 }
38}