Skip to main content
The SDK is a TypeScript package for your server. It supports ESM and CommonJS imports and includes type definitions.

Requirements

  • An organization account with Cybr Labs
  • An organization API key
  • Node.js 22 or later, or another server runtime with a standard fetch

Install the SDK

Create a server client

Read the API key from your server configuration:
Keep your API key on your server. It can launch labs and read progress for any learner on your platform, so it must never reach the browser: your frontend calls your own backend routes, and those routes use the SDK.

Launch a lab

  1. List the labs available to your organization:
  1. Resolve the learner ID from your server session. See learners and membership.
  2. Launch the lab:
  1. Save deployment.id with the learner and lab in your database. Later status, terminal, and end requests use that record. See tracking deployments.
  2. Wait for the environment:

Show the connection details

normalizeOutputs turns the lab’s outputs into rows you can render:
Send these values only to the learner who owns the deployment. The launch guide explains each field.

End the lab

When the learner ends the lab, call destroy():
Cybr also ends the environment at its time limit. Ending a lab does not record learner completion.

Next steps

Track deployments

Check ownership, resume after a reload, and avoid duplicate launches.

Web terminal

Give learners a shell in the browser.

Completion and CTF

Verify flags and record completion.

Error handling

Answer the browser with safe errors.