Skip to content

fdkevin0/ollama_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ollama Utilities

A command-line tool for exporting and importing Ollama models.

Installation

go install github.com/fdkevin0/ollama_utils@latest

Or build locally:

go build -o ollama_utils .

Or use make:

make build

Usage

Export Models

Export one or more models to a tar.gz archive:

# Export a single model (auto-generated filename)
./ollama_utils export llama3:latest

# Export a single model with custom filename
./ollama_utils export llama3:latest llama3-export.tar.gz

# Export multiple models (auto-generated filename)
./ollama_utils export llama3:latest phi3:latest

# Export multiple models with custom filename
./ollama_utils export llama3:latest phi3:latest models-export.tar.gz

# Export with custom Ollama directory
./ollama_utils export --ollama-dir /custom/ollama/models llama3:latest llama3-export.tar.gz

Import Models

Import models from a tar.gz archive:

# Import models
./ollama_utils import models-export.tar.gz

# Import with custom Ollama directory
./ollama_utils import --ollama-dir /custom/ollama/models models-export.tar.gz

Default Ollama Directory

The tool automatically detects the default Ollama directory based on your OS:

  • Linux/macOS: $HOME/.ollama/models
  • If $HOME cannot be determined: /usr/share/ollama/.ollama/models

You can override this with the --ollama-dir flag.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •