Use your Ollama managed models with LM Studio!
A cli utility script that fixes and enables LM Studio to use your Ollama models by creating the necessary symbolic links between Ollama's model storage and LM Studio's expected format.
- Ollama installed with at least one model downloaded
- (Please confirm by running
ollama list)
- (Please confirm by running
- LM Studio installed
jqcommand-line JSON processor- macOS:
brew install jq - Linux:
sudo apt-get install jqor equivalent - Windows:
choco install jq
- macOS:
- Clone the repository:
git clone https://github.com/eelbaz/ollama-lmstudio-bridge.git cd ollama-lmstudio-bridge- Make the script executable:
chmod +x ollama-to-lmstudio-bridge.sh
- Run the script:
# Simple usage
./ollama-to-lmstudio-bridge.sh
# Or with options
./ollama-to-lmstudio-bridge.sh [OPTIONS]Available options:
-h, --help: Show help message-v, --verbose: Enable verbose output-q, --quiet: Suppress non-essential output-s, --skip-existing: Skip existing symlinks instead of overwriting-d, --dir DIR: Specify custom models directory for LM Studio-o, --ollama-dir: Specify Ollama models directory (useful for system-wide installations)--version: Show version information
Examples:
# Basic usage
./ollama-to-lmstudio-bridge.sh
# With system-wide Ollama installation
./ollama-to-lmstudio-bridge.sh -o /usr/share/ollama/.ollama/models-
The script will:
- Scan your Ollama models
- Create the LM Studio models directory (
.lmstudio/models/lmstudioon macOS/Linux, or equivalent on Windows) - Create symbolic links to your Ollama model files in the LM Studio models directory
-
In LM Studio:
- Go to Settings
- Set Models Directory to the path shown by the script (the script will display this path when it runs)
- Your Ollama models should now appear in LM Studio from the dropdown
Note: Every time you download a new model with Ollama, you'll need to re-run this script to sync the latest models to your LM Studio models folder.
- macOS
- Linux
- Windows (requires Developer Mode or Administrator privileges for symlink creation)
-
macOS/Linux:
- Ollama manifests:
~/.ollama/models/manifests/registry.ollama.ai - LM Studio models:
~/.lmstudio/models/lmstudio
- Ollama manifests:
-
Windows:
- Ollama manifests:
%USERPROFILE%\AppData\Local\ollama\models\manifests\registry.ollama.ai - LM Studio models:
%USERPROFILE%\Documents\.lmstudio\models\lmstudio
- Ollama manifests:
- Symlink Creation Fails: On Windows, enable Developer Mode or run as Administrator
- Models Not Found: Ensure you have downloaded models through Ollama first
- jq Not Found: Install jq using your system's package manager
MIT License - See LICENSE file for details.