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