A command line app for downloading Huggingface repositories with Rust.
RustyFace does not require installing additional dependencies such as git or git lfs etc. It aims to be lightweight and portable.
In addition to that, RustyFace is friendly to users who live in Mainland China, where HuggingFace accessibility is unstable, as this CLI app adopted a mirror that can be accessed globally.
The mirror site used in this project is hf-mirror.com
The easiest way to install RustyFace is using our installation script that automatically downloads the latest binary for your platform:
curl -sSL https://raw.githubusercontent.com/AspadaX/RustyFace/main/setup.sh | bashOr download and run the script manually:
wget https://raw.githubusercontent.com/AspadaX/RustyFace/main/setup.sh
chmod +x setup.sh
./setup.shAfter installation, you can manage RustyFace using these scripts:
Update to latest version:
curl -sSL https://raw.githubusercontent.com/AspadaX/RustyFace/main/update.sh | bashUninstall RustyFace:
curl -sSL https://raw.githubusercontent.com/AspadaX/RustyFace/main/uninstall.sh | bashYou can download the corresponding binaries for your platform from the Release section. That way, you can just type this command to download Huggingface repositories:
rustyface_windows_x86 --repository sentence-transformers/all-MiniLM-L6-v2 --tasks 4
rustyface_windows_x86is the binary file name that you have downloaded from the Release section.--repositoryis followed by therepo_idof the repository that you want to download from HuggingFace.--tasksis followed by the number of concurrent downloads. For example, 4 means downloading 4 files at once. It is recommended to use a lower number if your network conditions do not support higher concurrency.
If you would like to build from source, you need to have Rust installed. For those new to Rust, please refer to the official installation guide.
On Linux and macOS:
curl https://sh.rustup.rs -sSf | sh
On Windows, you can download the installation executable via this link: https://win.rustup.rs/
After installing Rust, just type this to your terminal:
cargo install rustyface
Try RustyFace out with this simple command line:
rustyface --repository sentence-transformers/all-MiniLM-L6-v2 --tasks 4
--repositoryis followed by therepo_idof the repository that you want to download from HuggingFace.--tasksis followed by the number of concurrent downloads. For example, 4 means downloading 4 files at once. It is recommended to use a lower number if your network conditions do not support higher concurrency.
If you would like to use an alternative mirror, or the HuggingFace official base url, you may configure your env like below:
export HF_ENDPOINT=https://your-endpoint.comAny participation is appreciated! Feel free to submit an issue, discussion or pull request. You can find me on WeChat: baoxinyu2007 or Discord: https://discord.gg/UYfZeuPy
This project is licensed under the MIT License. See the LICENSE file for details.
