Propose a CLI feature to support environment migration by adding `ollama export` to export installed models and `ollama pull -r <file>` to batch pull models from an export file, similar to `pip freeze` and `pip install -r`.
# Feature request: add export command and pull -r flag for environment migration ## Summary I would like to propose a small CLI feature to make it easier to migrate an Ollama environment between machines. The idea is to support a workflow similar to `pip freeze` / `pip install -r`: - `ollama export`: exports the list of installed models to stdout or a file - `ollama pull -r <file>`: batch pulls models from an “export” file This would allow users to easily back up and restore their model setup. --- ## Problem Today, when moving from one machine to another (e.g., laptop → server, old server → new server), users need to: - Manually remember which models they had installed - Manually re-run multiple `ollama pull` commands - Potentially forget some models or make mistakes There is no built-in, reproducible way to “snapshot” the current model list and restore it elsewhere. --- ## Proposed solution Add two pieces of functionality to the `ollama` CLI: ### 1. `ollama export` - Li