| name | bit-sync |
| description | Sync between .bit files and .bitstore. Collapse files into the store or expand the store back to files. Use after editing .bit files or when you need fresh context from the store. |
| user-invocable | true |
| argument-hint | [collapse|expand|status] |
Sync .bit ↔ .bitstore
Keep .bit files and the .bitstore database in sync.
Commands
Collapse (files → store)
Pack all .bit files into the queryable .bitstore:
bit collapse . --output project.bitstore
Use after editing .bit files directly.
Expand (store → files)
Unpack the .bitstore back to editable .bit files:
bit expand project.bitstore --output .
Use when you need to hand-edit content.
Status (check drift)
See what's changed between files and store:
bit status project.bitstore .
Shows added, modified, and deleted files.
When to sync
- After
/bit-init — collapse to create the initial store
- After manual .bit edits — collapse to update the store
- After store mutations (bit insert/update) — expand to update files
- Before committing — ensure store and files match
Quick reference
bit collapse .
bit expand project.bitstore
bit status project.bitstore .
bit query project.bitstore "@X"
bit info project.bitstore