Index
Edit

Exec

usage: sanity exec SCRIPT

   Runs a script in Sanity context

Options
  --with-user-token

Examples
  # Run the script at some/script.js in Sanity context
  sanity exec some/script.js

  # Run the script at migrations/fullname.js and configure `part:@sanity/base/client`
  # to include the current users token
  sanity exec migrations/fullname.js --with-user-token

Previous: DocumentsNext: Help