DEV Community

Cover image for Introducing hf-browser: open model browsing in your terminal
Thomas Ezan
Thomas Ezan

Posted on

Introducing hf-browser: open model browsing in your terminal

I spent a lot of time on HuggingFace lately. Especially the model search page huggingface.co/models. But I wanted a fast way to search open weights models without having to leave the terminal or opening a browser tab for every model I wanted to check out. And with the excitement around AI coding agent, TUI is all the rage these days.

Look at Posting! 🤩 a really cool TUI app built by @darrenburns

So I built [hf-browser](https://pypi.org/project/hf-browser): a quick curses TUI app for searching, filtering, and reviewing open-weight models on the HuggingFace Hub.

I specifically wanted to:

  • Search models by keyword
  • Sort by downloads, likes, recent updates, or trending
  • See details (task, library, license, architecture, parameters, tags, files) without a page load
  • Jump to the model page in a browser only when I actually need to.

hf-browser in action...

Keep it simple

I kept things intentionally simple. The whole thing is pure Python standard library:

  • curses for the UI,
  • urllib for talking to the Hugging Face API.

No dependencies to install on macOS or Linux. On Windows, windows-curses gets pulled in automatically since Windows doesn't ship curses by default.

Give it a try

uvx hf-browser
Enter fullscreen mode Exit fullscreen mode

Or install it properly:

pipx install hf-browser
# or: pip install hf-browser
Enter fullscreen mode Exit fullscreen mode

Then just run:

hf-browser
Enter fullscreen mode Exit fullscreen mode

It's on PyPI here: pypi.org/project/hf-browser

Top comments (0)