Skip to main content

CLI tool for managing Ollama models - backup, restore, update, and list models

Project description

Ollama Tool CLI 🦙

A modern CLI tool for managing Ollama models - backup, restore, update, and list your models with ease.

Installation

Using pip (recommended)

pip install ollama-tool-cli

Using uv

uv add ollama-tool-cli

From source

git clone https://github.com/arian24b/ollamatools.git
cd ollamatools
uv sync

Requirements

  • Python 3.10 or higher
  • Ollama installed and running

Usage

Basic Commands

# Show help
ollama-tool-cli

# List all installed models
ollama-tool-cli list

# Update all models
ollama-tool-cli update

# Update a specific model
ollama-tool-cli update llama3.2

# Backup all models to default location (~/Downloads/ollama_model_backups)
ollama-tool-cli backup

# Backup to custom path
ollama-tool-cli backup --path /path/to/backup

# Backup a specific model
ollama-tool-cli backup --model llama3.2

# Backup with parallel jobs
ollama-tool-cli backup --jobs 4

# Run backup in background
ollama-tool-cli backup --background

# Restore from backup
ollama-tool-cli restore /path/to/backup.zip

# Restore all backups in a directory
ollama-tool-cli restore /path/to/backup_dir

# Show Ollama version
ollama-tool-cli version

# Show installation information
ollama-tool-cli info

# Check if Ollama is installed
ollama-tool-cli check

# Show log paths
ollama-tool-cli logs

# Follow logs
ollama-tool-cli logs --follow

Command Details

list

Display all installed Ollama models with their versions.

update [model]

Update one or all Ollama models. If no model name is provided, updates all models.

  • --jobs, -j: Number of parallel jobs
  • --background, -b: Run command in background

backup [--path PATH] [--model MODEL]

Backup Ollama models to zip files. By default backs up all models to ~/Downloads/ollama_model_backups.

  • --path, -p: Custom backup directory path
  • --model, -m: Backup only a specific model
  • --jobs, -j: Number of parallel jobs
  • --background, -b: Run command in background

restore <path>

Restore Ollama models from a backup zip file or directory.

  • --jobs, -j: Number of parallel jobs
  • --background, -b: Run command in background

version

Display the installed Ollama version.

info

Show detailed Ollama installation information including version, models path, platform, and number of installed models.

check

Verify that Ollama is installed and accessible.

logs

Show log file locations or follow logs.

  • --follow, -f: Follow the log output

Background logs

Background commands write to an OS-specific log directory with size-based rotation:

  • macOS: ~/Library/Logs/ollama-tool-cli/
  • Linux: ${XDG_STATE_HOME:-~/.local/state}/ollama-tool-cli/logs/
  • Windows: %LOCALAPPDATA%\ollama-tool-cli\Logs\

Development

Setup development environment

uv sync

Build the package

uv build

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

ollama_tool_cli-1.1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ollama_tool_cli-1.1.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file ollama_tool_cli-1.1.2.tar.gz.

File metadata

  • Download URL: ollama_tool_cli-1.1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ollama_tool_cli-1.1.2.tar.gz
Algorithm Hash digest
SHA256 1a98a3caf74f406ceb4a9d527d6b3616f84934cd837b82c0784b836564abb155
MD5 9cf8501d6899234261e4d8e97210cd43
BLAKE2b-256 bcf7fb1c3ada7d3b1aea46580d0ad437912b31e4ff593a66f63a7ada9cf179b7

See more details on using hashes here.

File details

Details for the file ollama_tool_cli-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ollama_tool_cli-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 daf173c53c47745380c173ed474f6201fe304933d28ac96f1cbd453340c2751a
MD5 8ecb94299f053cb744f531a49c6ad71c
BLAKE2b-256 1f0f0b1af73e4a3d815ed773d2bb05f2d0b729ab8e9d09343ef8c29c281a6c0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page