@@ -221,6 +221,9 @@ func runInstall(ctx context.Context, args []string) int {
221221 adminPassword := fs .String ("admin-password" , "" , "Admin password" )
222222 adminDirectory := fs .String ("admin-directory" , "" , "Admin directory (default: manager)" )
223223 language := fs .String ("language" , "" , "Installation language (e.g., en, uk)" )
224+ githubPat := fs .String ("github-pat" , "" , "GitHub PAT token for API requests" )
225+ githubPatAlt := fs .String ("github_pat" , "" , "GitHub PAT token for API requests" )
226+ extras := fs .String ("extras" , "" , "Comma-separated extras to install (e.g., sTask@main,sSeo)" )
224227 logToFile := fs .Bool ("log" , false , "Write installer log to file" )
225228 cliMode := fs .Bool ("cli" , false , "Run in non-interactive CLI mode (no TUI)" )
226229 quiet := fs .Bool ("quiet" , false , "Reduce CLI output (warnings/errors only)" )
@@ -230,6 +233,11 @@ func runInstall(ctx context.Context, args []string) int {
230233 if err := fs .Parse (flagArgs ); err != nil {
231234 return 2
232235 }
236+ pat := strings .TrimSpace (* githubPat )
237+ if pat == "" {
238+ pat = strings .TrimSpace (* githubPatAlt )
239+ }
240+
233241 opt := installengine.Options {
234242 Force : * force ,
235243 Dir : installDir ,
@@ -248,7 +256,14 @@ func runInstall(ctx context.Context, args []string) int {
248256 AdminPassword : * adminPassword ,
249257 AdminDirectory : strings .TrimSpace (* adminDirectory ),
250258 Language : strings .ToLower (strings .TrimSpace (* language )),
259+ GithubPat : pat ,
260+ }
261+ extrasSelections , err := parseExtrasSelections (* extras )
262+ if err != nil {
263+ fmt .Fprintln (os .Stderr , err )
264+ return 2
251265 }
266+ opt .Extras = extrasSelections
252267 if * cliMode {
253268 if err := applyCLIDefaults (& opt ); err != nil {
254269 fmt .Fprintln (os .Stderr , err )
@@ -258,13 +273,42 @@ func runInstall(ctx context.Context, args []string) int {
258273 return runInstaller (ctx , ui .ModeInstall , & opt , * logToFile , * cliMode , * quiet )
259274}
260275
276+ func parseExtrasSelections (raw string ) ([]domain.ExtrasSelection , error ) {
277+ raw = strings .TrimSpace (raw )
278+ if raw == "" {
279+ return nil , nil
280+ }
281+ parts := strings .Split (raw , "," )
282+ out := make ([]domain.ExtrasSelection , 0 , len (parts ))
283+ for _ , part := range parts {
284+ part = strings .TrimSpace (part )
285+ if part == "" {
286+ continue
287+ }
288+ name := part
289+ version := ""
290+ if strings .Contains (part , "@" ) {
291+ chunks := strings .SplitN (part , "@" , 2 )
292+ name = strings .TrimSpace (chunks [0 ])
293+ if len (chunks ) > 1 {
294+ version = strings .TrimSpace (chunks [1 ])
295+ }
296+ }
297+ if name == "" {
298+ return nil , fmt .Errorf ("invalid --extras value: %q" , part )
299+ }
300+ out = append (out , domain.ExtrasSelection {Name : name , Version : version })
301+ }
302+ return out , nil
303+ }
304+
261305func splitInstallArgs (args []string ) (installDir string , flagArgs []string , err error ) {
262306 flagArgs = make ([]string , 0 , len (args ))
263307
264308 expectsValue := func (flag string ) bool {
265309 switch flag {
266310 case "branch" , "db-type" , "db-host" , "db-port" , "db-name" , "db-user" , "db-password" ,
267- "admin-username" , "admin-email" , "admin-password" , "admin-directory" , "language" :
311+ "admin-username" , "admin-email" , "admin-password" , "admin-directory" , "language" , "github-pat" , "github_pat" , "extras" :
268312 return true
269313 default :
270314 return false
0 commit comments