Skip to main content

A tool to manage Hugging Face models.

Project description

HF-MODEL-TOOL

CI/CD Pipeline PyPI version Python versions License: MIT Code style: black codecov

A CLI tool for managing your locally downloaded HuggingFace models and datasets

Features

Core Functionality

  • Smart Asset Listing: View models & datasets with comprehensive size and metadata information
  • Duplicate Detection: Automatically find and clean duplicate downloads to save space
  • Asset Details: View model configurations and dataset documentation with rich formatting

Installation

From PyPI (Recommended)

pip install hf-model-tool

From Source

git clone https://github.com/Chen-zexi/hf-model-tool.git
cd hf-model-tool
pip install -e .

Usage

Quick Start

hf-model-tool

This launches the interactive CLI with a professional welcome screen showing:

  • System status and cache information
  • Feature overview and navigation help
  • Intuitive menu-driven interface

Navigation

  • ↑/↓ arrows: Navigate menu options
  • Enter: Select current option
  • Back: Return to previous menu
  • Config: Access settings and sort options
  • Main Menu: Quick return to main menu from anywhere
  • Exit: Clean application shutdown

Key Workflows

  1. List Assets: View all models and datasets with size information
  2. Manage Assets: Access deletion and deduplication tools
  3. View Details: Inspect model configs and dataset documentation
  4. Configuration: Change sorting preferences and access help

Configuration

Access the configuration menu via "Config" from any screen:

  • Sort Options: Size (default), Date, or Name
  • Future Features: Cache directory, display preferences
  • Help System: Navigation and usage guide

Project Structure

hf_model_tool/
├── __main__.py      # Application entry point with welcome screen
├── cache.py         # HuggingFace cache directory scanning
├── ui.py           # Rich terminal interface components
├── utils.py        # Asset grouping and duplicate detection
└── navigation.py   # Unified menu navigation system

🛠️ Development

Requirements

  • Python ≥ 3.7
  • Dependencies: rich, inquirer, html2text

Logging

Application logs are written to ~/.hf-model-tool.log for debugging and monitoring.

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

hf_model_tool-0.2.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

hf_model_tool-0.2.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file hf_model_tool-0.2.0.tar.gz.

File metadata

  • Download URL: hf_model_tool-0.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hf_model_tool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a33b00756da3be60592503b3e9ff12de190b2805a8ee0bbac3697f49ae2cb0aa
MD5 7b0f852e3d23842d733e2fba4de3c2a7
BLAKE2b-256 6b0da5ec6ed91774d998ae9656d11728d73baa07e6e1b92c9e7c12a9b5be5b8a

See more details on using hashes here.

File details

Details for the file hf_model_tool-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: hf_model_tool-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hf_model_tool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9d5a8a24e486aa508ad061b0d703d2010bec75b250fff06955cfce8678b8829
MD5 5e548353debc660ac38da71f04e47d52
BLAKE2b-256 0dd3fecd4e2b1ff6d981f2e28104c48fb2fa51ea3fda1c618440b0ea16aac65d

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