Skip to content

NathanHB/hugsync

Repository files navigation

Hugging Face logo

HugSync

Back up your Obsidian vault to a Hugging Face Bucket — automatically.

Obsidian Plugin HF Buckets Desktop only

Your notes are precious. This plugin keeps them safe by syncing your entire Obsidian vault to a private Hugging Face Bucket on a schedule you control.

Features

  • Automatic periodic sync — push your vault to HF Buckets every N minutes
  • Full vault backup — markdown, canvases, PDFs, images, everything
  • Smart deduplication — only changed files are uploaded (powered by HF's Xet backend)
  • Configurable vault path — sync any vault, not just the currently open one
  • Auto-detects the hf CLI — no hardcoded paths, works across machines
  • Status bar indicator — always know when you last synced

Requirements

  • Hugging Face CLI (hf) installed and on your PATH
  • A Hugging Face account with a write-access token
  • An existing HF Bucket (create one with hf buckets create username/my-vault --private)

Installation

  1. Download main.js and manifest.json from the latest release
  2. Copy them to <your-vault>/.obsidian/plugins/obsidian-hf-sync/
  3. Reload Obsidian and enable the plugin under Settings → Community plugins

Configuration

Setting Description
HF Token Your HF access token (hf_...) with write permissions
Bucket ID The target bucket, e.g. username/my-vault
Vault path Absolute path to the vault. Leave empty to use the currently open vault
hf CLI path Path to the hf binary. Leave empty to auto-detect from your shell
Sync interval How often to sync, in minutes (1–60)

Usage

Once configured, the plugin syncs automatically in the background. You'll see the status in Obsidian's bottom status bar:

Status Meaning
HF ✓ 3m ago Last sync was 3 minutes ago
HF ⟳ Sync in progress
HF ✕ An error occurred (hover for details)

To trigger an immediate sync: Command palette → HF Sync: Sync vault now

Restoring your vault

To pull your vault from the bucket onto a new machine:

hf buckets sync hf://buckets/username/my-vault ./my-vault

Development

git clone https://github.com/NathanHB/obsidian-hf-sync
cd obsidian-hf-sync
npm install
npm run dev       # watch mode — auto-recompiles on save

Symlink the repo into a test vault's plugin folder and reload Obsidian to test changes.


Built with ❤️ for the open-source community · Learn more about HF Buckets

About

Obsidian plugin that syncs your vault to a Hugging Face Bucket

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors