Generate docs anywhere, push from anywhere, pull on any machine — no manual copying, no git commands. Manage your docs entirely from the CLI.
I use Claude Code CLI, GitHub Copilot, and other AI tools to generate markdown documentation across multiple machines — laptops, desktops, cloud VMs. The problem is getting those docs from one machine to another. I was manually copying files into a dedicated git repo, running git push, then git pull on every other machine. It was painful and broke my flow.
docsync makes it simple: push a doc from wherever it lives, pull it on any other machine.
npm install -g docsync-cliOr run from source:
git clone https://github.com/HcySunYang/docsync.git
cd docsync
pnpm install
pnpm run builddocsync initThis walks you through connecting to your GitHub docs repo and setting up authentication.
docsync push ./design.mdAn interactive folder picker shows your existing repo folders. Pick one or type a new path (e.g. guides/setup/) — it gets created automatically.
? Where to save? (arrow keys to browse, type to filter or create new folder)
📂 / (repo root)
📂 guides/
📂 guides/setup/
📂 notes/
📝 Create: my-new-folder/
✅ Pushed design.md → guides/setup/design.md (4.5 KB)
You can also push multiple files or an entire directory:
docsync push ./docs/*.md
docsync push .docsync pullDownloads everything from your GitHub repo to ~/.docsync/docs/, preserving the folder structure:
📂 guides/
📂 setup/
design.md 4.5 KB ✅ new
deployment.md 2.1 KB ✅ updated
📂 notes/
meeting.md 1.1 KB ── unchanged
✅ Pulled 2 files (6.6 KB) to ~/.docsync/docs/
docsync open
docsync open guides/Opens your local docs folder in Finder / file manager.
docsync list
docsync list guides/Shows a tree view of all docs in your remote repo:
📂 guides/
📂 setup/
design.md 4.5 KB
deployment.md 2.1 KB
📂 notes/
meeting.md 1.1 KB
3 files, 7.7 KB total
docsync cat guides/setup.mdPrints the file content to stdout (pipeable: docsync cat notes.md | pbcopy). Run without arguments for an interactive file picker.
docsync rm guides/old-doc.mdShows what will be deleted and asks for confirmation. Run without arguments for an interactive multi-select picker to choose which files to remove.
docsync mv guides/old.md references/new.md
docsync mv guides/doc.md notes/ # keeps original filenameMoves a file within the remote repo (atomic, single commit). Run without arguments for an interactive file picker (source) + folder picker (destination).
- Uses a GitHub repo as the central storage — version history comes for free
- Dual transport: GitHub REST API (works without git installed) or git CLI (faster, auto-detected)
- Push from anywhere — files don't need to be in a special folder
- Token resolution: config file →
$GITHUB_TOKEN→gh auth token
If docsync push or docsync pull hangs, you likely need a proxy to reach GitHub. docsync auto-detects proxy settings from your environment variables (https_proxy, http_proxy, all_proxy), but they must be set before running docsync.
# Set your proxy first
export https_proxy=http://127.0.0.1:<port>
export http_proxy=http://127.0.0.1:<port>
# Then run docsync
docsync push ./design.mddocsync will automatically pass proxy settings to both the GitHub API client and the git CLI transport. Network operations timeout after 120 seconds — if you see a timeout error, check your proxy/internet connection.
Double-check the owner/repo you entered during docsync init. A common mistake is typos in the repo name. Re-run docsync init to fix it.
Also make sure your GitHub token (PAT) has the repo scope, which is required to access private repositories.
Your GitHub token may be expired or have insufficient permissions. Re-run docsync init to set a new token.
MIT