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

Init and commit

Prerequisites

The schema CLI installed. A directory containing schema files (or a fresh directory you are about to populate).

The task

cd my-schemas/
schema init                 # create .panproto/
schema add user.json
schema commit -m "initial user schema"
schema log                  # show history

init creates a .panproto/ directory analogous to .git/. add stages a schema; commit creates a content-addressed snapshot. The behaviour matches git for the parts that overlap.

To inspect the current state:

schema status
schema diff               # diff working tree vs HEAD
schema show <commit-hash>

Verification

schema log --oneline

prints the commit history. Each commit shows its blake3 hash, schema hash, message, and author.

Common mistakes

  • Forgetting to schema add before schema commit. Like git, the staging area is explicit; commits only include staged changes.
  • Editing inside .panproto/objects/ directly. The store is content-addressed; manual edits break the hash invariants.

See also