The @replayio/cypress package includes an optional wrapper around cypress.run() which exposes a few additional features. run() accepts all the same parameters as cypress.run() as well as the following Replay-specific options:

import { run } from '@replayio/cypress'

// Runs cypress/e2e/my-test-spect.ts in record-on-retry mode
// with a 10s timeout for each attempt.
run({
  mode: "record-on-retry",
  spec: "cypress/e2e/my-test-spec.ts",
  timeout: 10000
}).then(() => {
  console.log("Done!");
});