A command-line tool for syncing Obsidian plugin development files to your Obsidian vault.
- Syncs your plugin's development files to your Obsidian vault with a single command
- Automatically detects plugin ID from manifest.json
- Optional build step before syncing
- Watch mode for automatic syncing on file changes
- No dependencies for basic functionality (watch mode requires the
watchdog
package)
git clone https://github.com/wrale/obsidian-plugin-sync.git
cd obsidian-plugin-sync
chmod +x obsidian-plugin-sync.py
curl -o ~/bin/obsidian-plugin-sync.py https://raw.githubusercontent.com/wrale/obsidian-plugin-sync/main/obsidian-plugin-sync.py
chmod +x ~/bin/obsidian-plugin-sync.py
./obsidian-plugin-sync.py --source /path/to/plugin/dev --vault /path/to/vault
./obsidian-plugin-sync.py --source /path/to/plugin/dev --vault /path/to/vault --build
./obsidian-plugin-sync.py --source /path/to/plugin/dev --vault /path/to/vault --plugin-id your-plugin-id
First, install the watchdog package:
pip install watchdog
Then run with the --watch
flag:
./obsidian-plugin-sync.py --source /path/to/plugin/dev --vault /path/to/vault --build --watch
This will continuously watch for changes in your plugin files and automatically sync them to your Obsidian vault.
The tool performs the following steps:
- Reads the plugin ID from manifest.json (or uses the one provided)
- Optionally builds the plugin using
npm run build
- Copies the necessary files (main.js, manifest.json, styles.css) to your Obsidian vault's plugins directory
- In watch mode, it continuously monitors for changes and repeats steps 2-3 when files are modified
- Time-saving: No need to manually navigate directories and copy files
- Consistency: Always copies all required files
- Automation: Combined build and copy process
- Continuous development: Watch mode makes the development cycle faster
- Python 3.6 or higher
- For watch mode:
watchdog
package
MIT