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—back up, restore, update, and list your models with ease.

Installation

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_models_backup)
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 installation information and version
ollama-tool-cli info

# 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 model or all models. If no model name is provided, all installed models are updated.

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

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

Back up Ollama models to zip files. By default, all models are backed up to ~/Downloads/ollama_models_backup.

  • --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 from a directory containing backup zip files.

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

info

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

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 the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to submit a pull request.

Related Projects

Explore other CLI tools by Arian Omrani:

  • LinkCovery - Modern bookmark management CLI tool
  • PEM - Python Execution Manager - Schedule and execute Python scripts
  • ThroneTools - Cross-platform installer and management CLI for Throne

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.3.2.tar.gz (13.7 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.3.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ollama_tool_cli-1.3.2.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ollama_tool_cli-1.3.2.tar.gz
Algorithm Hash digest
SHA256 875b45bd63df54a4857e131e9b9d1c115ee0800eaa87750fbabe6c7be2ce3296
MD5 003c72f8bcbfb341089b57d892a25130
BLAKE2b-256 b90e68a426c3170e4b41dfbab7704809db7bbc600dd1986f691d313915306baf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ollama_tool_cli-1.3.2.tar.gz:

Publisher: release.yml on arian24b/ollamatools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: ollama_tool_cli-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ollama_tool_cli-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 049d840002b7c562d58acd0e7673ff71fe8caa22e5305edef47fe5419bfef2b7
MD5 2c2a009695efe82c1ecef6dc8f38ab4c
BLAKE2b-256 4b1c974b8fc48ab6f6e2c83251a5e1a4c95f55b5322da7bfb0dfc71d15b74f8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ollama_tool_cli-1.3.2-py3-none-any.whl:

Publisher: release.yml on arian24b/ollamatools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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