Skip to content

Commit 6ca254e

Browse files
authored
Merge pull request #55 from auths-dev/dev-onboardingInit
feat: add init onboarding
2 parents 1555f00 + db0722c commit 6ca254e

4 files changed

Lines changed: 425 additions & 3 deletions

File tree

crates/cargo-capsec/src/cli.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ pub enum Commands {
4343
CheckDeny(CheckDenyArgs),
4444
/// Generate a shields.io badge from audit results
4545
Badge(BadgeArgs),
46+
/// Bootstrap capsec for an existing codebase
47+
Init(InitArgs),
4648
}
4749

4850
#[derive(clap::Args)]
@@ -138,3 +140,34 @@ pub struct BadgeArgs {
138140
#[arg(long, default_value = "high", value_parser = ["low", "medium", "high", "critical"])]
139141
pub fail_on: String,
140142
}
143+
144+
#[derive(clap::Args)]
145+
pub struct InitArgs {
146+
/// Path to workspace root
147+
#[arg(short, long, default_value = ".")]
148+
pub path: PathBuf,
149+
150+
/// Generate CI config (github, gitlab, generic)
151+
#[arg(long, value_parser = ["github", "gitlab", "generic"])]
152+
pub ci: Option<String>,
153+
154+
/// Run interactively (prompt for each choice)
155+
#[arg(long)]
156+
pub interactive: bool,
157+
158+
/// Show migration priority report after init
159+
#[arg(long)]
160+
pub report: bool,
161+
162+
/// Exclude test/bench/example directories (default: true)
163+
#[arg(long, default_value_t = true)]
164+
pub exclude_tests: bool,
165+
166+
/// Save baseline alongside config (default: true)
167+
#[arg(long, default_value_t = true)]
168+
pub baseline: bool,
169+
170+
/// Overwrite existing .capsec.toml
171+
#[arg(long)]
172+
pub force: bool,
173+
}

0 commit comments

Comments
 (0)