Created
December 1, 2025 10:25
-
-
Save medAmarFilali/1fc584a0804caef485d57152a5be86b8 to your computer and use it in GitHub Desktop.
Cubo Cli Structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.