@getgrasp/sdk
Node.js SDK for interacting with the Grasp API.
Usage
Install the package via pnpm:
pnpm add @getgrasp/sdk
Create a client and call methods:
import { Grasp } from '@getgrasp/sdk';
const grasp = new Grasp({
apiKey: process.env.GRASP_API_KEY,
});
const container = await grasp.create({
});
console.log(`Container ${container.id} started at ${container.createdAt}`);
console.log(`CDP endpoint: ${container.browser.wsEndpoint}`);
await container.shutdown();
If you omit apiKey, the SDK reads the GRASP_API_KEY environment variable. The call
rejects immediately when no API key is available.
Development
pnpm --filter @getgrasp/sdk dev – Rebuild on changes.
pnpm --filter @getgrasp/sdk build – Emit production bundles to dist/.
Extend src/index.ts with the real API surface as endpoints become available.