systemprompt_cli/commands/core/artifacts/
mod.rs1mod list;
8mod show;
9mod types;
10
11use crate::context::CommandContext;
12use crate::shared::render_result;
13use anyhow::Result;
14use clap::Subcommand;
15
16pub use types::*;
17
18#[derive(Debug, Subcommand)]
19pub enum ArtifactsCommands {
20 #[command(about = "List artifacts")]
21 List(list::ListArgs),
22
23 #[command(about = "Show artifact details and content")]
24 Show(show::ShowArgs),
25}
26
27pub async fn execute(cmd: ArtifactsCommands, ctx: &CommandContext) -> Result<()> {
28 match cmd {
29 ArtifactsCommands::List(args) => {
30 let result = list::execute(args, ctx).await?;
31 render_result(&result, &ctx.cli);
32 },
33 ArtifactsCommands::Show(args) => {
34 let result = show::execute(args, ctx).await?;
35 render_result(&result, &ctx.cli);
36 },
37 }
38 Ok(())
39}