https://github.com/artemventvent/obsidiansync
A simple bash script to sync your Obsidian vault with a GitHub repository.
https://github.com/artemventvent/obsidiansync
bash-script git obsidian
Last synced: 2 months ago
JSON representation
A simple bash script to sync your Obsidian vault with a GitHub repository.
- Host: GitHub
- URL: https://github.com/artemventvent/obsidiansync
- Owner: artemventvent
- Created: 2025-01-28T18:52:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-07T15:59:34.000Z (about 1 year ago)
- Last Synced: 2025-09-02T14:50:51.412Z (10 months ago)
- Topics: bash-script, git, obsidian
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Obsidian Sync



**A simple bash script to sync your Obsidian vault with a GitHub repository.**
## 🔑 SSH Setup
1. Generate key:
`ssh-keygen -t ed25519 -C "github_email@example.com"`
2. Add to GitHub:
- Copy key:Â `cat ~/.ssh/id_ed25519.pub`
- Paste here:Â [https://github.com/settings/ssh/new](https://github.com/settings/ssh/new)
3. In config use:
`REMOTE_REPO="git@github.com:user/repo.git"`
## 🚀 Installation
```bash
git clone https://github.com/artemventvent/ObsidianSync.git
cd ObsidianSync
sudo make install
```
## ⚙️ Config (~/.config/obsync/config)
**Edit ~/.config/obsync/config**
```
OBSIDIAN_DIR="$HOME/ObsidianVault"
REPO_DIR="$HOME/GitHub/ObsidianSync"
REMOTE_REPO="git@github.com:yourname/repo.git"
BRANCH="main"
EXCLUDE_PATTERNS=(
".obsidian/"
".trash/"
".git/"
"*.tmp"
)
```
## 🔄Usage
**Basic**:
```bash
obsync -u # Upload
obsync -d # Download
```
**Options**:
```bash
-u, --upload Push to GitHub
-d, --download Pull from GitHub
-c, --config Custom config
-v, --verbose Detailed output
-h, --help Show help
--version Display version
```
## đź“„Requirements
- Bash 4.0+
- Git
- rsync
- GNU Make
## 🗑️ Uninstall
```bash
sudo make uninstall
```