Skip to content

Random improvements#100

Merged
kdeal merged 2 commits into
mainfrom
push-yskyqttmsxll
Jun 29, 2026
Merged

Random improvements#100
kdeal merged 2 commits into
mainfrom
push-yskyqttmsxll

Conversation

@kdeal

@kdeal kdeal commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added a new cmd-install command with a --list option, improved default configuration handling, and clearer status output.
    • Added shell completion support for the new command and updated terminal/editor settings to better match local tooling.
    • Added new configuration for a project workspace tool, including defaults for identity, UI, and common shortcuts.
  • Bug Fixes

    • Updated automation and setup steps to use the new command name consistently.
    • Improved local PATH setup and ignored generated config directories to reduce setup friction.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The pull request migrates the tool installer from scripts/cmd_install.py to bin/cmd-install with a standard Python shebang. The new binary moves its default config to ~/.config/cmd_install/config.toml, redirects all log output to stderr, makes the commands argument optional, and adds a --list flag that prints available command names. All invocation sites (CI, Buildkite, setup, devenv.fish, justfile) are updated accordingly. The setup script gains logic to symlink bin/ entries into ~/.local/bin/, and config.fish prepends that directory to Fish's PATH. The old Fish cmd_install function and its completion are removed; a new cmd-install.fish completion file is added. Tests are updated to load from bin/cmd-install via SourceFileLoader. A new xdg_config/jj/config.toml is added with user identity, commit template, and UI settings. Minor Ghostty and Neovim plugin config changes are also included.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • kdeal/cs-dotfiles#92: Directly precedes this PR — introduces the Python-based scripts/cmd_install.py with TOML config that this PR replaces with bin/cmd-install.
  • kdeal/cs-dotfiles#94: Adds fish install support and SHA verification tests to scripts/cmd_install.py, the same test infrastructure this PR migrates to load from bin/cmd-install.
  • kdeal/cs-dotfiles#95: Updates CI and justfile to use scripts/cmd_install.py for tool installs — the exact call sites this PR switches to bin/cmd-install.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 too vague and does not describe the main change in the changeset. Rename it to a concise, specific summary such as “Rename cmd_install to cmd-install and update dotfiles tooling.”
✅ 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 push-yskyqttmsxll

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9c489911e8

ℹ️ 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".

Comment thread setup Outdated

if [ ! -f "$HOME/.local/bin/fish" ]; then
python $HERE/scripts/cmd_install.py fish
python3 $HERE/scripts/cmd_install.py fish

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update setup to call the moved installer

On a fresh HOME where ~/.local/bin/fish does not exist, this branch is taken, but scripts/cmd_install.py was deleted in the same commit, so setup exits before installing fish. Point this at bin/cmd-install or the symlink created above instead.

Useful? React with 👍 / 👎.

Comment thread bin/cmd-install

Python port of `xdg_config/fish/functions/cmd_install.fish`.
"""
#!/usr/bin/env python3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the old cmd_install entry point for devenv

This commit removes the cmd_install fish function and only adds the cmd-install executable, but xdg_config/fish/functions/devenv.fish:35 still invokes cmd_install $packages; in shells loaded from these dotfiles, running devenv now hits fish's unknown-command path instead of installing packages. Keep an alias/function or update that call to cmd-install.

Useful? React with 👍 / 👎.

@kdeal
kdeal force-pushed the push-yskyqttmsxll branch 2 times, most recently from 0513f1d to acc4a02 Compare June 28, 2026 22:19

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: acc4a02ea3

ℹ️ 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".

@@ -25,18 +24,15 @@ return {
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use blink.cmp's enabled option

When editing Markdown, this callback is ignored because blink.cmp validates the top-level option as enabled, not enable (see its v1 config source: https://github.com/Saghen/blink.cmp/blob/v1.10.2/lua/blink/cmp/config/init.lua). As a result, completion remains enabled in Markdown buffers and blink reports enable as an unexpected config field instead of applying this disable rule.

Useful? React with 👍 / 👎.

kdeal added 2 commits June 29, 2026 02:09
- Add jj config. I basically always use it instead of git, so I should
  have some config for it.
- Add `.jj` directory to global git ignore
- Add `.jj` to auto_root
- Fix cmd_install fish by using python3. Not all os alias python to
  python3
- Add ~/.local/bin/ to path
- Increase ghostty scrollback
- Disable tab inherit directory in ghostty
- Remove copilot, since I don't use it anymore
- Disable cmp on Markdown files, it was getting pretty annoying. Maybe I
  should do that for git commit too
- Use nvim_notify in db_ui
- Move config to be in .config by placing in xdg_config
- Move the script to a bin directory and give it a shbang and make it
  executable
- Delete the fish cmd_install and rely on this instead
- Update the cmd_install completion to get the commands from the config
  file
@kdeal
kdeal force-pushed the push-yskyqttmsxll branch from acc4a02 to b18611c Compare June 29, 2026 02:10

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b18611c7c1

ℹ️ 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".

Comment thread bin/cmd-install

Python port of `xdg_config/fish/functions/cmd_install.fish`.
"""
#!/usr/bin/env python3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the Python version guard for cmd-install

