A polished, colorful, interactive terminal manager for the Hugging Face Hub.
This project lets you manage models, datasets, and spaces directly from the terminal with a more visual, GUI-like experience using rich panels, tables, colors, and InquirerPy prompts.
It is designed for users who want to do common Hugging Face Hub tasks without repeatedly opening the web UI.
- Interactive terminal dashboard
- Rich panels, tables, and colorful status messages
- Manage
models,datasets, andspaces - Browse and inspect public repositories
- File operations from terminal
- Discussion management
- Space runtime and environment controls
- Safe
Back / Cancelflow across menus - More modern CLI/TUI feel than a plain script
This is a terminal UI, not a web app, but it aims to feel more polished and interactive than a traditional CLI.
- Dashboard panels
- Colored repo info tables
- README preview panels
- Danger panels for destructive actions
- Styled success, warning, and error messages
- Interactive menus and multi-select checkboxes
- Arrow-key navigation
- Enter to confirm
- Space for multi-select
- Esc or Ctrl+C to cancel/back in many prompts
- Blank text input cancels many operations safely
| Category | Feature | Supported |
|---|---|---|
| Account | Show current logged-in user | β |
| Account | Show masked token info | β |
| Repositories | Manage your models | β |
| Repositories | Manage your datasets | β |
| Repositories | Manage your spaces | β |
| Repositories | Browse public repositories | β |
| Repositories | Search public repositories | β |
| Repositories | Create repositories | β |
| Repositories | Rename / move repositories | β |
| Repositories | Change repo visibility | β |
| Repositories | Delete repositories | β |
| Files | List repo files | β |
| Files | Upload a file | β |
| Files | Upload a folder | β |
| Files | Download a file | β |
| Files | Delete one or many files | β |
| Files | Create folders via placeholder file | β |
| Preview | Preview README.md in terminal |
β |
| Discussions | List discussions / PRs | β |
| Discussions | Create discussion | β |
| Discussions | Comment on discussion | β |
| Spaces | View runtime info | β * |
| Spaces | Restart Space | β * |
| Spaces | Pause Space | β * |
| Spaces | Request hardware | β * |
| Spaces | Set sleep time | β * |
| Spaces | Add/delete secrets | β * |
| Spaces | Add/delete variables | β * |
| UX | Back / Cancel in menus | β |
| UX | Safer destructive confirmations | β |
*Space features depend on the installedhuggingface_hubversion and API support.
| Action | Models | Datasets | Spaces |
|---|---|---|---|
| View repo info | β | β | β |
| List files | β | β | β |
| Preview README | β | β | β |
| Upload file | β | β | β |
| Upload folder | β | β | β |
| Download file | β | β | β |
| Delete files | β | β | β |
| Create folder | β | β | β |
| Change visibility | β | β | β |
| Rename / move | β | β | β |
| Delete repo | β | β | β |
| Discussions | β | β | β |
| Space runtime controls | β | β | β |
| Space Action | Description |
|---|---|
| Runtime Info | Shows stage, hardware, requested hardware, sleep time, and storage |
| Restart Space | Requests a Space restart |
| Pause Space | Pauses a running Space |
| Request Hardware | Requests a different Space hardware tier |
| Set Sleep Time | Sets automatic sleep timeout in seconds |
| Add Secret | Adds a private secret environment value |
| Delete Secret | Deletes a Space secret |
| Add Variable | Adds a normal environment variable |
| Delete Variable | Deletes a normal environment variable |
| UX Feature | Description |
|---|---|
| Back / Cancel | Available throughout the app |
| Blank input cancel | Many text prompts cancel on blank input |
| Ctrl+C safety | Many prompts return instead of killing the session |
| Delete confirmation | Destructive operations require explicit confirmation |
| Exact repo confirmation | Repo deletion requires typing the exact repo ID |
- Python
3.9+ - Hugging Face account
- Hugging Face access token
- Internet connection
Install required packages:
pip install -U huggingface_hub InquirerPy richBefore using the manager, log in with:
huggingface-cli loginPaste your Hugging Face token when prompted.
You can create or manage tokens here:
https://huggingface.co/settings/tokens
Depending on what you want to do, your token may need permission for:
- read access
- write access
- repo deletion
- Space management
- discussions
- secrets / variables
Save the script as:
hf_manager_v2.pyRun it with:
python hf_manager_v2.pyWhen launched, the app opens a dashboard-like terminal interface with a main menu similar to:
Account infoManage my reposCreate repoSearch public reposBrowse public repo and inspectExit
| Key | Action |
|---|---|
β / β |
Move through menu items |
Enter |
Confirm selection |
Space |
Select checkbox items |
Esc |
Cancel in supported prompts |
Ctrl+C |
Back/cancel in many prompts |
| Blank input | Cancels many text-input flows |
Displays:
- Hugging Face username
- masked token
- user payload returned by the Hub
Useful for:
- confirming session status
- checking which account is active
Lets you manage repositories that belong to your account.
Choose a repository type:
ModelsDatasetsSpaces
Choose one of your repos.
Open the repo actions menu.
Available actions include:
- repo info
- list files
- README preview
- upload file
- upload folder
- download file
- delete files
- create folder
- change visibility
- rename / move repo
- list discussions
- create discussion
- comment on discussion
- Space controls
- delete repo
Create a new:
- model repo
- dataset repo
- space repo
If you create a Space, you can choose:
gradiostreamlitdockerstatic
You can also choose:
- public
- private
Searches public repositories by type:
- models
- datasets
- spaces
Useful for:
- discovery
- quick lookup
- terminal-first browsing
Lets you search for public repositories and inspect them from the terminal.
Depending on permissions and ownership, you may be able to:
- view repo info
- list files
- preview README
- browse discussions
Some write operations may fail for repos you do not own.
Shows metadata such as:
- repo ID
- repo type
- private/public status
- author
- SHA
- last modified time
- downloads
- likes
- tags
- gated / disabled state when available
Displays repository files in a rich table.
Useful for:
- checking model checkpoints
- browsing dataset structure
- viewing Space app contents
Downloads and previews README.md directly inside the terminal.
Useful for:
- reading model cards
- checking dataset documentation
- viewing Space descriptions
Upload one local file to a selected repo.
- local file path
- target path in repo
- commit message
Upload a whole local folder to the repo.
- local folder path
- destination folder path
- commit message
Download a file from a repo to a local folder.
- source file in repo
- local destination directory
Select one or more files and delete them from the repo.
- checkbox-based multi-select
- cancel support
- confirmation before deletion
Creates a folder using a placeholder .gitkeep file.
This is needed because Git-based repos do not track empty folders by themselves.
Switch a repo between:
- public
- private
Move or rename a repo by changing its repo ID.
old: yourname/my-model
new: yourname/my-model-v2
Restrictions may apply depending on ownership and namespace permissions.
Deletes the entire repository permanently.
- warning panel
- confirmation prompt
- exact repo ID re-entry
Type the exact repo id to confirm: yourname/my-model
Shows discussions and pull requests for a repository.
Displayed fields:
- discussion number
- title
- status
- author
Create a new discussion directly from terminal.
Useful for:
- notes
- questions
- collaboration
- issue tracking
Comment on an existing discussion by selecting it or entering the discussion number.
Only available when managing a repository of type space.
Shows:
- current stage
- hardware
- requested hardware
- sleep time
- storage
Useful after:
- code updates
- environment changes
- runtime issues
Useful for:
- stopping unused Space activity
- managing resource usage
Request available hardware tiers such as:
cpu-basiccpu-upgradet4-smallt4-mediuma10g-smalla10g-largea100-large
Availability depends on your account plan and Space settings.
Set auto-sleep timeout in seconds.
Examples:
3600720086400
Use secrets for sensitive information such as:
- API keys
- service tokens
- private credentials
Use variables for non-sensitive configuration such as:
- app mode
- region
- flags
- runtime settings
This version is designed so you do not get stuck inside a flow.
β¬ Back / Cancelentries in menus- blank text input cancels many prompts
- Esc cancels many prompt screens
- Ctrl+C often returns to the menu instead of forcing a full app exit
- destructive actions require explicit confirmation
This makes the tool much smoother to use than a simple linear script.
- Start the app
- Open
Manage my repos - Select
Models - Choose a repo
- Select
Delete files - Mark files with
Space - Confirm deletion or cancel
- Open
Create repo - Select
Spaces - Enter a repo name
- Choose the Space SDK
- Choose public or private
- Confirm creation
- Open
Manage my repos - Choose
Spaces - Select your Space
- Open
Space controls - Choose
Restart Space
- Open
Browse public repo and inspect - Select
Models - Search for a repo
- Open
Repo info - Open
List files - Open
Preview README
Older examples often use HfFolder, but recent versions of huggingface_hub changed token access patterns.
This project uses:
from huggingface_hub import get_tokenUpgrade if needed:
pip install -U huggingface_hubIf the app says you are not logged in:
huggingface-cli loginThen run the program again.
Some Space operations depend on your installed huggingface_hub version and API support.
Upgrade first:
pip install -U huggingface_hubIf the option still does not work, that capability may not be available in your current Hub client version.
If an operation fails due to permissions:
- confirm you own the repository
- verify your token scopes
- make sure you are logged into the correct Hugging Face account
- check whether the repo is protected or restricted
This project relies on the public huggingface_hub Python API.
That means:
- it can only support features exposed by the library
- some Hugging Face web GUI features are not available via API
- some Space features are version-dependent
- some actions may behave differently based on repo type, account plan, or permissions
It covers many of the most useful Hub workflows, but it is not guaranteed to be a 100% replacement for every web UI feature.
- Never share your Hugging Face token
- Use Space secrets for sensitive credentials
- Be careful with delete operations
- Review visibility changes before confirming
- Prefer private repos for non-public content
| Component | Purpose |
|---|---|
huggingface_hub |
Hugging Face Hub API access |
InquirerPy |
Interactive prompts and menus |
rich |
Panels, tables, colors, layout, styled output |
pip install -U huggingface_hub InquirerPy richhuggingface-cli loginpython hf_manager_v2.pyPotential future improvements:
- pagination for very large repo lists
- sortable tables
- live refresh
- keyboard shortcuts
- command palette
- export to JSON / CSV
- batch repo actions
- local config support
- true multi-pane TUI using
Textual - mouse support
- live logs for Spaces
You can extend this project by improving:
- UI polish
- pagination
- error handling
- Hub API compatibility
- batch operations
- Space feature coverage
- documentation
Distributed under the MIT License. See the LICENSE file for more information.
Built with:
Created By: