Sync Ollama-downloaded GGUF models into LM Studio.
Project description
StudioLink
Sync Ollama-downloaded GGUF models into LM Studio.
StudioLink is a Python CLI tool that bridges Ollama and LM Studio. It treats Ollama as the source of truth, discovers GGUF-backed models from Ollama manifests, and imports them into LM Studio via the lms CLI—using hard links by default to save disk space.
Features
- 🔍 Scan - Discover all GGUF models available in your Ollama library
- 🔄 Sync - Import models into LM Studio with one command
- 📊 Status - Track which models are synced and their current state
- 🩺 Doctor - Verify prerequisites and diagnose issues
- 🔗 Smart linking - Uses hard links by default, falls back to copy when needed
- 💾 State tracking - Remembers what's been synced to avoid re-importing
Prerequisites
Before using StudioLink, ensure you have:
- Ollama installed and available at
~/.ollama/models/ - LM Studio with the
lmsCLI installed at~/.lmstudio/bin/lms.exe - Python 3.12+
Installation
PyPI install coming soon! For now, install from source:
# Clone the repository
git clone https://github.com/MananJK/StudioLink.git
cd StudioLink
# Install in editable mode
pip install -e .
Quick Start
# Scan for available models
sdl scan
# Import a specific model
sdl sync <modelname>
# Import all discovered models
sdl sync --all
# Check sync status
sdl status
# Verify everything is set up correctly
sdl doctor
Commands
sdl scan
Discover all GGUF-backed Ollama models available for import.
# Basic scan
sdl scan
# Output as JSON
sdl scan --json
# Verbose output (debug logging)
sdl -v scan
Output:
Discovered 3 model(s):
- <modelname> [ready]
blob: C:\Users\...\ollama\models\blobs\sha256-...
- <modelname2> [stale]
blob: C:\Users\...\ollama\models\blobs\sha256-...
issues: model blob is missing from the Ollama blob store
sdl sync
Import one or more models into LM Studio.
# Import specific model(s)
sdl sync <modelname>
sdl sync <model1> <model2> <model3>
# Import all discovered models
sdl sync --all
# Preview without making changes (dry run)
sdl sync <modelname> --dry-run
# Use a specific link mode
sdl sync <modelname> --hard-link
sdl sync <modelname> --copy
sdl sync <modelname> --symbolic-link
# Verbose output
sdl -v sync --all
Options:
--all- Sync every discovered model--dry-run- Preview the import without making changes--copy- Use copy mode instead of hard links--hard-link- Force hard link mode (default)--symbolic-link- Use symbolic links
sdl status
Show discovered models and their sync state.
sdl status
sdl status --json
sdl -v status
Output:
Discovered 3 model(s); 1 tracked as synced.
- <modelname>: synced
imported: 2026-04-12T10:30:00+00:00
- <modelname2>: stale
issues: model blob is missing from the Ollama blob store
- <modelname3>: pending
sdl doctor
Check local StudioLink prerequisites and diagnose issues.
sdl doctor
sdl doctor --json
Checks include:
- Ollama executable exists
- LM Studio CLI (
lms) exists - Ollama manifests and blobs directories exist
- LM Studio models directory exists
- Hard-link volume compatibility (same drive)
- Discovered Ollama models
- Blob presence validation
- GGUF header validation
sdl help
Show all available commands and their descriptions.
sdl help
Global Options
All commands support these global options:
-v, --verbose- Enable verbose output (debug logging)--version- Show version information--help- Show help for the specific command
# Examples
sdl -v scan # Scan with debug logging
sdl sync --help # Show help for sync command
sdl --version # Show version
Model Readiness States
When scanning or checking status, models can have these states:
| State | Description | Action Required |
|---|---|---|
| ready | Model blob exists and has valid GGUF header | Ready to sync |
| stale | Manifest exists but blob is missing | Run ollama pull <model> to restore |
| invalid | Blob exists but missing GGUF magic bytes | Model may be corrupted |
| synced | Already imported into LM Studio | No action needed |
| pending | Ready but not yet synced | Run sdl sync |
Configuration
StudioLink uses the following default paths (Windows):
| Setting | Default Path | Environment Variable |
|---|---|---|
| Ollama executable | ~\AppData\Local\Programs\Ollama\ollama.exe |
STUDIOLINK_OLLAMA_EXE |
| LM Studio CLI | ~\.lmstudio\bin\lms.exe |
STUDIOLINK_LMS_EXE |
| Ollama models | ~\.ollama\models |
STUDIOLINK_OLLAMA_MODELS_DIR |
| LM Studio models | ~\.lmstudio\models |
STUDIOLINK_LMSTUDIO_MODELS_DIR |
| State directory | ~\.sdl |
STUDIOLINK_STATE_DIR |
How It Works
- Scanning - Reads Ollama manifest files from
~/.ollama/models/manifests/to discover models - Blob Resolution - Locates GGUF blobs in
~/.ollama/models/blobs/by digest - Validation - Verifies blobs start with GGUF magic bytes
- Import Aliases - Creates human-readable
.ggufaliases in~/.sdl/imports/ - LM Studio Import - Uses
lms importCLI to import models - State Tracking - Saves sync records to
~/.sdl/state.json
Troubleshooting
"model blob is missing from the Ollama blob store"
The model manifest exists but the actual blob file has been deleted or purged by Ollama. Re-download it:
ollama pull <model-name>
Hard link fails (cross-volume)
StudioLink automatically falls back to copy mode if hard links fail (e.g., Ollama and StudioLink state are on different drives). Use --verbose to see the fallback in action.
LM Studio import fails
Run sdl doctor to verify:
- LM Studio is installed
lmsCLI is in PATH- Import directories are writable
Design Notes
- Ollama as source of truth - StudioLink never modifies Ollama's model store
- Hard links by default - Space-efficient, creates references rather than copies
- Cross-volume fallback - Automatically copies when hard links aren't possible
- State persistence - Tracks imports to avoid redundant operations
- CLI-only - No GUI, designed for automation and scripting
License
MIT License - See LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file studiolink-0.1.0.tar.gz.
File metadata
- Download URL: studiolink-0.1.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d22aa0631b8dbe5a56f7e507ff9a3fc7911b4af4a070a493213fef85a16a685d
|
|
| MD5 |
db61be9389a6d1320963b40a72bc7b62
|
|
| BLAKE2b-256 |
9fc1913b30426a4634da83b898d43b8b4591d7efb94ce5d72611d52e86a2a307
|
File details
Details for the file studiolink-0.1.0-py3-none-any.whl.
File metadata
- Download URL: studiolink-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ebdc9b829d2da37a89f467543e9b13b870a91fb51b71dd4d79af9cbc4186249
|
|
| MD5 |
13d5c6db552c187e4bb4353c79c31f7a
|
|
| BLAKE2b-256 |
f37e4f30ce7364fd099c456ba45abb4ed1c279173442a9e7b59aa115de4ca88e
|