When devenv or a direct cmd-install call runs on a host where python3 is still 3.10 or 3.11, this new shebang bypasses the deleted uv script metadata that required a modern interpreter: Python 3.10 aborts on tomllib, and Python 3.11 fails every archive install at tempfile.TemporaryDirectory(delete=False). Since the removed fish function did not depend on Python, keep the uv runner/metadata or otherwise gate the executable to a supported Python before routing users through it.

Useful? React with 👍 / 👎.

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

Actionable comments posted: 4

🤖 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 `@bin/cmd-install`:
- Around line 843-850: Move the empty-command no-op check in cmd-install before
load_config() so the tool exits cleanly when args.commands is empty even if no
default config exists. Update the main command flow in the cmd-install
entrypoint to handle the “no positional commands” case first, then only call
load_config() and proceed with commands_cfg when there is at least one command
to install.

In `@setup`:
- Around line 16-17: Make the symlink creation in the setup script idempotent:
the current `ls bin | xargs ... ln -s` flow will fail on reruns when a target in
`$HOME/.local/bin` already exists. Update the bin-linking step to use a safe
replace-or-skip behavior so rerunning the script does not abort under `set -e`,
and keep the fix localized to the symlink creation logic.

In `@xdg_config/fish/functions/devenv.fish`:
- Line 35: The devenv launcher currently calls cmd-install directly, which
breaks existing installs when the new binary has not been bootstrapped yet.
Update the fish function devenv to preserve compatibility by falling back to the
legacy cmd_install path or otherwise ensuring the installer entrypoint is
available before invoking it, so existing users can still run devenv after
pulling this change.

In `@xdg_config/nvim/lua/plugins/dadbod.lua`:
- Around line 14-16: Move the Dadbod UI global setup out of the plugin’s config
callback and into its init phase so it is applied before `vim-dadbod-ui` loads.
Update the `dadbod` plugin spec to set `vim.g.db_ui_use_nvim_notify` in `init`
instead of `config`, keeping the change localized to the
`vim.g.db_ui_use_nvim_notify` assignment.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6b437e9-5696-472e-af63-c9d001629602

📥 Commits

Reviewing files that changed from the base of the PR and between c384908 and b18611c.

📒 Files selected for processing (20)
  • .buildkite/pipeline.yml
  • .github/workflows/ci.yml
  • .gitignore
  • bin/cmd-install
  • justfile
  • setup
  • tests/test_cmd_install.py
  • tests/test_verify_cmd_install_shas.py
  • xdg_config/cmd_install/config.toml
  • xdg_config/fish/completions/cmd-install.fish
  • xdg_config/fish/completions/cmd_install.fish
  • xdg_config/fish/config.fish
  • xdg_config/fish/functions/cmd_install.fish
  • xdg_config/fish/functions/devenv.fish
  • xdg_config/ghostty/config
  • xdg_config/git/gitignore
  • xdg_config/jj/config.toml
  • xdg_config/nvim/lua/plugins/cmp.lua
  • xdg_config/nvim/lua/plugins/dadbod.lua
  • xdg_config/nvim/lua/plugins/mini.lua
💤 Files with no reviewable changes (2)
  • xdg_config/fish/completions/cmd_install.fish
  • xdg_config/fish/functions/cmd_install.fish

Comment thread bin/cmd-install
Comment on lines +843 to +850
if args.list:
for command in commands_cfg.keys():
print(command)
return 0

if not args.commands:
log_warning("no commands specified, doing nothing...")
return 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Check for an empty command list before loading the config.

Running cmd-install with no positional commands still executes load_config() first, so a missing default config exits with an error instead of reaching the new no-op path. That undermines the newly optional commands behavior on a fresh machine.

Proposed fix
 def main() -> int:
     args = parse_args()
+
+    if not args.commands and not args.list:
+        log_warning("no commands specified, doing nothing...")
+        return 0
 
     try:
         log_info(f"Loading config from {args.config}")
         commands_cfg = load_config(args.config)
     except ConfigError as exc:
         log_error(f"Config error: {exc}")
         return 1
 
     if args.list:
         for command in commands_cfg.keys():
             print(command)
         return 0
-
-    if not args.commands:
-        log_warning("no commands specified, doing nothing...")
-        return 0
🤖 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 `@bin/cmd-install` around lines 843 - 850, Move the empty-command no-op check
in cmd-install before load_config() so the tool exits cleanly when args.commands
is empty even if no default config exists. Update the main command flow in the
cmd-install entrypoint to handle the “no positional commands” case first, then
only call load_config() and proceed with commands_cfg when there is at least one
command to install.

Comment thread setup
Comment on lines +16 to +17
mkdir -p $HOME/.local/bin
ls bin | xargs -I+ ln -s "$HERE/bin/+" $HOME/.local/bin/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Make the bin/ symlink step idempotent.

