Skip to content

Common config files / perf improvements / better maintainability - #10

Merged
edouardmisset merged 19 commits into
mainfrom
common
Jul 10, 2026
Merged

Common config files / perf improvements / better maintainability#10
edouardmisset merged 19 commits into
mainfrom
common

Conversation

@edouardmisset

@edouardmisset edouardmisset commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added an idempotent, manifest-driven dotfiles installer with broken-symlink cleanup.
    • Expanded Zsh aliases and helper commands, including script/package-manager auto-run support.
  • Bug Fixes
    • Improved shell setup by resolving Homebrew’s zsh dynamically, updating /etc/shells, and switching the login shell when needed.
  • Documentation
    • Updated bootstrap and “how install works” instructions, including a shell layout overview.
  • Refactor
    • Migrated Zsh startup to Zinit and switched prompt initialization to Starship; centralized custom aliases/functions.
  • Chores
    • Refreshed Brewfile apps/casks/plugins/extensions, removed p10k configuration, stopped installing global NPM packages, and removed prior dotbot/installer configuration.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 834d6b5a-2698-432a-ac03-95d1f51db3fd

📥 Commits

Reviewing files that changed from the base of the PR and between 4cf6942 and cde69b9.

📒 Files selected for processing (2)
  • zsh/aliases.zsh
  • zshrc-work
✅ Files skipped from review due to trivial changes (1)
  • zshrc-work
🚧 Files skipped from review as they are similar to previous changes (1)
  • zsh/aliases.zsh

📝 Walkthrough

Walkthrough

The PR replaces dotbot-based installation with a manifest-driven zsh installer, updates shell bootstrap files, adds autoloaded zsh helpers and aliases, and revises the Brewfile package set.

Changes

Dotfiles Overhaul

