{"_id":"@backblaze-labs/goose-b2-backup","_rev":"3-c5b88c3195f10bb94e5be43102404e3b","name":"@backblaze-labs/goose-b2-backup","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@backblaze-labs/goose-b2-backup","version":"0.1.0","keywords":["goose","block-goose","backblaze","b2","backup"],"license":"MIT","_id":"@backblaze-labs/goose-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/goose-b2-backup#readme","bugs":{"url":"https://github.com/backblaze-b2-samples/goose-b2-backup/issues"},"bin":{"goose-b2-backup":"bin/goose-b2-backup.mjs"},"dist":{"shasum":"5c917db3da983dfe854833834733bbdb662ef2e8","tarball":"https://registry.npmjs.org/@backblaze-labs/goose-b2-backup/-/goose-b2-backup-0.1.0.tgz","fileCount":5,"integrity":"sha512-eLw6xLSOiok1KgVHjf6cKliODxiuSleTiAivsSjZTtuicLuJP7KRH73m2N8/1TM6oGNk/rULesjiAsXtt5s+sQ==","signatures":[{"sig":"MEQCIHaNqsGp3bgJAmvQch4aUEfMV9CWwLWJ4Q81lkYJ7/j9AiBwrR1W0Elj/G/2IbrgKcBL1YnDVk+iPGblmDvNdIELyA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10381},"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":"dba61aff56461b4fd67d970e75d4fe37f20b9f87","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/goose-b2-backup.git","type":"git"},"_npmVersion":"11.6.0","description":"Back up your Goose (block/goose) sessions, config, and memory to Backblaze B2 — encrypted, incremental, WAL-safe.","directories":{},"_nodeVersion":"24.9.0","dependencies":{"@backblaze-labs/agent-backup-core":"^0.1.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/goose-b2-backup_0.1.0_1782265735270_0.4920570392216794","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@backblaze-labs/goose-b2-backup","version":"0.2.0","keywords":["goose","block-goose","backblaze","b2","backup"],"license":"MIT","_id":"@backblaze-labs/goose-b2-backup@0.2.0","maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"homepage":"https://github.com/backblaze-b2-samples/goose-b2-backup#readme","bugs":{"url":"https://github.com/backblaze-b2-samples/goose-b2-backup/issues"},"bin":{"goose-b2-backup":"bin/goose-b2-backup.mjs"},"dist":{"shasum":"0b7e2982e5f95991f2fe322930b5987a57f52736","tarball":"https://registry.npmjs.org/@backblaze-labs/goose-b2-backup/-/goose-b2-backup-0.2.0.tgz","fileCount":5,"integrity":"sha512-oeg/qsvSYvx1V59wfS1IKULI6WYazXj02PnWD/0xPFlLkTwRJzDjoxAB7Y2fWPOg3O8oF0/pmAMCV0kOGnmrww==","signatures":[{"sig":"MEYCIQClUl51m+J8mEQtdjssCuxJuqYlfefr/L/BcmPAq5mGtwIhAPTLdVGlbeW8dSvJfJYGFGfH7rRRT0h7okrOlN0UWn/G","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8564},"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":"e50f1a1ccacd5fa14cbde54531f43802622ab25a","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/goose-b2-backup.git","type":"git"},"_npmVersion":"11.6.0","description":"Back up your Goose (block/goose) sessions, config, and memory to Backblaze B2 — encrypted, incremental, WAL-safe.","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/goose-b2-backup_0.2.0_1782269839399_0.5789778477642906","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@backblaze-labs/goose-b2-backup","version":"0.3.0","description":"Back up your Goose (block/goose) sessions, config, and memory to Backblaze B2 — encrypted, incremental, WAL-safe.","type":"module","main":"dist/index.mjs","types":"dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"bin":{"goose-b2-backup":"bin/goose-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":["goose","block-goose","backblaze","b2","backup"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/backblaze-labs/goose-b2-backup.git"},"_id":"@backblaze-labs/goose-b2-backup@0.3.0","gitHead":"e50f1a1ccacd5fa14cbde54531f43802622ab25a","bugs":{"url":"https://github.com/backblaze-labs/goose-b2-backup/issues"},"homepage":"https://github.com/backblaze-labs/goose-b2-backup#readme","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-dU+1L4jZo+aA+B7VUcrEanWIefeMQzVTmMPq2XaJhGdrRckoRC6Ggia5GkeXjQYV9BlGyDFSyNTazF87oNdS8A==","shasum":"c95e95f767b407071357e3fa0b64e00f12febcc9","tarball":"https://registry.npmjs.org/@backblaze-labs/goose-b2-backup/-/goose-b2-backup-0.3.0.tgz","fileCount":6,"unpackedSize":9626,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBDsQuH8RMB8ggvOsb8KKJPRH8MCr3bvheQOEzj+y7lQAiEA6mbFp7jpXEct9B2zSOv3ybLQT8tPZM7+wkvJ9NVgDAI="}]},"_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/goose-b2-backup_0.3.0_1782273581615_0.6349736814619229"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T01:48:55.163Z","modified":"2026-06-24T03:59:41.898Z","0.1.0":"2026-06-24T01:48:55.407Z","0.2.0":"2026-06-24T02:57:19.534Z","0.3.0":"2026-06-24T03:59:41.744Z"},"bugs":{"url":"https://github.com/backblaze-labs/goose-b2-backup/issues"},"license":"MIT","homepage":"https://github.com/backblaze-labs/goose-b2-backup#readme","keywords":["goose","block-goose","backblaze","b2","backup"],"repository":{"type":"git","url":"git+https://github.com/backblaze-labs/goose-b2-backup.git"},"description":"Back up your Goose (block/goose) sessions, config, and memory to Backblaze B2 — encrypted, incremental, WAL-safe.","maintainers":[{"name":"goanpeca","email":"goanpeca@gmail.com"},{"name":"jdnyc","email":"jdeleon@jdeleon.com"}],"readme":"# goose-b2-backup\n\nBack up your [Goose](https://github.com/block/goose) state — sessions, config, memory, recipes, and history — to [Backblaze B2](https://www.backblaze.com/cloud-storage). Encrypted, incremental, and WAL-safe. No Goose plugin required; it runs as a small standalone daemon.\n\nBuilt on [`@backblaze-labs/agent-backup-core`](https://github.com/backblaze-labs/agent-backup-core).\n\n## Why\n\nGoose stores every session in a local SQLite database and your config/memory/recipes in plain files. There's no built-in full backup — `goose session export` only handles one session at a time. Lose the disk and it's gone. This mirrors all of it to B2 on a schedule.\n\n## Install\n\n```bash\nnpm install -g @backblaze-labs/goose-b2-backup\n```\n\n## Configure\n\nSet credentials in the environment (or `~/.config/goose-b2-backup/config.json`):\n\n```bash\nexport B2_KEY_ID=004...\nexport B2_APPLICATION_KEY=K004...\nexport B2_BUCKET=my-goose-backups\nexport B2_ENCRYPTION_KEY=\"a long random passphrase\"   # strongly recommended — see Security\n```\n\nOptional: `B2_REGION`, `B2_PREFIX`, `B2_SCHEDULE` (`daily` | `weekly` | cron), `B2_KEEP_SNAPSHOTS`, `B2_ENCRYPT=false`.\n\n## Run\n\n```bash\ngoose-b2-backup            # daemon: auto-restore on first run, then scheduled backups\ngoose-b2-backup --once     # single backup then exit (good for cron / CI)\ngoose-b2-backup --install  # install an OS service (launchd / systemd / Task Scheduler) to run at login\n```\n\n## What gets backed up\n\nResolved from Goose's actual paths (XDG on Linux **and** macOS; `%APPDATA%\\Block\\goose` on Windows; `GOOSE_PATH_ROOT` overrides all):\n\n| Included | Location |\n|---|---|\n| Session history (SQLite, WAL-safe snapshot) | `data:` `~/.local/share/goose/sessions/sessions.db` |\n| Projects index | `data:` `~/.local/share/goose/projects.json` |\n| Config (model/provider/extensions) | `config:` `~/.config/goose/config.yaml` |\n| Memory & recipes | `config:` `~/.config/goose/{memory,recipes}/` |\n| Command history & logs | `state:` `~/.local/state/goose/{history.txt,logs/}` |\n\n**Excluded:** downloaded models (`data/models/` — large, re-fetchable) and SQLite `-wal`/`-shm` sidecars (folded into the snapshot).\n\n## Security\n\n- **Set `B2_ENCRYPTION_KEY`.** It's separate from your B2 credentials, so a leaked bucket key can't decrypt your backups. Without it, the tool falls back to using the B2 application key and warns you.\n- **File-based secrets are never uploaded:** `config/secrets.yaml` (only present if you disabled the keyring) and provider OAuth token caches (`gemini_oauth/`, `githubcopilot/`, etc.) are excluded.\n- **Keyring-stored API keys are not on disk** and therefore not in any backup — Goose's default. If you restore onto a new machine, re-enter provider keys (or re-run provider auth).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}