🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@chaser.sh/sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@chaser.sh/sdk

Official TypeScript SDK for the Chaser

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

@chaser/sdk

Official TypeScript SDK for Chaser.

This SDK targets the following surfaces:

  • sessions
  • workspaces
  • exec
  • command lifecycle
  • files
  • browser CDP helpers
  • accounts and organizations
  • service accounts and keys
  • billing
  • lifecycle webhooks
  • audit
  • jobs

Installation

npm install @chaser/sdk

Quickstart

import { ChaserClient } from '@chaser/sdk';

const client = new ChaserClient({
  apiKey: process.env.CHASER_API_KEY,
  account: 'personal'
});

const workspace = await client.workspaces.create({
  name: 'frontend-app',
  session_type: 'sandbox',
  image: 'ghcr.io/example/dev:latest'
});

const session = await client.sessions.create({
  workspace: workspace.name,
  session_type: 'sandbox'
});

await client.sessions.waitUntilReady(session.id);

const result = await client.exec.inSession(session.id, {
  command: 'node -v && pwd',
  cwd: '/workspace'
});

console.log(result.output);

Stateless exec

const result = await client.exec.run({
  ephemeral: true,
  image: 'node:20-bookworm',
  command: 'npm test',
  cwd: '/workspace'
});

File upload/download

await client.files.uploadText(session.id, '/workspace/hello.txt', 'hello from sdk');
const text = await client.files.downloadText(session.id, '/workspace/hello.txt');

Browser CDP helper

const browser = await client.sessions.create({
  session_type: 'browser',
  ephemeral: true
});

const cdp = await client.browser.connect(browser.id);
const version = await client.browser.version(browser.id);
console.log(version.webSocketDebuggerUrl);

await cdp.send('Browser.getVersion');
cdp.close();

Account-scoped automation

const orgClient = client.withAccount('Acme Engineering');

const serviceAccount = await orgClient.accounts.serviceAccounts.create('ci-bot');
const key = await orgClient.accounts.serviceAccounts.keys.create(serviceAccount.id, {
  name: 'ci-key',
  scopes: ['sessions.read', 'workspaces.write', 'exec.write', 'files.read', 'webhooks.write']
});

console.log(key.key);

Command lifecycle

const started = await client.exec.inSession(session.id, {
  command: 'npm run dev',
  cwd: '/workspace',
  background: true
});

if (!started.command_id) {
  throw new Error('expected background command_id');
}

const command = await client.commands.waitForCompletion(session.id, started.command_id, {
  timeoutMs: 30_000
});

console.log(command.status, command.exit_code);

Notes

  • apiKey and token both map to bearer authentication. Either can be used.
  • account maps to the X-Chaser-Account header.
  • File upload/download helpers target sandbox sessions only.
  • client.browser.connect() uses the public CDP endpoint and waits for browser readiness by default.

FAQs

Package last updated on 09 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts