DataHub CLI
DataHub is a terminal tool for finding models and datasets, estimating which models fit your hardware, and tracking local data. It indexes local files in SQLite, caches schemas, and can find project references to catalog items.
Install
Install DataHub CLI from PyPI. Use dhub if Acryl Data’s acryl-datahub package already provides a datahub command on your PATH.
uv tool install datahub-cli
uvx datahub-cli
pip install datahub-cli
DataHub requires Python 3.11 or newer. uv tool install makes both dhub and datahub available from any terminal without activating an environment.
Optional extras include parquet and onnx for schema inspection, kaggle for Kaggle transfers, duckdb for SQL and Parquet previews, and zstandard for compressed archives. Install several with uv tool install 'datahub-cli[duckdb,zstandard]', or use datahub-cli[all].
Quickstart
datahub init
datahub
datahub sm
datahub sm "qwen" --source ollama --fits -n 10
datahub sd --use-case finance -n 5
datahub scan
datahub ls
datahub info category/dataset-name --json
Use an ID from datahub ls with datahub info or datahub path. For model estimates on another memory budget, run datahub --memory 16G --max-context 4096 sm --fits. Estimates depend on the runtime and architecture. A quantization plan describes possible configurations. A pull downloads the provider's published artifact.
Ollama search uses the public model catalog without credentials. The selected size and pull tag appear in the TUI inspector and JSON results. DataHub estimates Ollama model sizes at Q4 and embeddings at FP16 when the catalog does not report weights or quantization. Ollama downloads need the ollama executable and its local service. Ollama manages the weights, and DataHub records a reference. Setting OLLAMADB_API_KEY enables an API fallback if the public search fails. Hugging Face can use HF_TOKEN or an existing login for gated downloads. Kaggle needs its CLI and credentials.
Use --one-page for a JSON page with a next_cursor, then pass it to --cursor with the same filters. --sort newest orders Ollama results by recency.
| Key | Action |
|---|---|
1, 2, 3 |
Switch between Models, Datasets, and Local Catalog |
/ |
Focus the active tab’s search or filter input |
| ↑ / ↓ | Move between results or options in an open dropdown |
Tab / Shift+Tab |
Move between controls |
Enter in a search field |
Search and focus results |
Esc |
Close a dialog or return focus to results |
m |
Load another page |
p or Enter on a remote result |
Open the pull dialog |
| Enter on a local item | Preview a dataset or open the model launch dialog |
c, v |
Mark a model and compare marked models |
x |
Open the seven-tier quantization plan |
q |
Quit |
Press Enter on a result to open its pull dialog. Use the arrow keys in the category dropdown and Tab to edit the fields. Enter on a text field submits the pull.
Both the CLI pull commands and the TUI show download and indexing status. Size, speed, and ETA appear when the provider exposes transfer totals. Downloads with unknown totals show activity until the provider reports completion.
Configuration
DataHub resolves each path from its CLI flag, environment variable, TOML setting, then default.
| Path | Flag | Environment | TOML | Default |
|---|---|---|---|---|
| Data and catalog | --data-root |
DATA_ROOT |
data_root |
~/data |
| Project scan root | --projects-root |
PROJECTS_ROOT |
projects_root |
Disabled |
The config file lives at ~/.config/datahub/config.toml, under $XDG_CONFIG_HOME/datahub if set, or under %APPDATA%\datahub on Windows. Values can use ~ for the home directory.
datahub init --data-root ~/data --projects-root ~/work --save-config
datahub scan --deps
init creates the standard directories and database and prints optional shell settings for DATA_ROOT, HF_HOME, TORCH_HOME, and OLLAMA_MODELS. Catalog commands also initialize a missing database on first use. Set a project root before running a dependency scan.
Storage roots, cache adapters, and remotes
Scan configured roots recursively, or register an existing file or folder in place. The managed datasets/ and models/ under data_root remain the default locations for new downloads. Existing SQLite catalogs migrate on first open.
data_root = "~/data"
projects_root = "~/work"
dataset_roots = ["/mnt/bulk/datasets", "~/research/data"]
model_roots = ["/mnt/bulk/models"]
archive_root = "/mnt/cold/datahub"
[discovery]
enabled = true
hf_cache = true
ollama = true
lmstudio = true
llamacpp = true
torch = true
kagglehub = true
[remotes.gpu-box]
type = "ssh"
target = "user@ubuntu-box:/mnt/data"
[remotes.r2]
type = "s3"
target = "s3://my-bucket/datahub"
endpoint_url = "https://example.r2.cloudflarestorage.com"
[remotes.modal-vol]
type = "modal"
target = "my-training-volume:/data"
[discovery].enabled adds cache discovery to scan. dhub discover explicitly indexes enabled cache adapters without modifying their files. Switch individual adapters off with their boolean options. Hugging Face and Ollama cache locations follow HF_HOME and OLLAMA_MODELS when set. Missing roots appear as [offline] while their cached schemas and metadata remain searchable.
dhub sd --use-case vision -n 10
dhub sd --min-gb 0.1 --max-gb 4 -n 10
dhub discover
dhub register ./existing-data --id research/examples --type dataset --tags training
dhub ls datasets --tag training
dhub ls --status offline
dhub ls --adapter ollama
dhub unregister research/examples
Hugging Face dataset sizes use card metadata, the Dataset Viewer, and Hub metadata. Exact row counts take precedence over size buckets. A + marks partial data and an upper size limit excludes unresolved or partial sizes.
Preview, query, and launch
dhub peek research/examples --rows 5
dhub peek research/examples --file train.csv --json
dhub query research/examples 'SELECT count(*) FROM data'
dhub run models/example.gguf --dry-run
dhub serve models/example.gguf --ctx-size 4096 --dry-run
Preview statistics describe the sampled rows. With DuckDB installed, a local dataset’s preview also accepts a read-only SQL query. data refers to the primary file. Other supported files are available by normalized filename stem with numeric suffixes if names collide. Model launch uses a local Ollama, llama.cpp, or MLX-LM executable. For GGUF, the generated context size and GPU offload are estimates.
Verify, archive, and transfer
dhub verify research/examples
dhub verify research/examples --update
dhub dedup --json
dhub archive research/examples
dhub restore research/examples
dhub remotes
dhub push research/examples gpu-box --dry-run
dhub pull-remote research/examples gpu-box --destination ./restored-data
The first verification records a SHA-256 baseline. Later checks report missing or changed files. Deduplication reports candidates and space savings. An archive verifies its compressed contents and then removes the original files, retaining the indexed schema. Referenced items and third-party caches cannot be archived. Archive compression uses zstd when available and gzip otherwise.
Remote transfers use rsync over SSH, the AWS CLI or a configured rclone_remote for S3, or the Modal CLI. A push uploads a content manifest. A pull stages the files and verifies that manifest before putting them at the requested destination.
MCP clients
dhub mcp runs the built-in read-only stdio server. It exposes catalog listing and details, hardware detection, model and dataset search, and dataset previews.
For Claude Code, put this in the project’s .mcp.json. For Cursor, use the same JSON in .cursor/mcp.json or ~/.cursor/mcp.json.
{
"mcpServers": {
"datahub": {"command": "dhub", "args": ["mcp"]}
}
}
For Codex, add this to ~/.codex/config.toml.
[mcp_servers.datahub]
command = "dhub"
args = ["mcp"]
startup_timeout_sec = 10
tool_timeout_sec = 90
If the client launches with a different PATH, use the absolute path to the dhub executable.
Python API
from datahub import detect_hardware, evaluate_model, get_dataset_dir, get_model_path
dataset = get_dataset_dir("category/dataset-name")
checkpoint = get_model_path("weights/my-model")
hardware = detect_hardware(memory="16G")
fit = evaluate_model("example-7B", hardware, max_context=4096)
print(fit.quant, fit.total_gb, fit.verdict)
The path helpers resolve indexed IDs or unique names and raise KeyError if the item is missing or ambiguous. Each accepts a data_root override.
Development
uv run ruff check
uv run pytest
uv build
Metadata
Release files for datahub-cli 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datahub_cli-0.2.1.tar.gz | 160.6 kB | Without provenance | Details for datahub_cli-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datahub_cli-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for datahub_cli-0.2.1-py3-none-any.whl |
Total release size: 238.2 kB
Release files / datahub_cli-0.2.1.tar.gz
| Download URL | datahub_cli-0.2.1.tar.gz |
|---|---|
| Size | 160.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a13e518181d8aa898668c9a753615bec3ea28838ba6acb040cf7b7427e5b20c4
|
|
BLAKE2b-256 checksum How to use checksums |
89270e3364e5ab4bf13489476ef6ac0249e0b4730e1b7a39efe9c27943a1cddf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / datahub_cli-0.2.1-py3-none-any.whl
| Download URL | datahub_cli-0.2.1-py3-none-any.whl |
|---|---|
| Size | 77.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1c3c28e6135afb5e35c276aab80e7ea0631a61f38dfb454cfdbb66e791790e1
|
|
BLAKE2b-256 checksum How to use checksums |
c87ec8dd4cc7433ca025875fc45ba894ffd9a515136e0f530a755ee5fff26ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for datahub-cli 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.