···18181919## Updates
20202121-As you publish content Sequoia will store a record of content in `.sequoia-state.json`, keeping track of the AT URIs for each post and generating content hashes for the content inside each markdown file. When you update a post and run the publish command, Sequoia will generate hashes again, see the difference, and update the existing post rather than creating a new one.
2121+As you publish content Sequoia will store a record of content in `.sequoia-state.json`, keeping track of the AT URIs for each post and generating content hashes for the content inside each markdown file. When you update a post and run the publish command, Sequoia will generate hashes again, see the difference, and update the existing post rather than creating a new one.
2222+2323+### Auto-Sync
2424+2525+By default, Sequoia will automatically sync state from your PDS before publishing when the state file is missing or empty. This prevents duplicate posts when publishing from a fresh clone or CI environment. Auto-sync will:
2626+2727+- Fetch existing documents from your PDS for the configured publication
2828+- Match them to local files by their URL path
2929+- Update the local `.sequoia-state.json` with matched records
3030+- Add `atUri` to the frontmatter of matched posts if not already present
3131+3232+To disable auto-sync, set `autoSync` to `false` in your config:
3333+3434+```json
3535+{
3636+ "autoSync": false
3737+}
3838+```
22392323-If you happen to loose the state file or if you want to pull down records you already have published, you can use the `sync` command.
4040+### Manual Sync
4141+4242+If you want to manually pull down records you already have published, you can use the `sync` command.
24432544```bash [Terminal]
2645sequoia sync
2746```
28472929-Sync will use your ATProto handle to look through all of the `standard.site.document` records on your PDS, and pull down the records that are for the publication in the config.
4848+Sync will use your ATProto handle to look through all of the `site.standard.document` records on your PDS, and pull down the records that are for the publication in the config. Use the `--update-frontmatter` flag to also update your local markdown files with `atUri` fields.
30493150## Bluesky Posting
3251