DotweaveDotweave
DocsGitHub
DotweaveDotweave
    • Introduction
    • Install Dotweave
    • Set up your first sync
    • Set up a second device
    • How syncing works
    • Directory and repository layout
    • Sync modes
    • Profiles
    • Platform-specific paths
    • Secrets and encryption
    • Track files and directories
    • Push, review, and commit day to day
    • Keep several devices in sync
    • Enable shell autocomplete
    • Install the agent skill
    • Upgrade config and repository formats
    • Troubleshoot a broken sync
    • dotweave init
    • dotweave track
    • dotweave push
    • dotweave pull
    • dotweave status
    • dotweave untrack
    • dotweave cd
    • dotweave profile
    • dotweave doctor
    • dotweave autocomplete
    • dotweave skill
    • manifest.jsonc
    • settings.jsonc
    • Environment variables and paths
    • Error messages
DocsGitHub
  1. Dotweave/
  2. Set up a second device

Set up a second device

Clone an existing sync repository with its age key and materialize tracked files on a new machine.

Adopt a sync repository you already published, without losing access to your encrypted files. By the end, every tracked path exists on the new machine. You need the dotweave CLI installed, git on your PATH, and the age private key from the machine that created the repository.

1. Bring the age identity with you

Secret artifacts are encrypted to the recipients in manifest.jsonc. The matching private key lives in keys.txt on your first machine, and Dotweave never commits or syncs it. Copy it here yourself, through a password manager or a secure transfer.

cat ~/dotweave.agekey

The file holds one or more lines beginning with AGE-SECRET-KEY-.

Without a key that matches one of the repository's recipients, dotweave pull cannot decrypt secret files. If every copy of the key is gone, those artifacts are unrecoverable.

2. Clone with dotweave init

Pass the key file so init can adopt the existing identity:

dotweave init <your-repo-url> --key-file ~/dotweave.agekey

Omit --key-file and init prompts for the key instead, which works in an interactive terminal and fails in a script.

3. Preview the pull

Nothing has been written to your home directory yet. Look at the plan before applying it:

dotweave status
dotweave pull --dry-run
· Preparing pull...
~ Planned pull changes

Update from repository (1)
  + /home/you/.config/nvim/init.lua
~ Pull preview (dry run)
  updated: 1 paths would be updated
  removed: 0 paths would be removed

Read the removal list carefully. pull deletes local files the repository does not have, so a config file you created only on this machine and never tracked is safe, but a tracked path with no artifact is removed.

4. Apply the pull

dotweave pull

pull prints the plan and asks Apply these changes? [y/N] . Answer y. Pass -y to skip the prompt, which is required in a non-interactive terminal:

dotweave pull -y

Check the result

dotweave doctor
dotweave status
· Running checks...
✔ Doctor passed (6 ok · 0 warnings · 0 failures)

doctor confirms the repository is readable, the config validates, the identity file is present, and every tracked path exists. If it reports an identity failure, revisit step 1. If a secret will not decrypt, your key does not match any recipient in manifest.jsonc.

Continue with Push, review, and commit day to day now that both machines are set up, or read Keep several devices in sync for the order of operations that avoids clobbering work.

← PreviousOverviewSet up your first syncInitialize the sync directory, track your first files, push them, and publish the repository with git.→ NextConceptsHow syncing worksThe push and pull pipelines, why Dotweave never runs git for you, and what a dry run reports.

On this page

  1. 1. Bring the age identity with you
  2. 2. Clone with dotweave init
  3. 3. Preview the pull
  4. 4. Apply the pull
  5. Check the result