@doubling/compound-sync
v1.10.5
Published
Bidirectional sync between Compound and local markdown files
Readme
Compound Sync
Bidirectional sync between Compound and local markdown files. Edit files locally in your favorite editor and they sync to Compound in real time.
Quick Start
npx @doubling/compound-syncThat's it. A browser window will open for sign-in (Google or email/password), then the setup wizard will walk you through selecting your organization and sync folder.
Prerequisites
- Node.js (v18 or later)
What it does
Compound Sync watches a local folder and your Compound workspace simultaneously. Changes in either direction are synced automatically:
- Edit a file locally → it updates in Compound
- Edit a file in Compound → it updates locally
- Create or delete files in either place → synced
Local folder structure
{Sync Folder}/
{TeamName} Teamspace/ -- team files (bidirectional)
Private/ -- your private files (bidirectional)
Shared by Me/ -- symlinks to files you've shared
Shared with Me/ -- files shared with you (read-only)Running
After setup, start syncing with:
npx @doubling/compound-syncThe sync daemon runs until you press Ctrl+C.
Multiple workspaces
If you're a member of more than one workspace, you can sync them all from a single daemon. During --setup you'll be asked which workspaces to sync (comma-separated or all) and given a per-workspace local folder prompt.
You can also keep multiple separate configs (one per workspace, or one for "all my workspaces") with --config pointing at an absolute path:
# Setup
npx @doubling/compound-sync --config ~/.config/compound-sync/work.json --setup
# Run
npx @doubling/compound-sync --config ~/.config/compound-sync/work.json--config accepts absolute paths (with ~ expanded), so you can keep configs outside the package install directory. Bare filenames still resolve relative to the package install for backward compatibility.
Security
- No credentials are stored on disk
- Authentication happens via your browser each time you start the daemon
- All data access respects Compound's security rules
Internal Development
For Doubling team members testing against sandbox or dev environments:
# Setup
npx @doubling/compound-sync --env sandbox --config config-sandbox.json --setup
npx @doubling/compound-sync --env dev --config config-dev.json --setup
# Run
npx @doubling/compound-sync --env sandbox --config config-sandbox.json
npx @doubling/compound-sync --env dev --config config-dev.jsonConfig files (config-*.json) are gitignored and stored locally.
Tests
# Pure unit tests (no emulator required)
npm run test:unit
# Integration tests (boots firestore + storage emulators)
npm run test:integration
# Both
npm testPublishing to npm
After making changes to the sync daemon, publish a new version:
cd sync
npm version patch # or minor/major
npm publishThis is required whenever sync daemon code changes — the npx command pulls from npm, not from the repo. Consider automating this in CI for releases.
