Set up your first sync

Initialize the sync directory, track your first files, push them, and publish the repository with git.

Go from nothing to a published sync repository. By the end, your tracked config files are mirrored into a git repository you can clone on another machine. You need the dotweave CLI installed and git on your PATH.

1. Initialize the sync directory

dotweave init
· Initializing sync directory...
✔ Sync directory initialized
  git: initialized new repository
  age: generated a new local identity
  0 entries · 1 recipients

This creates a git repository under the dotweave home directory and generates an age identity at keys.txt for encrypting secrets.

2. Track your first files

Tracking registers a path in manifest.jsonc. Nothing is copied yet.

dotweave track ~/.gitconfig
dotweave track ~/.config/nvim
✔ Started tracking .gitconfig
  kind  file
  path  /home/you/.gitconfig
  repo  .gitconfig
  mode  normal

For anything with credentials in it, add --mode secret so the content is encrypted before it reaches the repository:

dotweave track ~/.ssh/config --mode secret --permission 0600

3. Push into the sync directory

Check what would happen first, then apply it:

dotweave status
dotweave push
· Pushing changes...
✔ Push complete
  plain: 2
  encrypted: 1
  symlinks: 0
  dirs: 1
  0 stale artifacts removed

4. Publish with git

push only wrote files. Committing and publishing are separate steps you run yourself:

dotweave cd
git add -A && git commit -m "Initial sync"
git remote add origin <your-repo-url>
git push -u origin main
exit

dotweave cd opens a child shell rooted at the sync directory. exit returns you to where you were.

Back up keys.txt from the dotweave home directory somewhere safe now. It is never committed and never synced, and without it your encrypted files cannot be read on another machine.

Check the result

Run dotweave status again. Both directions should be clean:

· Checking sync status...
~ Sync status — 3 entries, 1 recipients, profile: default

Push changes (repository)
  No push changes

Pull changes (local)
  No pull changes

If status still lists push changes, run dotweave push again and read what it reports. If a tracked path is missing, dotweave doctor names it.

Continue with Set up a second device to restore this configuration elsewhere, or read Directory and repository layout to see what push just wrote.