> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckbrain.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# sync

> Run the whole loop once: crawlers → ingest → embed → index → maintenance

```bash theme={null}
duckbrain sync
```

One idempotent pass: runs each installed crawler's own sync (e.g. `slacrawl sync`), ingests every available archive plus Claude Code sessions from all projects, embeds new rows, rebuilds both search sidecars, then runs lake maintenance (flush inlined data, expire snapshots older than 7 days, compact adjacent files, clean up old files).

Safe to interrupt and re-run — every step is incremental.

## Scheduling

```bash theme={null}
duckbrain schedule --every 6h    # installs a launchd LaunchAgent (sh.duckbrain.sync)
duckbrain schedule off           # removes it
```

Uses **launchd**, not cron: jobs missed while the laptop sleeps fire on wake instead of being skipped. Logs land at `~/.duckbrain/<instance>/logs/sync.log`.


## Related topics

- [Gmail & Calendar](/sources/gmail.md)