Layer / File(s) Summary
Installer and manifest
links.conf, install, README.md, install.conf.yaml, dotbot
links.conf defines symlink mappings; install reads the manifest, cleans broken links, creates symlinks, ensures $HOME/Projects, and runs local setup scripts; README.md documents the new flow; install.conf.yaml is emptied; the dotbot submodule reference is removed.
Setup scripts
setup_zsh.zsh, setup_node.zsh
setup_zsh.zsh resolves the Homebrew zsh binary at runtime and updates /etc/shells and the login shell with that path; setup_node.zsh removes the global npm package installs after Node setup.
Shell bootstrap
zshenv, zshrc, zshrc.bak
zshenv updates command lookup, Homebrew setup, exports, PATH construction, and guarded env sourcing. zshrc bootstraps zinit, autoloads helpers, configures completion and plugins, initializes integrations, sets history and prompt behavior, and sources aliases. zshrc.bak adds an alternate zinit-based shell configuration.
Aliases and autoloaded functions
zsh/aliases.zsh, zsh/functions/autoload/*
zsh/aliases.zsh adds shell, Git, Homebrew, and package-manager aliases plus helper functions. New autoloaded functions cover directory navigation, package-manager detection, Git branch moves, package.json and deno.json script checks, script listings, file renaming, port killing, directory creation, and a unified run dispatcher.
Brewfile updates
Brewfile
Brewfile changes the tap list, formula list, casks, MAS apps, and VS Code extensions, including new developer tools, local LLM tooling, and several extension set replacements.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐇 I hopped through dotfiles, neat and bright,
New links now bind the morning light.
Zinit hums, and Starship sings,
While Brewfile swaps a pile of things.
A cozy burrow, tidy and new,
With autoloaded magic all the way through!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is generic and does not clearly describe the main changes in the pull request. Rename it to a concise, specific summary of the primary change, such as the new dotfiles bootstrap and shell config updates.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch common

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.

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

Actionable comments posted: 11

🧹 Nitpick comments (4)
zsh/functions/autoload/kebabify (1)

15-16: 🎯 Functional Correctness | 🔵 Trivial | ⚖️ Poor tradeoff

Path components in filenames will be kebab-cased.

If a user passes path/To/MyFile.txt, the entire path is transformed to path/to/my-file.txt, then mv attempts to rename the file to that path. This will fail unless path/to/ exists and matches the source directory. Consider transforming only the basename:

local dir basename new_name
dir=$(dirname "$file")
basename=$(basename "$file")
new_name=$(printf '%s\n' "$basename" | sed -E 's/([a-z0-9])([A-Z])/\1-\2/g; s/_/-/g' | tr '[:upper:]' '[:lower:]')
[[ "$dir" == "." ]] && new_name="$new_name" || new_name="$dir/$new_name"
mv -n -- "$file" "$new_name" && echo "Renamed: $file -> $new_name"
🤖 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 `@zsh/functions/autoload/kebabify` around lines 15 - 16, The kebabify function
currently applies the kebab-case transformation to the entire filename path,
which causes the mv command to fail when the directory structure doesn't exist
as specified. Extract the directory and basename separately using dirname and
basename functions before applying the sed and tr transformations only to the
basename portion. After transforming only the basename, reconstruct the full
path by prepending the original directory, then use this properly constructed
path in the mv command to ensure the file is moved to the correct location
within its original directory structure.
zsh/functions/autoload/gmove (1)

11-11: 🎯 Functional Correctness | 🔵 Trivial | ⚖️ Poor tradeoff

Filenames with spaces will break the stash command.

$(git diff --staged --name-only) expands to space-separated filenames. If any staged file contains spaces, the command will fail. Use a while-read loop or null-delimited approach:

git diff --staged --name-only -z | xargs -0 git stash --

or build an array:

local files=("${(`@f`)$(git diff --staged --name-only)}")
git stash -- "${files[@]}"
🤖 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 `@zsh/functions/autoload/gmove` at line 11, The current git stash command using
$(git diff --staged --name-only) will fail when staged filenames contain spaces
because the expansion produces space-separated arguments that are incorrectly
parsed. Fix this by using a null-delimited approach with the -z flag on git diff
and piping through xargs with -0 to properly handle filenames with spaces, or
alternatively build an array of filenames using the array syntax and pass the
array to git stash to preserve spaces in individual filenames. Either approach
will safely handle the file list passed to the git stash command.
zsh/aliases.zsh (1)

88-89: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Quote command substitutions for safety.

While Git branch names cannot contain spaces, defensive quoting prevents unexpected word splitting.

♻️ Proposed fix
-function glm()    { git log "$(get_default_branch)..HEAD" --graph --pretty="$_git_log_pretty" }
-function glolsm() { git log "$(get_default_branch)..HEAD" --stat  --pretty="$_git_log_pretty" }
+function glm()    { git log "$(get_default_branch)..HEAD" --graph --pretty="$_git_log_pretty" }
+function glolsm() { git log "$(get_default_branch)..HEAD" --stat  --pretty="$_git_log_pretty" }

(Note: The command substitutions are already quoted in the current code. No change needed.)

🤖 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 `@zsh/aliases.zsh` around lines 88 - 89, The command substitutions in both the
glm and glolsm functions are already properly quoted with double quotes around
$(get_default_branch), which correctly prevents unexpected word splitting.
Additionally, the $_git_log_pretty variable is also properly quoted. No changes
are needed as the current implementation already follows defensive quoting best
practices.
zsh/functions/autoload/cl (1)

9-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider whether builtin cd bypasses intended zoxide integration.

Line 10 of zsh/aliases.zsh aliases cd to z (zoxide), but this function uses builtin cd, which bypasses that alias. This means directories visited via cl won't be tracked by zoxide. If that's intentional for autoload functions, this is fine; otherwise, consider using z directly or plain cd (which would expand to z).

🤖 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 `@zsh/functions/autoload/cl` at line 9, In the cl function, replace `builtin
cd` with plain `cd` or `z` to allow the zoxide alias (set in zsh/aliases.zsh
line 10) to take effect and properly track directory visits. The current use of
`builtin cd` explicitly bypasses the alias, preventing zoxide integration for
directories accessed through this autoload function.
🤖 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.

Inline comments:
In `@setup_zsh.zsh`:
- Around line 5-23: The script uses an undefined exists function and does not
validate that BREW_ZSH is an executable path before attempting to add it to
/etc/shells or use it with chsh. First, define or replace the exists function
with a standard shell check (such as using command -v). Second, after the
if-else block that sets BREW_ZSH, add a validation check to ensure the BREW_ZSH
path is executable before the grep command that checks if it exists in
/etc/shells. This prevents non-existent shell paths from being added to
/etc/shells and subsequently failing the chsh command.

In `@zsh/aliases.zsh`:
- Line 93: The bbd alias definition uses single quotes around the file path
argument, which prevents the shell from expanding the tilde character. Replace
the single quotes with double quotes or substitute the tilde with the $HOME
variable expansion in the file path. Specifically, change the file argument in
the bbd alias from --file='~/.dotfiles/Brewfile' to use either
--file="$HOME/.dotfiles/Brewfile" or another form that allows proper path
expansion before the command is executed.

In `@zsh/functions/autoload/gmove`:
- Line 12: The gmove function contains a call to gwip at line 12, but gwip is
not defined anywhere in the codebase since the oh-my-zsh git plugin was removed.
Either define the gwip function (which creates a WIP commit, typically
equivalent to git add and git commit with a WIP message) as a new function in
the zsh configuration, or replace the gwip call in gmove with the inline
equivalent git commands that create a work-in-progress commit.

In `@zsh/functions/autoload/is_script_in_package_json`:
- Around line 4-9: The is_script_in_package_json function has a security
vulnerability where the shell argument $1 is directly interpolated into the
JavaScript code string passed to node -e. Instead of embedding $1 in the quoted
JavaScript source, pass the script name as a command-line argument to the node
process (using $1 outside the -e string) and access it via process.argv within
the JavaScript code, or alternatively pass it as an environment variable and
read it from process.env. This prevents shell argument injection attacks where
quotes or special characters in the script name could break syntax or enable
code execution.

In `@zsh/functions/autoload/list_deno_tasks`:
- Line 8: The echo command on line 8 in the list_deno_tasks function directly
accesses tasks.tasks without null safety, which will throw an error if the
deno.json file lacks a tasks property. Modify the JavaScript string being passed
to deno run to use optional chaining and nullish coalescing (tasks?.tasks ?? {})
when accessing the tasks property, matching the defensive pattern already
established in the is_script_in_deno_json sibling function for consistency and
robustness.

In `@zsh/functions/autoload/run`:
- Around line 19-20: The helper function calls is_script_in_package_json at line
19 and is_script_in_deno_json at line 53 do not propagate their exit status, so
if these functions fail (e.g., due to missing Node.js/Deno or JSON parse
errors), the command substitution still succeeds with empty/invalid output and
the subsequent conditional checks cannot detect the failure. Add exit status
checks immediately after each command substitution assignment to ensure that if
is_script_in_package_json or is_script_in_deno_json fails, the script exits or
returns early before proceeding to the conditional logic.

In `@zshenv`:
- Line 20: The HOMEBREW_CASK_OPTS export with the --no-quarantine flag is
disabling macOS quarantine checks globally for all cask installations, which
weakens system security. Remove the entire export
HOMEBREW_CASK_OPTS="--no-quarantine" line from the zshenv file. If the
no-quarantine flag is needed for specific cask installations in the future, it
should be applied on a per-command basis using the flag directly in individual
install commands rather than as a global environment variable setting.
- Line 21: The NULLCMD=bat export in the zshenv file affects all zsh invocations
including non-interactive scripts, which causes unexpected behavior. Remove the
line `export NULLCMD=bat` from the zshenv file and add it instead to the zshrc
file, which zsh automatically sources only for interactive shells. This ensures
the NULLCMD setting only applies to interactive shell sessions and not to script
executions.

In `@zshrc`:
- Around line 27-31: The unquoted `$realpath` variable in the fzf-tab preview
commands on lines 27, 28, 30, and 31 (in both the eza and ls preview strings for
cd and __zoxide_z completions) will break when directory paths contain spaces.
Replace all instances of `$realpath` with `${(Q)realpath}` to properly handle
paths with spaces using Zsh's parameter expansion quoting flag. This applies to
the fzf-preview values in all four zstyle lines for both the if branch (eza
commands) and else branch (ls commands).
- Around line 47-49: The eval commands for zoxide init and fzf are running
unconditionally, causing startup failures when these binaries are missing. Wrap
the eval statements that initialize zoxide (the line with zoxide init zsh) and
fzf (the line with fzf --zsh) with conditional checks that verify each command
exists before executing the eval. Use conditional statements to check if the
binaries are available in the PATH, and only proceed with initialization if they
are found, allowing the shell to start gracefully when optional tools are not
installed.

In `@zshrc.bak`:
- Line 7: The curl command on line 7 that pipes remote content directly to bash
(curl | bash) is a security risk and should be avoided. Instead, download the
install script from the zinit repository to a temporary file first, then execute
it separately. This allows for inspection and verification of the script before
execution, reducing supply-chain security risks. Replace the piped curl command
with a two-step approach: first download the install.sh script to a temporary
location, then execute that local script file.

---

Nitpick comments:
In `@zsh/aliases.zsh`:
- Around line 88-89: The command substitutions in both the glm and glolsm
functions are already properly quoted with double quotes around
$(get_default_branch), which correctly prevents unexpected word splitting.
Additionally, the $_git_log_pretty variable is also properly quoted. No changes
are needed as the current implementation already follows defensive quoting best
practices.

In `@zsh/functions/autoload/cl`:
- Line 9: In the cl function, replace `builtin cd` with plain `cd` or `z` to
allow the zoxide alias (set in zsh/aliases.zsh line 10) to take effect and
properly track directory visits. The current use of `builtin cd` explicitly
bypasses the alias, preventing zoxide integration for directories accessed
through this autoload function.

In `@zsh/functions/autoload/gmove`:
- Line 11: The current git stash command using $(git diff --staged --name-only)
will fail when staged filenames contain spaces because the expansion produces
space-separated arguments that are incorrectly parsed. Fix this by using a
null-delimited approach with the -z flag on git diff and piping through xargs
with -0 to properly handle filenames with spaces, or alternatively build an
array of filenames using the array syntax and pass the array to git stash to
preserve spaces in individual filenames. Either approach will safely handle the
file list passed to the git stash command.

In `@zsh/functions/autoload/kebabify`:
- Around line 15-16: The kebabify function currently applies the kebab-case
transformation to the entire filename path, which causes the mv command to fail
when the directory structure doesn't exist as specified. Extract the directory
and basename separately using dirname and basename functions before applying the
sed and tr transformations only to the basename portion. After transforming only
the basename, reconstruct the full path by prepending the original directory,
then use this properly constructed path in the mv command to ensure the file is
moved to the correct location within its original directory structure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ed06ec67-7328-4479-b7af-c5e888c7c64d

📥 Commits

Reviewing files that changed from the base of the PR and between 41ac840 and 198c6db.

📒 Files selected for processing (25)
  • .gitmodules
  • Brewfile
  • README.md
  • dotbot
  • install
  • install.conf.yaml
  • links.conf
  • p10k.zsh
  • setup_node.zsh
  • setup_zsh.zsh
  • zsh/aliases.zsh
  • zsh/functions/autoload/cl
  • zsh/functions/autoload/get_package_manager
  • zsh/functions/autoload/gmove
  • zsh/functions/autoload/is_script_in_deno_json
  • zsh/functions/autoload/is_script_in_package_json
  • zsh/functions/autoload/kebabify
  • zsh/functions/autoload/killport
  • zsh/functions/autoload/list_deno_tasks
  • zsh/functions/autoload/list_scripts_in_package_json
  • zsh/functions/autoload/mkcd
  • zsh/functions/autoload/run
  • zshenv
  • zshrc
  • zshrc.bak
💤 Files with no reviewable changes (5)
  • .gitmodules
  • install.conf.yaml
  • setup_node.zsh
  • dotbot
  • p10k.zsh

Comment thread setup_zsh.zsh
Comment thread zsh/aliases.zsh Outdated
Comment thread zsh/functions/autoload/gmove Outdated
Comment thread zsh/functions/autoload/is_script_in_package_json Outdated
Comment thread zsh/functions/autoload/list_deno_tasks Outdated
Comment thread zshenv Outdated
Comment thread zshenv Outdated
Comment thread zshrc Outdated
Comment thread zshrc Outdated
Comment thread zshrc.bak

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

🧹 Nitpick comments (1)
zsh/functions/autoload/gmove (1)

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

Redundant deleted-file handling after git add -A.

git add -A already stages deletions, so by the time line 13 runs, git ls-files --deleted (files tracked in the index but missing from the working tree) returns empty, the [[ -z … ]] test is true, and git rm never executes. The brace group is effectively a no-op and can be dropped.

As a side note, were this block ever reachable, git rm $(git ls-files --deleted) would also misbehave in zsh, where command substitution isn't word-split by default—multiple deleted files would be passed as a single argument.

♻️ Proposed simplification
   git stash -- $(git diff --staged --name-only) &&
   git add -A &&
-  { [[ -z "$(git ls-files --deleted)" ]] || git rm $(git ls-files --deleted) 2>/dev/null } &&
   git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]" &&
🤖 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 `@zsh/functions/autoload/gmove` around lines 12 - 14, The deleted-file cleanup
in gmove is redundant because `git add -A` already stages removals, so the `git
ls-files --deleted`/`git rm` brace group never does anything. Remove that no-op
block from the `gmove` command and keep the flow from `git add -A` directly to
`git commit`, using the existing `git commit` step as the reference point for
where the simplification should occur.
🤖 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 `@zsh/functions/autoload/gmove`:
- Around line 12-14: The deleted-file cleanup in gmove is redundant because `git
add -A` already stages removals, so the `git ls-files --deleted`/`git rm` brace
group never does anything. Remove that no-op block from the `gmove` command and
keep the flow from `git add -A` directly to `git commit`, using the existing
`git commit` step as the reference point for where the simplification should
occur.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d026ee30-b53f-4772-bca6-46f18f78adfa

📥 Commits

Reviewing files that changed from the base of the PR and between 3c3baa4 and 6f237eb.

📒 Files selected for processing (7)
  • setup_zsh.zsh
  • zsh/aliases.zsh
  • zsh/functions/autoload/gmove
  • zsh/functions/autoload/is_script_in_package_json
  • zsh/functions/autoload/run
  • zshenv
  • zshrc
💤 Files with no reviewable changes (1)
  • zshenv
🚧 Files skipped from review as they are similar to previous changes (5)
  • zsh/functions/autoload/is_script_in_package_json
  • setup_zsh.zsh
  • zsh/aliases.zsh
  • zsh/functions/autoload/run
  • zshrc

edouardmisset and others added 18 commits June 29, 2026 16:43
- Implemented `cl` to change directory and list contents.
- Added `get_package_manager` to detect the package manager in use.
- Add `gmove` to move staged changes to a new branch.
- Introduced `is_script_in_deno_json` to check for scripts in deno.json.
- Added `is_script_in_package_json` to verify scripts in package.json.
- Implemented `kebabify` to rename files to kebab-case.
- Created `killport` to terminate processes listening on a specified port.
- Developed `list_deno_tasks` to list available Deno tasks.
- Added `list_scripts_in_package_json` to list available npm scripts.
- Implemented `mkcd` to create a directory and change into it.
- Developed `run` to execute npm/yarn/pnpm/deno scripts with automatic detection.
- Refactored zshrc to autoload new functions for faster startup.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
Brewfile (1)

292-293: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the duplicate typescriptteam.native-preview entry.
Keeping the Brewfile de-duplicated avoids unnecessary noise in the config.

🤖 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 `@Brewfile` around lines 292 - 293, The Brewfile contains a duplicate vscode
entry for typescriptteam.native-preview, so remove the repeated line and keep
only one instance of that package entry. Make the change in the Brewfile section
that lists vscode packages, ensuring the config remains de-duplicated and
unchanged otherwise.
🤖 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.

Inline comments:
In `@Brewfile`:
- Around line 1-5: The Brewfile entry for xykong’s cask needs an explicit trust
declaration to avoid unattended bundle installs being blocked on trust-enforced
machines. Update the existing cask entry for flux-markdown to include trusted:
true, and keep the change localized to the Brewfile item identified by
xykong/tap/flux-markdown.

---

Nitpick comments:
In `@Brewfile`:
- Around line 292-293: The Brewfile contains a duplicate vscode entry for
typescriptteam.native-preview, so remove the repeated line and keep only one
instance of that package entry. Make the change in the Brewfile section that
lists vscode packages, ensuring the config remains de-duplicated and unchanged
otherwise.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0e6b36a-d535-4ae8-a059-8a4b0f90ca22

📥 Commits

Reviewing files that changed from the base of the PR and between 6f237eb and 4cf6942.

📒 Files selected for processing (25)
  • .gitmodules
  • Brewfile
  • README.md
  • dotbot
  • install
  • install.conf.yaml
  • links.conf
  • p10k.zsh
  • setup_node.zsh
  • setup_zsh.zsh
  • zsh/aliases.zsh
  • zsh/functions/autoload/cl
  • zsh/functions/autoload/get_package_manager
  • zsh/functions/autoload/gmove
  • zsh/functions/autoload/is_script_in_deno_json
  • zsh/functions/autoload/is_script_in_package_json
  • zsh/functions/autoload/kebabify
  • zsh/functions/autoload/killport
  • zsh/functions/autoload/list_deno_tasks
  • zsh/functions/autoload/list_scripts_in_package_json
  • zsh/functions/autoload/mkcd
  • zsh/functions/autoload/run
  • zshenv
  • zshrc
  • zshrc.bak
💤 Files with no reviewable changes (5)
  • .gitmodules
  • dotbot
  • install.conf.yaml
  • setup_node.zsh
  • p10k.zsh
✅ Files skipped from review due to trivial changes (4)
  • zsh/functions/autoload/is_script_in_deno_json
  • zsh/functions/autoload/get_package_manager
  • links.conf
  • README.md
🚧 Files skipped from review as they are similar to previous changes (15)
  • zsh/functions/autoload/killport
  • zsh/functions/autoload/is_script_in_package_json
  • zsh/functions/autoload/kebabify
  • zsh/functions/autoload/mkcd
  • zsh/functions/autoload/cl
  • zsh/functions/autoload/list_deno_tasks
  • zsh/functions/autoload/list_scripts_in_package_json
  • setup_zsh.zsh
  • zsh/functions/autoload/gmove
  • zsh/aliases.zsh
  • zsh/functions/autoload/run
  • install
  • zshrc
  • zshrc.bak
  • zshenv

Comment thread Brewfile
Comment on lines +1 to +5
tap "anomalyco/tap"
tap "can1357/tap"
tap "libsql/sqld"
tap "oven-sh/bun"
tap "xykong/tap"

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Brewfile locations ==\n'
git ls-files Brewfile setup_homebrew.zsh

printf '\n== Brewfile around reported lines ==\n'
sed -n '1,220p' Brewfile | cat -n

printf '\n== setup_homebrew.zsh ==\n'
sed -n '1,120p' setup_homebrew.zsh | cat -n

printf '\n== Search for trusted/duplicate related entries ==\n'
rg -n 'trusted:\s*true|xykong/tap/flux-markdown|typescriptteam\.native-preview|can1357/tap/omp|brew bundle' Brewfile setup_homebrew.zsh

Repository: edouardmisset/dotfiles

Length of output: 9269


🌐 Web query:

Homebrew Bundle trusted true cask tap docs duplicate entries Brewfile behavior

💡 Result:

In Homebrew Bundle, Brewfile entries are evaluated as Ruby, and the behavior regarding duplicate entries and the trusted: true option is as follows: Duplicate Entries: Brewfile entries are generally processed in the order they appear [1][2]. While Homebrew Bundle does not have a strict "deduplication" policy that prevents multiple entries from existing in the file, it typically handles them by attempting to install or reference the specified formulae/casks sequentially. In practice, if you have duplicate brew "name" or cask "name" entries, Homebrew will simply attempt to ensure the package is in the desired state multiple times [3][1]. Because Brewfiles are evaluated as Ruby, you can use standard Ruby logic (e.g., conditional statements or arrays) to prevent or manage duplicates dynamically if desired [1][2]. Trusted: true Option: The trusted: true option allows you to declaratively trust a non-official tap, formula, or cask within your Brewfile [1][4]. This is intended to satisfy Homebrew’s tap trust requirements without needing to run the brew trust command manually [4]. Key behaviors of trusted: true include: 1. Declarative Trust: When trusted: true is set for a tap, brew, or cask entry, Homebrew registers that item as trusted before performing installation or conflict checks [1][5]. This ensures the installation process does not fail due to untrusted tap warnings [5][6]. 2. Dump and Cleanup: When you run brew bundle dump, Homebrew automatically writes trusted: true for any entries that are already trusted on your system [1]. When you run brew bundle cleanup --force, Homebrew resets its internal trust store to match the declarations in your Brewfile, removing any trust entries not explicitly defined there [1][6]. 3. Granularity: Official documentation recommends preferring item-level trust (e.g., specific brew or cask entries) over whole-tap trust whenever possible [1][4]. If you trust only a specific item, Homebrew may load that item without requiring you to trust the entire repository [4]. For complex setups, Homebrew may also generate tap-level trusted: { ... } hashes in your Brewfile to manage partial trust for specific items from a tap [6].

Citations:


🌐 Web query:

site:docs.brew.sh Brewfile trusted true cask Homebrew Bundle duplicate entries

💡 Result:

In a Homebrew Brewfile, the trusted: true option is used to declaratively trust a non-official tap, formula, or cask, allowing Homebrew to load or install them even when tap trust is required [1]. Regarding the handling of duplicate entries in a Brewfile: 1. Behavior: Homebrew Bundle processes entries in the order they appear in the Brewfile. If you list the same formula or cask multiple times, Homebrew generally attempts to process them sequentially [2]. 2. trusted: true application: When using trusted: true, Homebrew Bundle applies the trust status to the specified entry [1]. If multiple lines for the same cask exist, each line is treated as an individual entry by the Homebrew::Bundle::Dsl [3]. It is recommended to keep your Brewfile clean and avoid duplicate declarations to ensure consistent behavior and predictable results during installation and brew bundle cleanup [1]. 3. brew bundle dump: When you run brew bundle dump, Homebrew automatically writes trusted: true for any cask or formula that is currently trusted in your local Homebrew configuration [1][4]. It does not inherently clean up or merge duplicate manual entries; it simply reflects the current state of your installed packages and their trust status [1]. If you find duplicate entries in your Brewfile, it is best practice to consolidate them into a single line, such as cask "example", trusted: true, to avoid potential configuration conflicts [1].

Citations:


Add trusted: true to cask "xykong/tap/flux-markdown" in Brewfile. Non-official taps/casks can block unattended brew bundle installs on machines that enforce tap trust, and this entry is currently the only one without an explicit trust declaration.

🤖 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 `@Brewfile` around lines 1 - 5, The Brewfile entry for xykong’s cask needs an
explicit trust declaration to avoid unattended bundle installs being blocked on
trust-enforced machines. Update the existing cask entry for flux-markdown to
include trusted: true, and keep the change localized to the Brewfile item
identified by xykong/tap/flux-markdown.

@edouardmisset
edouardmisset merged commit cde69b9 into main Jul 10, 2026
1 check passed
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.

1 participant