feat: add LM Studio integration and update AI tooling - #305
Conversation
…; remove "opencode" from casks
…ng function descriptions
📝 WalkthroughSummary by CodeRabbit
WalkthroughConfiguration updates to support LMStudio as a model provider with gpt-oss-120b and qwen3-coder-30b profiles, refactored Fish shell abbreviations and functions, relocated opencode and added gemini-cli as Linux-only packages, and added Blender to macOS Homebrew casks. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Changes are largely configuration updates and straightforward function renames with consistent patterns. Fish function logic modifications are minimal and repetitive (similar structure across multiple files). Platform-conditional packaging changes are self-contained. Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the local AI development environment by integrating LM Studio for local model serving and updating existing AI tooling configurations. It also streamlines package management by adding new tools and improving the organization of existing ones, alongside expanding the available Homebrew applications. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the AI tooling setup by adding LM Studio as a local model provider and refactoring Fish shell functions for better Claude Code and Codex interactions. It also expands the package selection with new AI tools and 3D modeling capabilities.
- Add LM Studio integration with local model profiles (gpt-oss-120b, qwen3-coder-30b)
- Refactor Fish shell abbreviations to distinguish between Claude Code and Codex operations
- Include new packages (gemini-cli, opencode) and Blender for enhanced development capabilities
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| nix-darwin/config/homebrew.nix | Adds Blender cask for 3D modeling |
| home-manager/programs/fish/functions/_coxel_function.fish | New function for Codex with local gpt-oss:120b model |
| home-manager/programs/fish/functions/_coxe_function.fish | Renamed function for standard Codex operations |
| home-manager/programs/fish/functions/_clxe_function.fish | Updated to use Claude Code instead of Codex |
| home-manager/programs/fish/default.nix | Updated abbreviations mapping |
| home-manager/packages/default.nix | Reorganized packages and added gemini-cli |
| home-manager/modules/codex/config.toml | Added LM Studio provider and updated model profiles |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces an integration for LM Studio as a model provider, updates several Fish shell functions for interacting with AI tools, and reorganizes some packages. The changes are generally good, but I've found a few areas for improvement in the shell functions to enhance maintainability and fix a small inconsistency. Specifically, I've suggested refactoring to reduce code duplication in two functions and pointed out an outdated comment in another.
| if test (count $argv) -eq 0 | ||
| codex --profile 'gpt-oss-120b' --full-auto -c model_reasoning_summary_format=experimental | ||
| claude code --dangerously-skip-permissions | ||
| else | ||
| set -l prompt (string join " " -- $argv) | ||
| codex --profile 'gpt-oss-120b' --full-auto -c model_reasoning_summary_format=experimental -- "$prompt" | ||
| claude code --dangerously-skip-permissions --print -- "$prompt" | ||
| end |
There was a problem hiding this comment.
This if/else block has some code duplication. You can refactor it to be more concise and maintainable by building the argument list dynamically. This avoids repeating the base command.
set -l cmd_args --dangerously-skip-permissions
if test (count $argv) > 0
set -a cmd_args --print -- (string join " " -- $argv)
end
claude code $cmd_args
| @@ -1,4 +1,4 @@ | |||
| function _cxe_function --description "Run Codex with a free-form prompt" | |||
| function _coxe_function --description "Run Codex with a free-form prompt" | |||
| if test (count $argv) -eq 0 | ||
| codex --profile 'gpt-oss-120b' --full-auto -c model_reasoning_summary_format=experimental | ||
| else | ||
| set -l prompt (string join " " -- $argv) | ||
| codex --profile 'gpt-oss-120b' --full-auto -c model_reasoning_summary_format=experimental -- "$prompt" | ||
| end |
There was a problem hiding this comment.
This if/else block contains duplicated command arguments. To improve maintainability, you can build the arguments list dynamically. This makes the code cleaner and easier to modify in the future.
set -l cmd_args --profile 'gpt-oss-120b' --full-auto -c model_reasoning_summary_format=experimental
if test (count $argv) > 0
set -a cmd_args -- (string join " " -- $argv)
end
codex $cmd_args
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (7)
home-manager/modules/codex/config.toml(2 hunks)home-manager/packages/default.nix(1 hunks)home-manager/programs/fish/default.nix(1 hunks)home-manager/programs/fish/functions/_clxe_function.fish(1 hunks)home-manager/programs/fish/functions/_coxe_function.fish(1 hunks)home-manager/programs/fish/functions/_coxel_function.fish(1 hunks)nix-darwin/config/homebrew.nix(1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.nix
📄 CodeRabbit inference engine (CLAUDE.md)
Format all Nix files with nixfmt
**/*.nix: Nix: Use 2 spaces for indentation
Nix: Keep line length under 100 characters
Nix: Sort attribute sets alphabetically
Nix: Use consistent spacing around operators
Nix: Format lists and sets consistentlyFollow the Nix expression language style guide
Files:
nix-darwin/config/homebrew.nixhome-manager/programs/fish/default.nixhome-manager/packages/default.nix
nix-darwin/**
📄 CodeRabbit inference engine (CLAUDE.md)
Use Homebrew only for macOS-specific applications within nix-darwin configs
Keep Darwin-specific configurations under nix-darwin/
Files:
nix-darwin/config/homebrew.nix
**/default.nix
📄 CodeRabbit inference engine (CLAUDE.md)
Use default.nix files for module exports
Files:
home-manager/programs/fish/default.nixhome-manager/packages/default.nix
home-manager/**
📄 CodeRabbit inference engine (.cursor/rules/general.mdc)
Keep home-manager configurations under home-manager/
Files:
home-manager/programs/fish/default.nixhome-manager/programs/fish/functions/_clxe_function.fishhome-manager/programs/fish/functions/_coxe_function.fishhome-manager/packages/default.nixhome-manager/programs/fish/functions/_coxel_function.fishhome-manager/modules/codex/config.toml
home-manager/programs/*/default.nix
📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)
home-manager/programs/*/default.nix: Program configurations must be located in home-manager/programs// with configuration in default.nix
Program configurations should prefer Home Manager’s built-in modules when available
Program configurations should include all necessary dependencies
Program configurations should follow the provided template (programs..enable, package, and settings attrset)
Files:
home-manager/programs/fish/default.nix
home-manager/**/*.nix
📄 CodeRabbit inference engine (.cursor/rules/home-manager.mdc)
Use proper indentation and formatting in Nix files
Files:
home-manager/programs/fish/default.nixhome-manager/packages/default.nix
home-manager/programs/**/default.nix
📄 CodeRabbit inference engine (.cursor/rules/nix.mdc)
Program configurations in home-manager/programs should be organized by program name (one directory per program with a default.nix)
Files:
home-manager/programs/fish/default.nix
home-manager/programs/**/*.nix
📄 CodeRabbit inference engine (.cursor/rules/nix.mdc)
home-manager/programs/**/*.nix: Program configurations should include all necessary dependencies
Use home.packages for package installations in program configurations
Use programs. options provided by Home Manager when available
Files:
home-manager/programs/fish/default.nix
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: nix-nixos
- GitHub Check: nix-linux
- GitHub Check: e2e-run (MacOS, macos-latest)
- GitHub Check: e2e-run (Ubuntu, ubuntu-latest)
- GitHub Check: e2e-run (NixOS, ubuntu-latest)
- GitHub Check: nix-darwin
- GitHub Check: docker-build-push (linux/amd64, -amd64, amd64)
🔇 Additional comments (8)
nix-darwin/config/homebrew.nix (1)
39-39: LGTM! Blender cask added correctly.The Blender cask is properly positioned in alphabetical order and follows the guideline for using Homebrew for macOS applications.
home-manager/packages/default.nix (1)
67-75: LGTM! Cross-platform package management correctly implemented.The addition of
gemini-cliandopencodeto the Linux-specific block complements their Homebrew installation on macOS (as seen innix-darwin/config/homebrew.nix), providing proper cross-platform coverage.home-manager/modules/codex/config.toml (2)
11-13: LGTM! LM Studio provider configured correctly.The provider configuration uses the correct default LM Studio port (1234) and follows the same pattern as existing providers.
28-34: LGTM! Profiles updated to use LM Studio.Both the updated
gpt-oss-120bprofile and newqwen3-coder-30bprofile correctly reference thelmstudioprovider with appropriate model identifiers.home-manager/programs/fish/functions/_coxel_function.fish (1)
1-11: LGTM! Function implementation is correct.The function properly handles both no-argument and argument cases, correctly uses the
gpt-oss-120bprofile that references LM Studio, and includes appropriate experimental configuration.home-manager/programs/fish/functions/_clxe_function.fish (1)
1-11: LGTM! Successfully migrated to Claude Code.The function correctly updates from Codex to Claude Code, properly implements the
--dangerously-skip-permissionsflag, and adds thehome-manager/programs/fish/functions/_coxe_function.fish (1)
1-11: LGTM! Function logic preserved correctly.The function rename from
_cxe_functionto_coxe_functionmaintains all the original Codex invocation logic with thegpt-5-codexmodel.home-manager/programs/fish/default.nix (1)
53-54: LGTM! Shell abbreviations correctly updated.The new
coxeandcoxelabbreviations properly reference their corresponding function implementations, replacing the previouscxeabbreviation and providing distinct shortcuts for different Codex workflows.
| function _cxe_function --description "Run Codex with a free-form prompt" | ||
| function _coxe_function --description "Run Codex with a free-form prompt" | ||
| # Run Codex with a free-form prompt (spaces allowed) | ||
| # Usage: cxe [<prompt words...>] |
There was a problem hiding this comment.
Fix usage comment to match renamed function.
The usage comment still references the old name "cxe" but should be "coxe" to match the function rename and the shell abbreviation defined in home-manager/programs/fish/default.nix line 53.
Apply this diff:
- # Usage: cxe [<prompt words...>]
+ # Usage: coxe [<prompt words...>]📝 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.
| # Usage: cxe [<prompt words...>] | |
| # Usage: coxe [<prompt words...>] |
🤖 Prompt for AI Agents
In home-manager/programs/fish/functions/_coxe_function.fish around line 3, the
usage comment incorrectly references the old command name "cxe"; update that
comment to use "coxe" (e.g., change "# Usage: cxe [<prompt words...>]" to "#
Usage: coxe [<prompt words...>]") so it matches the renamed function and the
shell abbreviation defined in home-manager/programs/fish/default.nix line 53.
| @@ -0,0 +1,11 @@ | |||
| function _coxel_function --description "Run Codex with a free-form prompt using the local gpt-oss:120b model" | |||
| # Run Codex with a free-form prompt (spaces allowed) using the local gpt-oss:120b model | |||
| # Usage: cxel [<prompt words...>] | |||
There was a problem hiding this comment.
Fix usage comment typo.
The usage comment states "cxel" but should be "coxel" to match the function name and shell abbreviation defined in home-manager/programs/fish/default.nix line 54.
Apply this diff:
- # Usage: cxel [<prompt words...>]
+ # Usage: coxel [<prompt words...>]📝 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.
| # Usage: cxel [<prompt words...>] | |
| # Usage: coxel [<prompt words...>] |
🤖 Prompt for AI Agents
In home-manager/programs/fish/functions/_coxel_function.fish around line 3, the
usage comment mistakenly says "cxel"; update that comment to "coxel" so it
matches the function name and the shell abbreviation defined in
home-manager/programs/fish/default.nix line 54 — simply change the text in the
usage comment from "cxel" to "coxel".
There was a problem hiding this comment.
1 issue found across 7 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="home-manager/programs/fish/functions/_coxel_function.fish">
<violation number="1" location="home-manager/programs/fish/functions/_coxel_function.fish:3">
Update the usage comment to use "coxel" to match the function name and abbreviation; current "cxel" is inconsistent and may confuse users.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| @@ -0,0 +1,11 @@ | |||
| function _coxel_function --description "Run Codex with a free-form prompt using the local gpt-oss:120b model" | |||
| # Run Codex with a free-form prompt (spaces allowed) using the local gpt-oss:120b model | |||
| # Usage: cxel [<prompt words...>] | |||
There was a problem hiding this comment.
Update the usage comment to use "coxel" to match the function name and abbreviation; current "cxel" is inconsistent and may confuse users.
Prompt for AI agents
Address the following comment on home-manager/programs/fish/functions/_coxel_function.fish at line 3:
<comment>Update the usage comment to use "coxel" to match the function name and abbreviation; current "cxel" is inconsistent and may confuse users.</comment>
<file context>
@@ -0,0 +1,11 @@
+function _coxel_function --description "Run Codex with a free-form prompt using the local gpt-oss:120b model"
+ # Run Codex with a free-form prompt (spaces allowed) using the local gpt-oss:120b model
+ # Usage: cxel [<prompt words...>]
+
+ if test (count $argv) -eq 0
</file context>
| # Usage: cxel [<prompt words...>] | |
| # Usage: coxel [<prompt words...>] |
Summary
Summary by cubic
Adds LM Studio as a Codex provider and updates Fish aliases to streamline local model and Claude Code workflows. Also adds gemini-cli, opencode, and Blender.
New Features
Dependencies