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

Checkout

sekai checkout ./world 1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b
sekai checkout ./world 2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a --in overworld

Rebuilds the world from a commit, overwriting region files atomically (temp file in the target directory + fsync + rename; in-place mutation never happens). The commit argument is a revision: a 64-character commit hash, a ref name, or HEAD (alias @), optionally followed by one ~<n> to step back to an ancestor, such as HEAD~1. Files are stamped with the commit time, and volatile tags are rewound to capture values.

The default policy is strict:

  • region files unknown to the commit (created afterwards) are deleted;
  • chunks unknown to the commit vanish on rebuild;
  • tombstoned chunks are removed (fully tombstoned regions delete the file, never leaving a header-only shell);
  • a blob missing from CAS aborts loudly (corruption — a partial world would be worse than none).

Each behavior is configurable without changing the default:

FlagEffect
--keep-post-commit-fileskeep commit-unknown files instead of deleting them
--keep-post-commit-chunkskeep live bytes for commit-unknown chunks inside rebuilt regions
--keep-tombstoned-chunkskeep live bytes for tombstoned chunks; fully tombstoned files are left alone
--on-missing-blob skip-chunkskip chunks whose blob is missing (default abort)
--on-missing-file derived-only|errorignore sibling folders, or fail, instead of guessing a location (default sibling-first)
  • --jobs N sets how many files rebuild at once (0 means one per CPU).
  • Scope flags (--in, --region, --kind) rebuild and delete only inside the scope; see Scope selection. Combine with --timing/--json as usual.
  • Before rebuilding, the CLI echoes the target commit, scope, and policy to stderr (human output only).

For the narrower case — undo local changes in one area against HEAD (or another source) without recording anything — see Restore.