Skip to content

feat: force autoUpdate on all claude plugin marketplaces - #870

Merged
yxtay merged 3 commits into
mainfrom
feat/claude-plugin-marketplace-autoupdate
Jul 7, 2026
Merged

feat: force autoUpdate on all claude plugin marketplaces#870
yxtay merged 3 commits into
mainfrom
feat/claude-plugin-marketplace-autoupdate

Conversation

@yxtay

@yxtay yxtay commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • The claude plugin marketplace add CLI has no flag to enable autoUpdate, so modify_settings.json now forces autoUpdate: true on every existing extraKnownMarketplaces entry on each chezmoi apply, regardless of how the CLI registered the marketplace name.

Test plan

  • Verified template renders correctly via chezmoi execute-template, confirming autoUpdate is forced true for marketplaces not present in the base template (e.g. CLI-added ones) and overrides existing false values.
  • Run chezmoi apply and confirm ~/.claude/settings.json reflects autoUpdate: true for all marketplaces.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved how settings are merged to ensure existing configuration is preserved more reliably while applying template defaults.
    • When marketplace entries include an autoUpdate preference, it’s now kept in the final rendered configuration so those settings reliably take effect.

The claude CLI has no flag to enable autoUpdate when adding a
marketplace, so force it true for every existing entry on each
chezmoi apply instead of hand-maintaining it in settings.json.
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yxtay, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ec5c43cd-852f-4b20-bb07-07fa1c488408

📥 Commits

Reviewing files that changed from the base of the PR and between e57cb33 and faa01f3.

📒 Files selected for processing (2)
  • chezmoi/private_dot_config/opencode/modify_opencode.json
  • chezmoi/private_dot_config/opencode/modify_tui.json
📝 Walkthrough

Walkthrough

The Claude settings template now merges into an intermediate value, updates any existing marketplace entries to enable autoUpdate, and then renders the merged JSON. A separate MCP template change renames the included JSON variable used in the merge.

Changes

Chezmoi JSON template updates

Layer / File(s) Summary
Settings merge and marketplace override
chezmoi/private_dot_claude/modify_settings.json
The template stores mergeOverwrite output in $merged, then forces extraKnownMarketplaces.*.autoUpdate to true before pretty-printing the result.
MCP template variable rename
chezmoi/private_dot_config/mcp/modify_mcp_servers.json
The included MCP servers JSON is stored in $template, and the merge still combines $current with that included template.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit hops through JSON light,
Merging settings left and right.
One flag flips true, one name shifts neat,
And both templates land complete. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: forcing autoUpdate on Claude plugin marketplaces.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/claude-plugin-marketplace-autoupdate

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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the modify_settings.json template to ensure that any marketplaces defined in extraKnownMarketplaces have autoUpdate set to true during the merge process. The review feedback suggests checking and iterating over $merged instead of $current to ensure consistency and robustness, especially if extraKnownMarketplaces is defined in the base template.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread chezmoi/private_dot_claude/modify_settings.json Outdated
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shfmt 3 0 0 0 0.01s
⚠️ JSON prettier 9 0 1 0 0.39s
⚠️ MARKDOWN markdownlint 6 0 2 0 0.49s
✅ MARKDOWN markdown-table-formatter 6 0 0 0 0.14s
✅ YAML prettier 10 0 0 0 0.42s

Detailed Issues

⚠️ MARKDOWN / markdownlint - 2 errors
chezmoi/private_dot_claude/modify_CLAUDE.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
chezmoi/private_dot_config/opencode/modify_AGENTS.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
⚠️ JSON / prettier - 1 error
chezmoi/.chezmoitemplates/claude-settings.json 57ms (unchanged)
chezmoi/.chezmoitemplates/mcp_servers.json 4ms (unchanged)
chezmoi/.chezmoitemplates/opencode-tui.json 2ms (unchanged)
chezmoi/.chezmoitemplates/opencode.json 4ms (unchanged)
[error] chezmoi/private_dot_claude/modify_settings.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/mcp/modify_mcp_servers.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/opencode/modify_opencode.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/opencode/modify_tui.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
renovate.json 6ms (unchanged)

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_SHFMT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,YAML_PRETTIER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH bash-exec 3 0 0 0.01s
✅ BASH shellcheck 3 0 0 0.08s
✅ REPOSITORY checkov yes no no 22.63s
✅ REPOSITORY devskim yes no no 1.91s
✅ REPOSITORY dustilock yes no no 0.01s
✅ REPOSITORY gitleaks yes no no 1.28s
✅ REPOSITORY grype yes no no 51.77s
✅ REPOSITORY kingfisher yes no no 9.42s
⚠️ REPOSITORY osv-scanner yes 1 no 0.11s
✅ REPOSITORY secretlint yes no no 1.63s
✅ REPOSITORY syft yes no no 2.74s
✅ REPOSITORY trivy yes no no 11.2s
✅ REPOSITORY trivy-sbom yes no no 0.14s
✅ REPOSITORY trufflehog yes no no 3.89s

Detailed Issues

⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 40 dirs visited, 138 inodes visited, 0 Extract calls, 4.451881ms elapsed, 4.45224ms wall time
No package sources found, --help for usage information.

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_EXEC,BASH_SHELLCHECK,REPOSITORY_CHECKOV,REPOSITORY_DEVSKIM,REPOSITORY_DUSTILOCK,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,REPOSITORY_KINGFISHER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.38s
✅ ACTION zizmor 5 0 0 0 0.64s
✅ BASH bash-exec 3 0 0 0.01s
✅ BASH shellcheck 3 0 0 0.08s
✅ BASH shfmt 3 0 0 0 0.01s
✅ COPYPASTE jscpd yes no no 0.92s
✅ EDITORCONFIG editorconfig-checker 67 0 0 0.11s
⚠️ JSON prettier 9 0 1 0 0.68s
✅ JSON v8r 9 0 0 3.68s
⚠️ MARKDOWN markdownlint 6 0 2 0 0.7s
✅ MARKDOWN markdown-table-formatter 6 0 0 0 0.23s
✅ REPOSITORY checkov yes no no 24.43s
✅ REPOSITORY gitleaks yes no no 1.5s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 48.78s
⚠️ REPOSITORY osv-scanner yes 1 no 0.22s
✅ REPOSITORY secretlint yes no no 1.32s
✅ REPOSITORY syft yes no no 2.64s
✅ REPOSITORY trivy yes no no 11.9s
✅ REPOSITORY trivy-sbom yes no no 0.26s
✅ REPOSITORY trufflehog yes no no 5.03s
⚠️ SPELL lychee 25 2 0 1.7s
✅ YAML prettier 10 0 0 0 0.68s
✅ YAML v8r 10 0 0 7.39s
✅ YAML yamllint 10 0 0 0.54s

Detailed Issues

⚠️ SPELL / lychee - 2 errors
📝 Summary
---------------------
🔍 Total...........21
🔗 Unique..........16
✅ Successful......19
⏳ Timeouts.........0
🔀 Redirected.......4
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........2
⛔ Unsupported......2

Errors in chezmoi/.chezmoitemplates/mcp_servers.json
[406] https://mcp.deepwiki.com/mcp (at 11:15) | Rejected status code: 406 Not Acceptable

Errors in chezmoi/.chezmoitemplates/opencode.json
[406] https://mcp.deepwiki.com/mcp (at 25:15) | Rejected status code: 406 Not Acceptable

Hint: Followed 4 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ MARKDOWN / markdownlint - 2 errors
chezmoi/private_dot_claude/modify_CLAUDE.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
chezmoi/private_dot_config/opencode/modify_AGENTS.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 40 dirs visited, 138 inodes visited, 0 Extract calls, 2.586607ms elapsed, 2.586797ms wall time
No package sources found, --help for usage information.
⚠️ JSON / prettier - 1 error
chezmoi/.chezmoitemplates/claude-settings.json 143ms (unchanged)
chezmoi/.chezmoitemplates/mcp_servers.json 7ms (unchanged)
chezmoi/.chezmoitemplates/opencode-tui.json 4ms (unchanged)
chezmoi/.chezmoitemplates/opencode.json 4ms (unchanged)
[error] chezmoi/private_dot_claude/modify_settings.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/mcp/modify_mcp_servers.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/opencode/modify_opencode.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/opencode/modify_tui.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
renovate.json 17ms (unchanged)

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,COPYPASTE_JSCPD,EDITORCONFIG_EDITORCONFIG_CHECKER,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
chezmoi/private_dot_claude/modify_settings.json (1)

7-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Clarity: guard/range rely on mergeOverwrite's mutation side effect on $current.

mergeOverwrite mutates its dst argument ($current) in place and returns it, so after Line 7, $current and $merged are literally the same map. The hasKey $current ... check and range ... $current.extraKnownMarketplaces on Lines 8-9 are therefore silently operating on the already-merged result (including marketplaces contributed only by the template, not just those from stdin), rather than the pre-merge state one would expect from reading $current. This happens to work here, but it's fragile to depend on an implicit dict-mutation side effect (a well-documented sprig gotcha) instead of explicitly using $merged.

♻️ Suggested clarity fix
 {{- $merged := mergeOverwrite $current $chezmoi -}}
-{{- if hasKey $current "extraKnownMarketplaces" -}}
-{{-   range $name, $marketplace := $current.extraKnownMarketplaces -}}
+{{- if hasKey $merged "extraKnownMarketplaces" -}}
+{{-   range $name, $_ := $merged.extraKnownMarketplaces -}}
 {{-     $merged = setValueAtPath (list "extraKnownMarketplaces" $name "autoUpdate") true $merged -}}
 {{-   end -}}
 {{- end -}}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@chezmoi/private_dot_claude/modify_settings.json` around lines 7 - 12,
`mergeOverwrite` mutates `$current`, so the `hasKey` check and `range` in the
settings merge are unintentionally reading the post-merge map rather than the
original stdin state. Update the logic in this template to use `$merged`
explicitly for the `extraKnownMarketplaces` existence check and iteration, so
the behavior is clear and does not depend on `mergeOverwrite`’s in-place side
effect.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@chezmoi/private_dot_claude/modify_settings.json`:
- Around line 7-12: `mergeOverwrite` mutates `$current`, so the `hasKey` check
and `range` in the settings merge are unintentionally reading the post-merge map
rather than the original stdin state. Update the logic in this template to use
`$merged` explicitly for the `extraKnownMarketplaces` existence check and
iteration, so the behavior is clear and does not depend on `mergeOverwrite`’s
in-place side effect.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ef4e71e3-0ad7-40f0-84e8-43cb12d26ed1

📥 Commits

Reviewing files that changed from the base of the PR and between b9fd2e2 and 05e0cbb.

📒 Files selected for processing (1)
  • chezmoi/private_dot_claude/modify_settings.json

…ace autoUpdate loop

$current and $chezmoi mutate in place via mergeOverwrite, but relying on that implicit aliasing is fragile. Rename $chezmoi to $template to avoid shadowing the .chezmoi builtin, and iterate over $merged directly.
@github-actions github-actions Bot added size/S and removed size/XS labels Jul 7, 2026
@yxtay
yxtay merged commit f3bd638 into main Jul 7, 2026
19 of 20 checks passed
@yxtay
yxtay deleted the feat/claude-plugin-marketplace-autoupdate branch July 7, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant