Skip to content

bacio sync

bacio sync mirrors the SQLite DB to a checked-in folder of YAML + markdown in a separate sync repo. You push and pull through normal git; conflicts resolve last-writer-wins per record.

Subcommands

SubcommandWhat it does
bacio syncSteady state: pull → import → export → commit → push. Run whenever.
bacio sync init <local-path>Connect the current project to a sync repo at <local-path> and run an initial sync. Handles fresh bootstrap, an empty git init-only / cloned-empty-bare folder, and attach mode against an already-populated sync repo. Writes .bacio/config.yaml in your project.
bacio sync clone [<local-path>]Join an existing sync repo from a second machine. Refuses to overwrite local issues unless --allow-renumber is passed.
bacio sync verifyCheck that local DB and sync repo agree, without writing.
bacio sync inspect <prefix>Inspect the synced state for one repo prefix.
bacio sync export <path>(Hidden) Export the DB to a path without git operations.
bacio sync import <path>(Hidden) Import from a path without git operations.

Flags

bacio sync (steady state)

FlagWhat it does
--no-importSkip the import phase (files → DB).
--no-exportSkip the export phase (DB → files).
--no-pushDo everything but the final git push.

Plus --dry-run from the global set, which projects what would change without writing.

bacio sync init <local-path>

<local-path> may be:

  • a missing or empty directory (fresh bootstrap),
  • an existing git init-only folder, or a freshly git clone-ed empty bare remote (sentinel + .gitattributes are written, then the first export is committed and pushed),
  • an existing bacio sync repo (attach mode: pull → import → re-export → commit → push; the current project joins alongside any projects already exported there).
FlagWhat it does
--remote <url>Git URL of the remote sync repo. Sets up origin and writes .bacio/config.yaml. Optional when <local-path> already has an origin configured — the URL is auto-detected; supplying a mismatching --remote errors.

bacio sync clone [<local-path>]

FlagWhat it does
--allow-renumberPermit local rows to be renumbered or renamed to resolve collisions with the sync repo. Without it, clone errors with a preview if there's anything to renumber.

bacio sync inspect <prefix>

At most one of these may be set; without any, you get a per-prefix summary:

FlagWhat it does
--issue <KEY>Show one issue's parsed YAML + body.
--feature <slug>Show one feature.
--doc <filename>Show one document.

For the full walk-through (first-time setup, joining a second machine, conflict semantics, on-disk YAML/markdown layout, diagnostics) see Sync across machines and Browse in your editor.

See also

bacio · v0.1 · MIT