Skip to content

pihalf/gitseq

Repository files navigation

gitseq logo

GitSeq

Encrypted git sync for Logseq. One keystroke to commit & push.


Install

Search "GitSeq" in the Logseq plugin marketplace (Plugins > Marketplace) and click Install.

Manual install (from source)
git clone https://github.com/pihalf/gitseq.git
cd logseq-plugin-git-sync
npm install && npx vite build

In Logseq: Settings > Advanced > Developer mode (on) → Plugins > Load unpacked → select the dist/ folder.

Prerequisites

Before using gitseq, your Logseq graph needs to be a git repo with a remote:

cd ~/Documents/my-graph
git init && git branch -M main
git add -A && git commit -m "Initial commit"
gh repo create my-graph --private --source=. --push

See the full setup guide below for .gitignore templates and encryption.

Usage

Cmd+S to sync

Press Cmd+S (macOS) / Ctrl+S (Windows/Linux) to:

  1. Flush pending Logseq edits to disk
  2. git add -A
  3. git commit
  4. git push

On startup, gitseq also commits any dirty files and pulls remote changes.

Toolbar indicator

Dot color Meaning
Green Clean — in sync with remote
Yellow Uncommitted local changes
Red Error — check dev console (Cmd+Option+I)
Blue (spinning) Sync in progress

Command palette

Cmd+Shift+P and search for:

  • gitseq: Sync Now — full sync (same as Cmd+S)
  • gitseq: Pull — pull only
  • gitseq: Push — add, commit, push (no pull)
  • gitseq: Show Status — refresh the toolbar indicator

Settings

Plugins > gitseq > Settings:

Setting Default Description
Sync Mode manual manual (Cmd+S only) or periodic (auto-sync on timer)
Periodic Interval 15 Minutes between auto-syncs
Commit Message sync: {{date}} {{date}} is replaced with ISO timestamp
Pull on Startup true Pull when Logseq opens
Sync on Close true Full sync before Logseq closes

Setup guide

New graph

  1. Open Logseq → create a new graph
  2. Initialize git and push:
cd ~/Documents/my-graph
git init && git branch -M main
  1. Create .gitignore:
.DS_Store
Thumbs.db
.logseq/
.obsidian/
logseq/bak/
logseq/.recycle/
.Trash/
  1. Commit and create a private remote:
git add -A && git commit -m "Initial commit"
gh repo create my-graph --private --source=. --push
  1. Install gitseq from the marketplace. Done.

Adding encryption (optional)

Encrypt journals, pages, and assets on GitHub while keeping them plaintext locally:

brew install git-crypt   # macOS
git-crypt init

Create .gitattributes:

journals/** filter=git-crypt diff=git-crypt
pages/** filter=git-crypt diff=git-crypt
assets/** filter=git-crypt diff=git-crypt

Export and back up your key:

git-crypt export-key ~/.git-crypt-my-graph.key

Store the key in a password manager. Without it, your encrypted files are unrecoverable.

Setting up a second machine

git clone git@github.com:youruser/my-graph.git ~/Documents/my-graph
# If encrypted:
git-crypt unlock ~/.git-crypt-my-graph.key

Open the graph in Logseq. Install gitseq. Done.

CLI companion (optional)

A Rust CLI for syncing outside Logseq (terminal, cron, automation):

cd cli && cargo build --release
./target/release/logseq-sync ~/Documents/my-graph             # sync once
./target/release/logseq-sync ~/Documents/my-graph --status     # check status
./target/release/logseq-sync ~/Documents/my-graph --watch      # watch mode

Troubleshooting

"You do not have the initial commit yet" — Logseq's internal git is pointing elsewhere. Make sure your graph folder has .git with at least one commit.

Authentication failures — Logseq's sandbox may not inherit your SSH agent. Verify with ssh-add -l or configure git config --global credential.helper osxkeychain.

Cmd+S doesn't work — another plugin may have claimed it. Use Cmd+Shift+P → "gitseq: Sync Now".

License

MIT

About

Git-based sync for Logseq — encrypted, one-keystroke commit & push

Resources

License

Stars

Watchers

Forks

Packages