Skip to content

state push

Upload a state payload to the configured state store, replacing the recorded state. This is the write half of the pull → edit → push routine. NSchema validates that the payload parses as a state snapshot, then writes it.

Terminal window
nschema state push ./edited.json

A payload that doesn’t parse is rejected and nothing is written. Note that validation checks the payload’s shape, not your edits’ meaning, so a misspelled field name isn’t an error, it’s simply ignored; verify the result with state show or script list after pushing.

The push runs under the state lock.

  • file (required) — the state payload to push, e.g. a pulled state file after hand-editing.
  • --no-lock — push without acquiring the state lock. You take responsibility for preventing concurrent runs.