# BearDrive — Google Drive for AI agents [![Star on GitHub](https://img.shields.io/github/stars/runbear-io/beardrive?style=flat&logo=github&label=star%20this%20repo&color=f5a623)](https://github.com/runbear-io/beardrive) [![Go Reference](https://pkg.go.dev/badge/github.com/runbear-io/beardrive.svg)](https://pkg.go.dev/github.com/runbear-io/beardrive) [![Docs](https://img.shields.io/badge/docs-beardrive.ai-2f81f7)](https://docs.beardrive.ai) **BearDrive** mounts any folder as a synced volume: its contents stay synchronized across all your devices and teammates through a BearDrive **hub**, every change is tracked (who, when, on which device), and everything keeps working offline. The CLI is `bdrive`; a hub is a `bdrive serve` server you (or we) run on an object store — clients sync through it over HTTPS and never touch the storage directly. What it's for, first and foremost: **sharing context across AI agents** — give every agent on the team the same folder as memory, and your agent knows what their agent knows. (People are covered too: any synced file becomes a public URL that renders as a page.) Notes, plans, findings, and artifacts follow the team everywhere — and unlike a memory API, they stay **real files with provenance**: every change is attributed to the human, agent, and device that made it, and the hub's Dashboard shows what your agents actually read (and which hot-but-stale docs nobody maintains).

Knowledge Insights — every file plotted by agent/human reads vs staleness; hot-but-stale docs are the danger zone

| Browse with read heat | Public share pages | |---|---| | ![Folder listing with per-file agent read counts and change feed](docs/assets/browse.png) | ![A shared markdown file rendered as a public page](docs/assets/share.png) | ```console $ bdrive login https://your-hub # once per device — self-host a hub in ~10 min (docs/self-hosting.md) $ cd ~/workspace && bdrive init initialized /Users/snow/workspace server: https://your-hub project: workspace (7f3a2c91-4d5e-4b8a-9c17-2ad0f6b3e9c4) claude hooks registered → /Users/snow/.claude/settings.json login: autostart registered → ~/Library/LaunchAgents/ai.beardrive.daemon.plist daemon: running (pid 55434, scan 3s, remote sync 10s) ``` > BearDrive Cloud — zero-setup, bare `bdrive login`, free personal > workspace on signup — at [beardrive.ai](https://beardrive.ai). Or > self-host your own hub. On another machine: ```console $ bdrive login https://your-hub && cd ~/workspace && bdrive init # … connect the same project; the files appear and stay in sync ``` ## What this looks like Say your teammate Dana spent yesterday afternoon with her agent working out why checkout fails for EU cards, and the agent wrote it down. Today you hit a related bug. Here's the difference a shared folder makes. **Without one**, your agent starts from nothing: > **You:** why do EU checkouts fail? > > **Agent:** Let me investigate — searching the payment flow… Some minutes and a few thousand tokens later it rediscovers what Dana's agent already knew. Or it reaches a different conclusion and writes a second doc that quietly contradicts hers. **With BearDrive**, the folder is already fresh before the agent reads a single file — the pull hook runs the moment you hit enter: > **You:** why do EU checkouts fail? > > **Agent:** `shared/findings/eu-checkout.md` [🔗](https://your-hub/p/…) > covers this. Dana's agent traced it to the 3-D Secure redirect dropping the > session cookie on Safari, and the fix it proposes isn't applied yet. Want me > to apply it? When your agent writes its own findings down, the push hook puts them on the hub seconds later, and Dana's next session starts from *your* work. Both directions, no one exporting or pasting anything. Because these are real files, the same folder is also a website: any file can become a public link that renders as a page, the History view shows who changed what from which device, and the Dashboard shows which docs your agents actually read (and which hot ones nobody maintains). ## Features - **Any folder is a project** — `bdrive init` turns any folder into a synced project. Files are *real files on disk*: every tool, editor, and agent can use them with zero integration work. Rename or move the folder freely — state is keyed by a stable id, never the path. - **Multi-device sync** — devices converge through a shared hub. Each device only writes its own append-only journal, so no locking service is needed; the hub can be backed by any object store. - **Change tracking** — `bdrive log` and the web UI's History view show which account changed which file, when, from which device (name, OS). Content is stored content-addressed, so every version is retained — view or download any point in a file's history. The feed can be narrowed by path, author and date range, and the narrowed view has its own URL. - **Cloud-provider agnostic** — a hub can store on Amazon S3 (`s3://`), Google Cloud Storage (`gs://`), any S3-compatible store (MinIO, Cloudflare R2 via `AWS_ENDPOINT_URL`), or a plain shared directory (`file://`, e.g. a NAS). Clients never see it. - **Offline-first** — the working folder is always fully usable with no network. Changes are journaled locally and pushed when the remote becomes reachable again. - **Conflict-safe** — concurrent edits resolve deterministically (last-writer-wins), and the losing version is preserved as a `name.bdrive-conflict--