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