datahub-cli 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.5
2
+ Name: datahub-cli
3
+ Version: 0.2.0
4
+ Summary: Local data catalog and hardware-aware model discovery
5
+ Project-URL: Homepage, https://github.com/tyler-ungerman/data-hub
6
+ Project-URL: Repository, https://github.com/tyler-ungerman/data-hub
7
+ Project-URL: Issues, https://github.com/tyler-ungerman/data-hub/issues
8
+ Author: Tyler Ungerman
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: catalog,datasets,hugging-face,models,ollama,tui
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: huggingface-hub>=0.25.0
22
+ Requires-Dist: rich>=13.3.3
23
+ Requires-Dist: textual>=0.80.0
24
+ Requires-Dist: tqdm>=4.42.1
25
+ Provides-Extra: all
26
+ Requires-Dist: kaggle>=1.6.0; extra == 'all'
27
+ Requires-Dist: onnxruntime>=1.18.0; extra == 'all'
28
+ Requires-Dist: pyarrow>=15.0.0; extra == 'all'
29
+ Provides-Extra: kaggle
30
+ Requires-Dist: kaggle>=1.6.0; extra == 'kaggle'
31
+ Provides-Extra: onnx
32
+ Requires-Dist: onnxruntime>=1.18.0; extra == 'onnx'
33
+ Provides-Extra: parquet
34
+ Requires-Dist: pyarrow>=15.0.0; extra == 'parquet'
35
+ Description-Content-Type: text/markdown
36
+
37
+ # DataHub CLI
38
+
39
+ 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.
40
+
41
+ ## Install
42
+
43
+ Once the package is published on PyPI, install it with either tool manager or try it without a persistent installation.
44
+
45
+ ```sh
46
+ uv tool install datahub-cli
47
+ uvx datahub-cli
48
+ pip install datahub-cli
49
+ ```
50
+
51
+ To install from a checkout before the first release, run `uv tool install .` in that directory. DataHub requires Python 3.11 or newer. The installed commands are `datahub` and `dhub`.
52
+
53
+ Optional extras add Parquet and ONNX inspection or the Kaggle CLI. For example, use `pip install 'datahub-cli[parquet,onnx]'` or `uv tool install 'datahub-cli[kaggle]'`.
54
+
55
+ ## Quickstart
56
+
57
+ ```sh
58
+ datahub init
59
+ datahub
60
+ datahub sm
61
+ datahub sm "qwen" --source ollama --fits -n 10
62
+ datahub sd --use-case finance -n 5
63
+ datahub scan
64
+ datahub ls
65
+ datahub info category/dataset-name --json
66
+ ```
67
+
68
+ 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.
69
+
70
+ 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.
71
+
72
+ 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.
73
+
74
+ | Key | Action |
75
+ | --- | --- |
76
+ | `1`, `2`, `3` | Switch between Models, Datasets, and Local Catalog |
77
+ | `/` | Focus the active tab’s search or filter input |
78
+ | ↑ / ↓ | Move between results or options in an open dropdown |
79
+ | `Tab` / `Shift+Tab` | Move between controls |
80
+ | `Enter` in a search field | Search and focus results |
81
+ | `Esc` | Close a dialog or return focus to results |
82
+ | `m` | Load another page |
83
+ | `p` or Enter on a result | Open the pull dialog |
84
+ | `c`, `v` | Mark a model and compare marked models |
85
+ | `x` | Open the seven-tier quantization plan |
86
+ | `q` | Quit |
87
+
88
+ 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.
89
+
90
+ 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.
91
+
92
+ ## Configuration
93
+
94
+ DataHub resolves each path from its CLI flag, environment variable, TOML setting, then default.
95
+
96
+ | Path | Flag | Environment | TOML | Default |
97
+ | --- | --- | --- | --- | --- |
98
+ | Data and catalog | `--data-root` | `DATA_ROOT` | `data_root` | `~/data` |
99
+ | Project scan root | `--projects-root` | `PROJECTS_ROOT` | `projects_root` | Disabled |
100
+
101
+ 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.
102
+
103
+ ```sh
104
+ datahub init --data-root ~/data --projects-root ~/work --save-config
105
+ datahub scan --deps
106
+ ```
107
+
108
+ `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.
109
+
110
+ ## Python API
111
+
112
+ ```python
113
+ from datahub import detect_hardware, evaluate_model, get_dataset_dir, get_model_path
114
+
115
+ dataset = get_dataset_dir("category/dataset-name")
116
+ checkpoint = get_model_path("weights/my-model")
117
+ hardware = detect_hardware(memory="16G")
118
+ fit = evaluate_model("example-7B", hardware, max_context=4096)
119
+ print(fit.quant, fit.total_gb, fit.verdict)
120
+ ```
121
+
122
+ 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.
123
+
124
+ ## Development
125
+
126
+ ```sh
127
+ uv run ruff check
128
+ uv run pytest
129
+ uv build
130
+ ```
@@ -0,0 +1,16 @@
1
+ datahub/__init__.py,sha256=9Vq43X1t4IxM3SYJLWvfJHT_LqVKOeeK34fB9ms45MU,1833
2
+ datahub/catalog.py,sha256=tHwIxhChj9QO6HOH-qHT2jIGeyfd1ozKO05TK1SWkIM,45697
3
+ datahub/cli.py,sha256=D8PJHEf99NLd3Szjrc7QqFcQcFo5fM2H02U48xqApXs,11355
4
+ datahub/config.py,sha256=6WsQjrOZwZGutDJV6gFDtEAzo99i2X4QOUzSHKl-3Lg,3757
5
+ datahub/hardware.py,sha256=HYDRezgVHoX06K39OLAQp4ebtDFyU0E2vLZ8KwI1Zik,5742
6
+ datahub/ollama_search.py,sha256=FCewpIDymtw8DtmnZQVF1NS1q1VmJ_QJUOHXZi75fiE,3997
7
+ datahub/progress.py,sha256=Jc6kwyjDULczMV9cK3KmqnRv5RD9cxhwkVgjbQBB9gE,1555
8
+ datahub/providers.py,sha256=-3Y17Bnp-_xPjr98Gh3fVeLb0I9q72PyhNKwClxq03w,33271
9
+ datahub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ datahub/scoring.py,sha256=TZNVAMOG28IVFPh32woGRN6Gzfvc16f9IUU4fwQcszc,7150
11
+ datahub/tui.py,sha256=KahDIGaZmPyxVoT--yn6Xrtqb-e3Z1ekr7ocqjdYNAQ,35286
12
+ datahub_cli-0.2.0.dist-info/METADATA,sha256=dVmB33swf2pDe5QvSLsi7Bip1D1xn2SKu9YjXOAoy7Q,5980
13
+ datahub_cli-0.2.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
14
+ datahub_cli-0.2.0.dist-info/entry_points.txt,sha256=IcMWRwlqEzq4v2MSCm9-c-xQK1Lpv_0UtVkEgRiRZnM,100
15
+ datahub_cli-0.2.0.dist-info/licenses/LICENSE,sha256=Izw-kbyXZF5EZmviPSWvC71wnpTYAnJcu22E7l7OAqM,1071
16
+ datahub_cli-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ datahub = datahub.cli:main
3
+ datahub-cli = datahub.cli:main
4
+ dhub = datahub.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tyler Ungerman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.