Line 17 will abort every rerun once any ~/.local/bin/* link already exists, because ln -s returns EEXIST and set -e stops the script before the remaining setup runs.

Suggested fix
-mkdir -p $HOME/.local/bin
-ls bin | xargs -I+ ln -s "$HERE/bin/+" $HOME/.local/bin/
+mkdir -p "$HOME/.local/bin"
+for file in "$HERE"/bin/*; do
+    ln -sfn "$file" "$HOME/.local/bin/$(basename "$file")"
+done
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mkdir -p $HOME/.local/bin
ls bin | xargs -I+ ln -s "$HERE/bin/+" $HOME/.local/bin/
mkdir -p "$HOME/.local/bin"
for file in "$HERE"/bin/*; do
ln -sfn "$file" "$HOME/.local/bin/$(basename "$file")"
done
🤖 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 `@setup` around lines 16 - 17, Make the symlink creation in the setup script
idempotent: the current `ls bin | xargs ... ln -s` flow will fail on reruns when
a target in `$HOME/.local/bin` already exists. Update the bin-linking step to
use a safe replace-or-skip behavior so rerunning the script does not abort under
`set -e`, and keep the fix localized to the symlink creation logic.


printf "Installing packages for the %s$env%s environment (%s$packages%s)\n" (set_color green) (set_color normal) (set_color yellow) (set_color normal)
cmd_install $packages
cmd-install $packages

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve an upgrade path for existing installs.

Line 35 assumes cmd-install is already on PATH, but this PR also removes the old cmd_install function and only creates the replacement binary when setup is rerun. After pulling the change, devenv becomes command not found for anyone who has not re-bootstrapped yet.

🤖 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 `@xdg_config/fish/functions/devenv.fish` at line 35, The devenv launcher
currently calls cmd-install directly, which breaks existing installs when the
new binary has not been bootstrapped yet. Update the fish function devenv to
preserve compatibility by falling back to the legacy cmd_install path or
otherwise ensuring the installer entrypoint is available before invoking it, so
existing users can still run devenv after pulling this change.

Comment on lines +14 to +16
config = function()
vim.g.db_ui_use_nvim_notify = 1
end,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n[File under review]\n'
cat -n xdg_config/nvim/lua/plugins/dadbod.lua

printf '\n[Search for db_ui_use_nvim_notify]\n'
rg -n "db_ui_use_nvim_notify|nvim_notify|db_ui_" xdg_config/nvim -S

printf '\n[Search for dadbod plugin spec patterns]\n'
rg -n "vim-dadbod-ui|dadbod" xdg_config/nvim/lua -S

Repository: kdeal/cs-dotfiles

Length of output: 1510


🌐 Web query:

lazy.nvim init vs config plugin option timing vim-dadbod-ui db_ui_use_nvim_notify README

💡 Result:

In lazy.nvim, the init and config options serve different purposes based on the plugin's loading lifecycle [1][2]. The init function is executed during Neovim startup for every plugin entry, regardless of whether the plugin is lazy-loaded or when it actually loads [1][3][4]. It is primarily intended for setting global configuration variables (e.g., vim.g.*) that the plugin requires during its own initialization process [1][2]. The config function is executed only when the plugin is actually loaded [5][1][2]. If you use the opts option, lazy.nvim automatically handles the configuration by calling the plugin's setup function (typically require('module').setup(opts)), which is the recommended approach over manually writing a config function [1][2][6]. For vim-dadbod-ui, the setting g:db_ui_use_nvim_notify = 1 is a global variable that configures the plugin's notification behavior [7][8]. Because it is a global variable, it should be set within an init function to ensure it is defined before the plugin loads [9][10][4]. To integrate vim-dadbod-ui with nvim-notify, follow these steps: 1. Configure the global variable using init in the vim-dadbod-ui spec [9][10]. 2. Redirect Neovim's notification API to nvim-notify, typically in the nvim-notify plugin spec [8]. Example configuration: { 'kristijanhusak/vim-dadbod-ui', init = function -- Set global variable before the plugin loads vim.g.db_ui_use_nvim_notify = 1 end, }, { 'rcarriga/nvim-notify', config = function -- Redirect vim.notify to nvim-notify vim.notify = require('notify') end, } This separation ensures the global configuration is ready when vim-dadbod-ui initializes, while the notification override is applied correctly when the notify plugin loads [8][4].

Citations:


Move this Dadbod UI global to init. vim.g.db_ui_use_nvim_notify needs to be set before vim-dadbod-ui loads; config runs too late here, so the plugin can miss the option.

Suggested change
-        config = function()
+        init = function()
             vim.g.db_ui_use_nvim_notify = 1
         end,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
config = function()
vim.g.db_ui_use_nvim_notify = 1
end,
init = function()
vim.g.db_ui_use_nvim_notify = 1
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 `@xdg_config/nvim/lua/plugins/dadbod.lua` around lines 14 - 16, Move the Dadbod
UI global setup out of the plugin’s config callback and into its init phase so
it is applied before `vim-dadbod-ui` loads. Update the `dadbod` plugin spec to
set `vim.g.db_ui_use_nvim_notify` in `init` instead of `config`, keeping the
change localized to the `vim.g.db_ui_use_nvim_notify` assignment.

@kdeal
kdeal merged commit 40d93e8 into main Jun 29, 2026
3 checks passed
@kdeal
kdeal deleted the push-yskyqttmsxll branch June 29, 2026 02:22
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