Skip to content

feat: enhance install command with directory option and update prompt logic#1376

Closed
thecontstruct wants to merge 5 commits intobmad-code-org:mainfrom
thecontstruct:dir-install-flag
Closed

feat: enhance install command with directory option and update prompt logic#1376
thecontstruct wants to merge 5 commits intobmad-code-org:mainfrom
thecontstruct:dir-install-flag

Conversation

@thecontstruct
Copy link
Copy Markdown
Contributor

Added a new CLI option for specifying the target project directory, allowing users to skip the interactive prompt. Updated the installation prompt method to accept options and handle directory validation accordingly.

This might be premature since I know it was goign to come back eventually but it's been driving me crazy having to constantly copy paste the full path of all the repo's I want to install the latest from main into every day or two during the install. :sad-panda:

… logic

Added a new CLI option for specifying the target project directory, allowing users to skip the interactive prompt. Updated the installation prompt method to accept options and handle directory validation accordingly.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

The changes add a --directory CLI option to the install command, allowing users to specify a target project directory programmatically. The UI layer was updated to accept and handle this option, bypassing the interactive directory prompt when provided while retaining the existing prompt behavior when omitted.

Changes

Cohort / File(s) Summary
CLI Directory Option
tools/cli/commands/install.js
Added -D, --directory <path> option to the install command options array; updated promptInstall call to pass options object for option handling.
UI Method Updates
tools/cli/lib/ui.js
Updated promptInstall() and getConfirmedDirectory() method signatures to accept optional options parameter; added conditional logic in getConfirmedDirectory() to use provided directory path (with expansion and validation) or fallback to interactive prompt.

Sequence Diagram

sequenceDiagram
    participant User as User/CLI
    participant Cmd as install.js
    participant UI as promptInstall()
    participant Dir as getConfirmedDirectory()
    participant FS as File System

    User->>Cmd: Invoke with --directory option
    Cmd->>UI: promptInstall(options)
    
    alt Directory Option Provided
        UI->>Dir: getConfirmedDirectory(options)
        Dir->>FS: Expand & Validate Path
        FS-->>Dir: Path Valid
        Dir-->>UI: Return Confirmed Directory
    else No Directory Option
        UI->>Dir: getConfirmedDirectory(options)
        Dir->>User: Show Interactive Prompt
        User-->>Dir: User Selects Directory
        Dir-->>UI: Return Selected Directory
    end
    
    UI-->>Cmd: Return Installation Directory
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding a directory option to the install command and updating the prompt logic to handle it.
Description check ✅ Passed The description is related to the changeset, explaining the new directory option feature and providing context for why it was added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bmadcode
Copy link
Copy Markdown
Collaborator

Thanks for this one. I have a lot of in progress installer updates, once I merge them I will get this in. Sorry for the delays also on the command line install options - I will try to focus on that tomorrow or in the next week. But this is a good quick addition.

@bmadcode
Copy link
Copy Markdown
Collaborator

bmadcode commented Feb 6, 2026

merged in another PR that had options for all install questions - thanks @thecontstruct

@bmadcode bmadcode closed this Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants