Skip to content

Syncing

Keep thoughts synchronized

Sync keeps your thoughts repository current with your latest work and with your team’s.

Terminal window
hyprlayer thoughts sync

This command:

  1. Creates a searchable index. Builds thoughts/searchable/ with hard links to every file
  2. Stages all changes. Runs git add in the thoughts repository
  3. Commits. Creates a Sync thoughts - <timestamp> commit if anything changed
  4. Pulls. If the repo has a remote, pulls with rebase
  5. Pushes. If it committed in step 3, pushes to the remote. A pull or push failure prints a warning and does not fail the command
Terminal window
hyprlayer thoughts sync --message "Added research on auth system"

hyprlayer thoughts init installs a post-commit hook that syncs thoughts after each code commit in the main checkout. Commits inside a git worktree skip it. The sync runs in the background, so it never slows you down.

The auto-sync commit message includes the code commit message:

Auto-sync with commit: Add user authentication
Terminal window
hyprlayer thoughts status

Shows the current state of the thoughts repository, including any uncommitted changes.

The thoughts repository uses git pull --rebase, so conflicts are rare. Resolve one like this:

  1. Go to your thoughts repository (cd ~/thoughts)
  2. Resolve conflicts manually
  3. Run git rebase --continue
  4. Run hyprlayer thoughts sync to push the resolution