Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started — apply

guisu apply materialises the source state into the destination directory, applying templates, decrypting, and respecting conflict rules. It is the command you will run most often — usually via guisu update which is git pull + apply.

Basic usage

guisu apply                 # apply everything
guisu apply --dry-run       # show what would change, do not write
guisu apply --interactive   # prompt for conflicts in a TUI
guisu apply --force         # overwrite destination without asking
guisu apply path1 path2     # apply only specific paths
guisu apply --include 'dot_*' --exclude '*.tmp'

How status is determined

For each file, Guisu compares three sources of truth:

  1. Target — the rendered, decrypted content the source state wants.
  2. Destination — the file currently on disk.
  3. Database — the content hash stored the last time apply succeeded (in <source>/.guisu-state.db).

The result is one of Synced, Added, Modified, Removed, or Conflict.

TargetDestinationDatabaseStatusDefault action
AAASyncedSkip
ABAModified (by you)Overwrite
AABModified (in source)Apply
ABCConflictPrompt (--interactive) or overwrite
AAddedCreate
BBRemovedDelete
BAModified + RemovedConflict

Interactive mode

--interactive opens a TUI for every conflict, showing a side-by-side diff and four actions: Overwrite, Skip, View Diff, Quit.

guisu apply --interactive

Tip

Pipe-friendly output guisu apply --dry-run prints a list of planned changes. Combine with guisu info for a complete preview before a real apply.

Exit codes

CodeMeaning
0All changes applied (or nothing to do).
1An error occurred.
Non-zero with --dry-runA planned change would have been made.

Hooks

apply runs pre- and post-hooks from .guisu/hooks/{pre,post}/{always,once,onchange}/ around the apply. See Hooks.

Next step

Read the User Guide for the file-attribute conventions, or jump to Templates if your dotfiles need environment-specific rendering.