kdeps-tools-hf_repo_files
v1.0.0List the GGUF files in one HuggingFace repo with their sizes, to pick one for /model hff download.
set tools / shelf tools
LLM context: ~68 tokens when loaded (prompt or tool definition)
Where it runs
Part of the tools set, used in workflow and agent mode. What the model is told about each built-in tool: its description, usage notes and parameters. kdeps runs the tool itself.
- the agent loop builds the request
- the tool definitions are sent to the modeltools/hf_repo_files
- the model calls a tool
- kdeps runs it
- the result goes back to the model
Loaded by: kdeps (agent loop), /update, /settings, kdeps run, kdeps install, kdeps list, kdeps uninstall, kdeps update
In the code: kdeps (agent loop)agent.RegisterBuiltinToolsagent.definedAs
Install
A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.
Pin a version with kdeps install tools/hf_repo_files@<version>.
Contents
List the GGUF files in one HuggingFace repo with their sizes, to pick one for /model hff download.
- category
- model
- outputFormat
- a table: FILE, SIZE for each .gguf file in the repo
- seeAlso
- hf_search
| Parameter | Type | Description |
|---|---|---|
| repo * | string | The repo id, e.g. Qwen/Qwen3-8B-GGUF |
Python script (declared in YAML, no Go code)
import json, os, sys, urllib.parse, urllib.request
a = json.loads(sys.argv[1])
repo = (a.get("repo") or "").strip()
if not repo:
sys.exit("hf_repo_files: repo is required")
base = (os.environ.get("HF_API") or "https://huggingface.co/api").rstrip("/")
req = urllib.request.Request(base + "/models/" + urllib.parse.quote(repo, safe="/"),
headers={"Accept": "application/json"})
if os.environ.get("HF_TOKEN"):
req.add_header("Authorization", "Bearer " + os.environ["HF_TOKEN"])
try:
with urllib.request.urlopen(req, timeout=30) as resp:
info = json.load(resp)
except Exception as e: # network, HTTP status, or a body that is not JSON
sys.exit("hf_repo_files: %s" % e)
files = [f for f in info.get("siblings") or [] if f.get("rfilename", "").lower().endswith(".gguf")]
if not files:
print("No GGUF files found in %s." % repo)
sys.exit(0)
def size(n):
if not n or n <= 0:
return "?"
return "%.1fGB" % (n / 2**30) if n >= 2**30 else "%.0fMB" % (n / 2**20)
print("GGUF files in %s:" % repo)
print("-" * 72)
print("%-50s %10s" % ("FILE", "SIZE"))
print("-" * 72)
for f in files:
name = f["rfilename"]
print("%-50s %10s" % (name if len(name) < 50 else name[:48] + "~", size(f.get("size"))))
Timeout: 60s
Offered when set: HF_TOKEN | , KDEPS_HF_API_URL |
version: 1.0.0
category: model
description: List the GGUF files in one HuggingFace repo with their sizes, to pick one for /model hff download.
outputFormat: "a table: FILE, SIZE for each .gguf file in the repo"
seeAlso: hf_search
parameters:
repo:
type: string
description: The repo id, e.g. Qwen/Qwen3-8B-GGUF
required: true
python:
env:
HF_TOKEN: [HF_TOKEN, ""] # optional: a HuggingFace token raises rate limits
HF_API: [KDEPS_HF_API_URL, ""] # optional: another API base (tests)
timeout: 60s
script: |
import json, os, sys, urllib.parse, urllib.request
a = json.loads(sys.argv[1])
repo = (a.get("repo") or "").strip()
if not repo:
sys.exit("hf_repo_files: repo is required")
base = (os.environ.get("HF_API") or "https://huggingface.co/api").rstrip("/")
req = urllib.request.Request(base + "/models/" + urllib.parse.quote(repo, safe="/"),
headers={"Accept": "application/json"})
if os.environ.get("HF_TOKEN"):
req.add_header("Authorization", "Bearer " + os.environ["HF_TOKEN"])
try:
with urllib.request.urlopen(req, timeout=30) as resp:
info = json.load(resp)
except Exception as e: # network, HTTP status, or a body that is not JSON
sys.exit("hf_repo_files: %s" % e)
files = [f for f in info.get("siblings") or [] if f.get("rfilename", "").lower().endswith(".gguf")]
if not files:
print("No GGUF files found in %s." % repo)
sys.exit(0)
def size(n):
if not n or n <= 0:
return "?"
return "%.1fGB" % (n / 2**30) if n >= 2**30 else "%.0fMB" % (n / 2**20)
print("GGUF files in %s:" % repo)
print("-" * 72)
print("%-50s %10s" % ("FILE", "SIZE"))
print("-" * 72)
for f in files:
name = f["rfilename"]
print("%-50s %10s" % (name if len(name) < 50 else name[:48] + "~", size(f.get("size"))))
Versions
| Version | Published | Status |
|---|---|---|
| 1.0.0 | 10/24/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.0
- Published
- 10/24/2026