modeldock
The lightweight, Python-first model manager for local LLMs - the package manager for local AI models. Discover, download, cache, verify, and load models through pluggable runtime adapters (Ollama, LM Studio, llama.cpp, and more). 100+ good-first-issues welcome!
A Python package manager for local AI models that installs, updates, and loads them through tools like Ollama with one line of code.
ModelDock is a Python tool that manages local AI language models the way a package manager manages code libraries. Instead of running inference itself, it discovers, downloads, caches, verifies, and loads models by talking to existing runtimes that do the actual work, starting with Ollama and planning support for LM Studio, llama.cpp, Jan AI, GPT4All, and vLLM. The goal is to remove the need for manual commands like ollama pull by letting you write a single line of Python such as md.load('llama3') and have it handle the rest.
You install it with pip, optionally including the Ollama helper extra, and it requires Python 3.9 through 3.12 along with a local Ollama installation for the first supported runtime. Once installed, its Python API lets you browse the full model catalog, search by name or capability, check what is already installed locally, install a single model or a whole category of models at once, update or remove models, and verify their integrity. All of these actions are also available from a command line tool called modeldock.
The project is built using Clean Architecture with SOLID principles, splitting the code into distinct layers for the command line and SDK interface, the core application logic, a pure domain layer with no external calls, defined interface contracts called ports, and concrete adapters that implement those contracts for each runtime. The model catalog itself is scraped from the Ollama website and cached locally for 24 hours, with a config option to force it to run fully offline using a bundled static catalog instead.
Configuration lives in a TOML file with environment variable overrides for things like logging level, default backend, auto install behavior, and cache location. The project is released under the MIT license, has over 100 issues tagged as good first issues for new contributors, and documents its contribution process, coding standards, and release procedure in a set of linked markdown files.
Where it fits
- Install and load a local LLM with one line of Python instead of manual CLI commands
- Bulk install a category of recommended local models, like coding models, at once
- Search and browse a catalog of local models by capability or size before downloading
- Verify and manage the integrity of already downloaded local models