Skip to content

feat: add LM Studio integration and update AI tooling - #305

Merged
shunkakinoki merged 4 commits into
mainfrom
lm-studio-branch
Oct 19, 2025
Merged

feat: add LM Studio integration and update AI tooling#305
shunkakinoki merged 4 commits into
mainfrom
lm-studio-branch

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Oct 19, 2025

Copy link
Copy Markdown
Owner

Summary

  • Add LM Studio as model provider in Codex configuration with local models
  • Update Fish shell functions for Claude Code and Codex interactions
  • Add new packages: gemini-cli and opencode; reorganize package ordering
  • Add Blender to Homebrew casks for 3D modeling capabilities

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

    • LM Studio provider in Codex config (http://127.0.0.1:1234/v1).
    • Switch gpt-oss-120b profile to LM Studio; add qwen3-coder-30b profile.
    • Fish aliases: clxe runs Claude Code with skipped permissions; new coxe for Codex prompts; new coxel for local gpt-oss:120b.
  • Dependencies

    • Add gemini-cli and opencode to packages.
    • Add Blender to Homebrew casks.

Copilot AI review requested due to automatic review settings October 19, 2025 11:53
@coderabbitai

coderabbitai Bot commented Oct 19, 2025

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added LMStudio model provider support with new AI model profiles (gpt-oss-120b and Qwen3-Coder-30b).
    • Integrated Claude Code tool into shell commands.
    • Added new shell abbreviations for enhanced code workflows.
  • Chores

    • Added Blender application to system packages.
    • Made opencode package Linux-only; added gemini-cli for Linux systems.

Walkthrough

Configuration 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

Cohort / File(s) Change Summary
AI Model Provider Configuration
home-manager/modules/codex/config.toml
Added LMStudio provider with base_url configuration; updated gpt-oss-120b profile to use LMStudio provider; added new qwen3-coder-30b profile with LMStudio
Fish Shell Abbreviations
home-manager/programs/fish/default.nix
Removed cxe abbreviation; added coxe and coxel abbreviations mapped to new function handlers
Fish Shell Functions – Core Tools
home-manager/programs/fish/functions/_coxe_function.fish, home-manager/programs/fish/functions/_coxel_function.fish
Renamed _cxe_function to _coxe_function; introduced new _coxel_function for Codex with gpt-oss-120b model and auto-configuration
Fish Shell Functions – Claude
home-manager/programs/fish/functions/_clxe_function.fish
Updated function description and command invocation from Codex to Claude Code with permission-skipping flag
Platform-Specific Packages
home-manager/packages/default.nix
Moved opencode from base list to Linux-conditional block; added gemini-cli to Linux-conditional block
macOS Package Management
nix-darwin/config/homebrew.nix
Added Blender to Homebrew casks list

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

🐰 With LMStudio now in play,
And Codex→Claude on display,
Abbrevs reshaped, Blender installed,
The rabbit's toolbox, freshly called! 🎨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "feat: add LM Studio integration and update AI tooling" directly relates to the primary changes in the changeset. The LM Studio integration is evident in the Codex configuration changes (new model provider, updated profiles), and the AI tooling updates are reflected in the Fish shell function modifications. While the title does not explicitly mention secondary changes like package reorganization (gemini-cli, opencode) or Blender addition to Homebrew, this is acceptable per the guidelines as titles are not expected to cover every detail of the changeset. The title is concise, clear, and accurately summarizes the main technical focus from the developer's perspective.
Description Check ✅ Passed The pull request description is clearly related to the changeset and provides a comprehensive overview of the changes. It covers all major areas: LM Studio integration in Codex configuration, Fish shell function updates for Claude Code and Codex interactions, package management changes (gemini-cli and opencode), and the addition of Blender to Homebrew casks. The description includes both a high-level summary and an auto-generated detailed breakdown that aligns well with the actual changes across all modified files.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lm-studio-branch

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 and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

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

  • LM Studio Integration: Integrated LM Studio as a new model provider in the Codex configuration, enabling the use of local models like "openai/gpt-oss-120b" and "qwen/qwen3-coder-30b".
  • AI Tooling Updates: Refactored Fish shell functions for AI interactions. The "_clxe_function" now targets "claude code" with permission skipping, while a new "_coxel_function" has been introduced for local Codex interactions. The original "_cxe_function" was renamed to "_coxe_function".
  • Package Management: Added "gemini-cli" as a new package and reorganized the placement of "opencode" within the package list.
  • Homebrew Cask Additions: Included Blender in the Homebrew casks for enhanced 3D modeling capabilities.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copilot AI 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.

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.

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

Comment on lines 5 to 10
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

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.

medium

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"

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.

medium

The function was renamed to _coxe_function, but the usage comment on line 3 still refers to cxe. Please update the comment to use coxe to avoid confusion.

Comment on lines +5 to +10
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

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.

medium

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

@shunkakinoki
shunkakinoki merged commit c921d70 into main Oct 19, 2025
16 of 19 checks passed
@shunkakinoki
shunkakinoki deleted the lm-studio-branch branch October 19, 2025 11:57

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

📥 Commits

Reviewing files that changed from the base of the PR and between 72fa786 and 602c33d.

📒 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 consistently

Follow the Nix expression language style guide

Files:

  • nix-darwin/config/homebrew.nix
  • home-manager/programs/fish/default.nix
  • home-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.nix
  • home-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.nix
  • home-manager/programs/fish/functions/_clxe_function.fish
  • home-manager/programs/fish/functions/_coxe_function.fish
  • home-manager/packages/default.nix
  • home-manager/programs/fish/functions/_coxel_function.fish
  • home-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.nix
  • home-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-cli and opencode to the Linux-specific block complements their Homebrew installation on macOS (as seen in nix-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-120b profile and new qwen3-coder-30b profile correctly reference the lmstudio provider 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-120b profile 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-permissions flag, and adds the --print option for prompt-based invocations.

home-manager/programs/fish/functions/_coxe_function.fish (1)

1-11: LGTM! Function logic preserved correctly.

The function rename from _cxe_function to _coxe_function maintains all the original Codex invocation logic with the gpt-5-codex model.

home-manager/programs/fish/default.nix (1)

53-54: LGTM! Shell abbreviations correctly updated.

The new coxe and coxel abbreviations properly reference their corresponding function implementations, replacing the previous cxe abbreviation 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...>]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
# 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...>]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
# 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".

@cubic-dev-ai cubic-dev-ai 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.

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 &quot;coxel&quot; to match the function name and abbreviation; current &quot;cxel&quot; 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...>]

@cubic-dev-ai cubic-dev-ai Bot Oct 19, 2025

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.

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 &quot;coxel&quot; to match the function name and abbreviation; current &quot;cxel&quot; is inconsistent and may confuse users.</comment>

<file context>
@@ -0,0 +1,11 @@
+function _coxel_function --description &quot;Run Codex with a free-form prompt using the local gpt-oss:120b model&quot;
+  # Run Codex with a free-form prompt (spaces allowed) using the local gpt-oss:120b model
+  # Usage: cxel [&lt;prompt words...&gt;]
+
+  if test (count $argv) -eq 0
</file context>
Suggested change
# Usage: cxel [<prompt words...>]
# Usage: coxel [<prompt words...>]
Fix with Cubic

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.

2 participants