Add image ls and image rm commands

This commit is contained in:
2026-08-26 23:27:58 +02:00
parent 37f537184c
commit 8b544ab688
3 changed files with 61 additions and 23 deletions
+9
View File
@@ -1,10 +1,13 @@
mod build;
mod image;
mod qemu;
mod registry;
use anyhow::Result;
use clap::{Parser, Subcommand};
use crate::image::ImageCmd;
#[derive(Parser, Debug)]
#[command(about = "Build bootable initrd VMs from container images")]
struct Cli {
@@ -27,6 +30,9 @@ enum Commands {
/// Image tag / registry subdir name
name: String,
},
/// List slim images in the registry
#[command(subcommand)]
Image(ImageCmd),
}
fn main() -> Result<()> {
@@ -38,6 +44,9 @@ fn main() -> Result<()> {
Commands::Run { name } => {
qemu::run(&name)?;
}
Commands::Image(cmd) => {
image::run(cmd)?;
}
}
Ok(())
}