Skip to main content

Installation

npm install arga-sdk
Requires Node 18+ (uses native fetch). Zero runtime dependencies.

Quick start

import { Arga } from 'arga-sdk';

const client = new Arga({ apiKey: 'arga_sk_...' });

// Start an ad hoc browser test run
const run = await client.testRuns.create({
  prompt: 'Test checkout with Stripe',
  startUrl: 'https://staging.myapp.com',
  twins: ['stripe'],
});

// Wait for completion
const detail = await client.testRuns.wait(run.id);
console.log(detail.status, detail.artifactsJson);

Reference

Runs

Use the canonical sandbox, twin, saved-test, and test-run resources, plus legacy runs when needed.

Twins

Use both canonical twin runs and legacy twin quickstart helpers.

Scenarios

Create reusable seed configs and use them to seed short-lived twin runs.

Error handling

Handle SDK API errors in TypeScript.

Examples

Run production-style scripts from the TypeScript SDK repository.

Source

github.com/ArgaLabs/arga-typescript-sdk