Skip to content

Instantly share code, notes, and snippets.

@medAmarFilali
Created December 1, 2025 10:25
Show Gist options
  • Select an option

  • Save medAmarFilali/1fc584a0804caef485d57152a5be86b8 to your computer and use it in GitHub Desktop.

Select an option

Save medAmarFilali/1fc584a0804caef485d57152a5be86b8 to your computer and use it in GitHub Desktop.
Cubo Cli Structure
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "cubo",
version = "0.1.0",
author = "Amar FILALI",
about = "A lightweight containerization tool focused on isolation and security ish."
)]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
#[arg(long, global = true, env = "CUBO_ROOT", value_name = "PATH")]
pub root_dir: Option<String>,
}
#[derive(Debug, Subcommand)]
pub enum Commands {
/// Run a container from a blueprint
Run(RunArgs),
/// Build a blueprint from a Cubofile
Build(BuildArgs),
/// List running containers
Ps(PsArgs),
/// Stop a running container
Stop(StopArgs),
/// Remove containers
Rm(RmArgs),
/// Pull an image from a registry
Pull(PullArgs),
}

Comments are disabled for this gist.