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