Skip to content

Commit

Permalink
🔨 chore: Add CLI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
queer committed Feb 9, 2023
1 parent c73fac2 commit 7414569
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ use crate::enclosure::rule::Rules;

pub mod enclosure;

const VERSION: &str = env!("CARGO_PKG_VERSION");

#[derive(Parser)]
#[command(
name = "boxxy",
display_name = "boxxy",
about = "Put bad programs in a box with only their files.",
long_about = "boxxy forces bad programs to put their files somewhere else via Linux user namespaces.",
version = VERSION,
)]
pub struct Args {
#[arg(
short = 'i',
Expand All @@ -20,7 +29,12 @@ pub struct Args {
help = "Make the root filesystem immutable."
)]
pub immutable_root: bool,
#[arg(trailing_var_arg = true)]
#[arg(
trailing_var_arg = true,
name = "COMMAND TO RUN",
required = true,
help = "The command to run, ex. `ls -lah` or `aws configure`."
)]
pub command_with_args: Vec<String>,
#[arg(short = 'l', long = "log-level", default_value = "info")]
pub log_level: String,
Expand Down

0 comments on commit 7414569

Please sign in to comment.