Improve install DX with one-line bootstrap#44
Conversation
Bootstrap script now auto-detects Claude Code and Cursor, running `claude plugin marketplace add` and `claude plugin install` automatically. Users no longer need to manually type slash commands after curl | bash. - Auto-detect claude CLI and run plugin setup non-interactively - Auto-detect Cursor via .cursor dir, PATH, or /Applications/Cursor.app - Proper error handling with fallback instructions on failure - Use subshell for git pull to avoid cd/cd- issues - README: separate code blocks for each slash command (individually copyable) - README: no bash language tag on slash commands Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Code ReviewOverall this is a solid improvement — the auto-detection logic is well-structured and the README is much cleaner. A few things worth looking at: Potential bug:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb2f5ca02a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ! claude plugin install ai-coding-config > /dev/null 2>&1; then | ||
| echo "⚠️ Plugin install may have failed. Try manually in Claude Code:" | ||
| echo " /plugin install ai-coding-config" |
There was a problem hiding this comment.
Propagate Claude install failures as script errors
When claude plugin install ai-coding-config fails (for example, unauthenticated Claude CLI or transient CLI/network errors), this branch only prints a warning and continues, so the script can still report completion and exit with status 0. In the Claude-only path (HAS_CLAUDE=true, HAS_CURSOR=false), that leaves users without a working install signal and without the file-based fallback setup, which can silently break bootstrap automation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The claude plugin CLI uses a terminal UI renderer that makes exit codes unreliable when run non-interactively. Hard-failing the script on an uncertain exit code would be worse UX — users would see an error even on success. The warning with fallback manual instructions is intentional: it tells users what to do if setup didn't work, without falsely blocking on an unreliable signal.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| else | ||
| echo "📥 Updating ~/.ai_coding_config..." | ||
| (cd ~/.ai_coding_config && git pull) || echo "⚠️ Update failed. Continuing with existing version." | ||
| echo "✓ Updated to latest version" |
There was a problem hiding this comment.
Success message prints even when git pull fails
Low Severity
When git pull fails on line 100, the || branch prints the warning, but execution unconditionally continues to line 101, which prints "✓ Updated to latest version". The user sees both the failure warning and the success checkmark, which is contradictory and misleading. The success echo needs to be conditional on the pull actually succeeding.
|
|
||
| # Add marketplace (claude plugin commands use terminal UI that suppresses output) | ||
| echo " Adding marketplace..." | ||
| if ! claude plugin marketplace add https://github.com/TechNickAI/ai-coding-config > /dev/null 2>&1; then |
There was a problem hiding this comment.
Missing stdin redirect breaks curl-pipe execution
Medium Severity
The claude plugin marketplace add and claude plugin install commands redirect stdout/stderr but not stdin. The primary install method is curl | bash, where bash reads the script from stdin (the pipe). These claude commands inherit that stdin, and if they attempt to read from it (the comment on line 42 notes they "use terminal UI"), they'd consume bytes from the pipe, corrupting the rest of the script execution. Adding < /dev/null to both invocations prevents this.
Additional Locations (1)
- Quote inner subshell in basename call (handles paths with spaces) - Remove .cursor dir detection (CWD-dependent, causes false positives) Cursor detection now relies on PATH and /Applications/Cursor.app only - Add comment explaining why exit 0 when Claude succeeded but no git repo Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Re: Re: unquoted basename subshell — Fixed in c71a87f. Re: exit 0 comment — Added clarifying comment in c71a87f. Re: |
Code ReviewNice improvement to the install DX overall. The restructured bootstrap flow is much cleaner. A few observations: Potential Issues1. The PR summary says "Auto-detect Cursor via if command -v cursor &> /dev/null || [ -d "/Applications/Cursor.app" ] || [ -d "$HOME/.cursor" ]; then2. Suppressed output makes error detection unreliable if ! claude plugin marketplace add https://... > /dev/null 2>&1; thenThe comment acknowledges the TUI suppression issue, but swallowing stderr entirely means the exit code may not reliably reflect success/failure. If the claude CLI returns 0 even on failure (common with interactive TUI wrappers), users get a false "✓ Marketplace configured" message. Consider capturing stderr to a temp file and checking for known failure strings, or at minimum warning users to verify manually. 3. The old README had What Works Well
Minor
Overall this is a solid improvement. The |


Summary
claude plugin marketplace add+claude plugin installnon-interactively — no more manually typing slash commandscurl | bashfor all tools, with manual install as fallbackbashlanguage tag on non-bash commands)What changed
scripts/bootstrap.sh:claudeon PATH → add marketplace + install plugin.cursordir,cursorbinary, or/Applications/Cursor.app|| truecd + git pullto avoid directory issuesREADME.md:bashlanguage tag on slash commandsAGENTS.md:Test plan
bash scripts/bootstrap.sh— both reinstalled successfullyknown_marketplaces.jsonandinstalled_plugins.jsonupdated correctly🤖 Generated with Claude Code