{"_id":"@backblaze-labs/cline-b2-backup","_rev":"2-1321490da28f2ea559997217990d56a4","name":"@backblaze-labs/cline-b2-backup","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@backblaze-labs/cline-b2-backup","version":"0.1.0","keywords":["cline","vscode","cursor","windsurf","backblaze","b2","backup"],"license":"MIT","_id":"@backblaze-labs/cline-b2-backup@0.1.0","maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"homepage":"https://github.com/backblaze-b2-samples/cline-b2-backup#readme","bugs":{"url":"https://github.com/backblaze-b2-samples/cline-b2-backup/issues"},"bin":{"cline-b2-backup":"bin/cline-b2-backup.mjs"},"dist":{"shasum":"30d30553469b2394ce6850d01503a96ff95817d5","tarball":"https://registry.npmjs.org/@backblaze-labs/cline-b2-backup/-/cline-b2-backup-0.1.0.tgz","fileCount":5,"integrity":"sha512-F4YyBsSbKCFEKrrZXy48ZTb5nsU1XoN+yZCFyDTaQ8xYYSr7l8kjyQjpF4lbzeM0jiKyjPcMrCSQIeieNiGnkw==","signatures":[{"sig":"MEUCIQDtFGxP9IQFUbI6/J6nw3JCEk5OGe4C7+0qwm+zn0Uw6AIgL4IDQQ4hlRThcCo7l9FUjoMJX0q/EhRBoeyBNT6B5mE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9671},"main":"dist/index.mjs","type":"module","types":"dist/index.d.mts","engines":{"node":">=22.5.0"},"exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"gitHead":"9a51211159f420a2fccdc833163a51d3fdc6ee88","scripts":{"test":"vitest run","build":"tsdown src/index.ts --format esm --dts --out-dir dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"jdnyc","email":"jdeleon@jdeleon.com"},"repository":{"url":"git+https://github.com/backblaze-b2-samples/cline-b2-backup.git","type":"git"},"_npmVersion":"11.6.0","description":"Back up your Cline (VS Code / Cursor / Windsurf) task history, conversations, and state to Backblaze B2: incremental and encrypted.","directories":{},"_nodeVersion":"24.9.0","dependencies":{"@backblaze-labs/agent-backup-core":"^0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.20.0","vitest":"^4.0.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cline-b2-backup_0.1.0_1782269896388_0.4287769743060139","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@backblaze-labs/cline-b2-backup","version":"0.3.0","description":"Back up your Cline (VS Code / Cursor / Windsurf) task history, conversations, and state to Backblaze B2: incremental and encrypted.","type":"module","main":"dist/index.mjs","types":"dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"bin":{"cline-b2-backup":"bin/cline-b2-backup.mjs"},"scripts":{"build":"tsdown src/index.ts --format esm --dts --out-dir dist","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"dependencies":{"@backblaze-labs/agent-backup-core":"^0.3.0"},"devDependencies":{"@types/node":"^22.0.0","tsdown":"^0.20.0","typescript":"^5.9.0","vitest":"^4.0.0"},"engines":{"node":">=22.5.0"},"publishConfig":{"access":"public"},"keywords":["cline","vscode","cursor","windsurf","backblaze","b2","backup"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/backblaze-labs/cline-b2-backup.git"},"_id":"@backblaze-labs/cline-b2-backup@0.3.0","gitHead":"9a51211159f420a2fccdc833163a51d3fdc6ee88","bugs":{"url":"https://github.com/backblaze-labs/cline-b2-backup/issues"},"homepage":"https://github.com/backblaze-labs/cline-b2-backup#readme","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-V/TpXA/NH6FUILIbm/NK9Z2mOxns7Oy+iT0ZwKu4p8ZD7QaQist8pDjlNnXvmi6oaehhwKXJF7z9ajq2EiVrZg==","shasum":"6830760c888edca0c4933bc887f2ba1d592ebc64","tarball":"https://registry.npmjs.org/@backblaze-labs/cline-b2-backup/-/cline-b2-backup-0.3.0.tgz","fileCount":6,"unpackedSize":11004,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDap0PFrbn0K7iLSlfGv2X6tB6E47dK557vY22SDbVeyAIgbMhAP9OXsRyJDQOjHLYhi7s7qQoXkk6g+u6yfol/78Y="}]},"_npmUser":{"name":"jdnyc","email":"jdeleon@jdeleon.com"},"directories":{},"maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cline-b2-backup_0.3.0_1782273591492_0.18373661733191327"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T02:58:16.209Z","modified":"2026-06-24T03:59:51.758Z","0.1.0":"2026-06-24T02:58:16.515Z","0.3.0":"2026-06-24T03:59:51.647Z"},"bugs":{"url":"https://github.com/backblaze-labs/cline-b2-backup/issues"},"license":"MIT","homepage":"https://github.com/backblaze-labs/cline-b2-backup#readme","keywords":["cline","vscode","cursor","windsurf","backblaze","b2","backup"],"repository":{"type":"git","url":"git+https://github.com/backblaze-labs/cline-b2-backup.git"},"description":"Back up your Cline (VS Code / Cursor / Windsurf) task history, conversations, and state to Backblaze B2: incremental and encrypted.","maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"readme":"# cline-b2-backup\n\nIncremental, **encrypted** backup of your [Cline](https://github.com/cline/cline) task history, conversations, and state to [Backblaze B2](https://www.backblaze.com/cloud-storage) — across VS Code, Insiders, VSCodium, Cursor, and Windsurf.\n\nBuilt on [`@backblaze-labs/agent-backup-core`](https://github.com/backblaze-labs/agent-backup-core).\n\n## Why\n\nCline auto-saves every task (full conversation, metadata) locally, but its only built-in export is per-task markdown — there's no full backup, sync, or restore, and data-loss reports are common. This mirrors all of it to B2 on a schedule.\n\n## Install & configure\n\n```bash\nnpm install -g @backblaze-labs/cline-b2-backup\nexport B2_KEY_ID=004... B2_APPLICATION_KEY=K004... B2_BUCKET=my-cline-backups\nexport B2_ENCRYPTION_KEY=\"a long random passphrase\"   # important — see Security\n```\n\nOr `~/.config/cline-b2-backup/config.json`. Optional: `B2_REGION`, `B2_PREFIX`, `B2_SCHEDULE`, `B2_KEEP_SNAPSHOTS`, `CLINE_DIR`.\n\n## Run\n\n```bash\ncline-b2-backup            # daemon: auto-restore on first run, back up now, then on schedule\ncline-b2-backup --once     # single backup then exit\ncline-b2-backup --install  # install an OS service (launchd / systemd / Task Scheduler)\ncline-b2-backup --help     # usage\n```\n\n> `--install` runs the daemon as a background service, which can't see your shell's\n> `export B2_*` variables — put your credentials in `~/.config/cline-b2-backup/config.json`\n> (chmod 600) before activating it.\n\n## What gets backed up\n\nCline splits its state across two locations; this tool covers both and auto-discovers every editor you have Cline installed in:\n\n- **`~/.cline/data/`** (or `CLINE_DIR`) — `globalState.json`, `secrets.json`, `workspaces/<hash>/`.\n- **Each editor's** `…/User/globalStorage/saoudrizwan.claude-dev/` (VS Code, Insiders, VSCodium, Cursor, Windsurf, plus VS Code profiles — discovered automatically) — `state/taskHistory.json` and `tasks/<id>/` conversations.\n\n**Excluded by default:**\n- **Checkpoints** (`checkpoints/`) — Cline's per-workspace shadow-git can reach tens of GB; mirroring it offsite is rarely worth the cost. (Your project's real git history is unaffected.)\n- Regeneratable caches: `settings/`, `*_models.json`, `mcp_marketplace_catalog.json`.\n\n### Restore note\n\nRestoring writes back into the same editor/profile directories the backup came from. On a fresh machine, an editor whose `globalStorage` directory doesn't exist yet (the editor was never launched, or has a different product/profile name) is **silently skipped** — its data is left in B2, not restored — and the restore logs a per-file warning rather than failing. So before restoring, install and launch each editor (so Cline's storage dir exists). Backup itself has no such requirement.\n\n## Security\n\n- **Set `B2_ENCRYPTION_KEY`** — separate from your B2 credentials. Cline stores provider **API keys in plaintext** at `~/.cline/data/secrets.json`; this tool includes that file (needed for a full restore) but encrypts the whole mirror at rest. Without `B2_ENCRYPTION_KEY` it falls back to the B2 key and warns.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}