@@ -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