TypeScript SDK

Official @developerhub/sdk client for Node.js 18+ and modern JavaScript runtimes.

Install

pnpm
pnpm add @developerhub/sdk

Inside this monorepo the package already lives at packages/sdk. Shared types are re-exported from @developerhub/types.

Quick start

TypeScript
import { createClient } from "@developerhub/sdk";

const client = createClient({
  baseUrl: "/api/v1",
});

client.setApiKey("dh_your_api_key_here");

const result = await client.executeTool("dns-lookup", {
  host: "example.com",
});

console.log(result.output);

Auth modes

The client supports JWT session auth for dashboard flows and API key auth for server-to-server calls.

Auth
// JWT
await client.login({ email: "you@example.com", password: "secret" });

// API key
client.setApiKey("dh_your_api_key_here");

Methods

MethodDescription
login(...)Authenticate and store an access token
executeTool(slug, input)Run a server tool
listKeys()List API keys for the current user
createKey(...)Create an API key (secret returned once)
listExecutableTools()List tools available on the execute API

Need the HTTP contract instead? See the API Reference.