Scoping the folder
Shared agent memory works better when it’s curated. A folder holding
node_modules/ and build output costs sync bandwidth, buries the documents that
matter, and gives agents thousands of irrelevant paths to wander into.
Two mechanisms control it: an include list that narrows the project to a
subfolder, and .bdriveignore that opts individual paths out. Both are
applied symmetrically — the same filter governs what’s read from disk and what’s
written back to it.
Sync only a subfolder
Section titled “Sync only a subfolder”bdrive init --shared wikiThis is the right shape inside a code repository: sync wiki/ or docs/ and
leave the source tree alone. The agent gets a knowledge folder; the code stays
in git where it belongs. The interactive bdrive init asks the same question.
The result lands in .bdrive/config.json as an include list:
{ "id": "m-5a10b713", "volume": "notes", "remote": "https://drive.example.com/p/p-7f3a2c91", "include": ["wiki/"] }Opt files out
Section titled “Opt files out”.bdriveignore sits at the mount root and works like .gitignore:
# commentsnode_modules/*.logbuild/!build/keep.txt/only-at-rootSupported: # comments, *, **, ?, a trailing / for directories, a
leading (or any) / for root-anchoring, and ! to re-include.
It syncs like a normal file, so every device shares the same rules — one person
excluding *.tmp fixes it for the whole team.
bdrive init seeds a starter one covering node_modules, build directories,
caches, and .env*.
Opting out is non-destructive
Section titled “Opting out is non-destructive”When a pattern starts matching an already-synced file, the file stops syncing but is deleted nowhere. The path is dropped from the local cache without a delete op, so opting out on your machine never removes the file from anyone else’s.
What never syncs
Section titled “What never syncs”Regardless of configuration:
.gitdirectories — per-file last-writer-wins would corrupt a repository. If git is the content you want synced, you want git, not BearDrive..DS_Store.- The
.bdrive/settings directory — and it holds no credentials; the session token stays in~/.bdrive. - BearDrive’s own temp files (
.bdrive-tmp-*). - Nested mounts — a subdirectory with its own
.bdrive/config.jsonsyncs only through its own project. The parent never scans into it, writes over it, or propagates deletes for it. - Empty directories — not tracked, the same as git.
A note on secrets
Section titled “A note on secrets”.bdriveignore is the mechanism for keeping .env* and key material out, and
the seeded default covers the common cases. But treat it as hygiene, not a
security control: any org member can mint a public link for any synced file.
Secrets belong in a secret manager, not in a folder you hand to agents.