The DoTs GitHub repository.
DoTs
Last verified 21 Oct 2026
DoTs is DigitalOcean’s official TypeScript client library for the DigitalOcean API.
Installation
Prerequisites: Node.js 18+, TypeScript 5+, and "type": "module" in your package.json.
Install the package:
npm i @digitalocean/dotsQuickstart
Authenticate with a personal access token. Set your token as an environment variable before running the example:
export DIGITALOCEAN_TOKEN=<your-api-token>Create a client and list your Droplets:
import {
createDigitalOceanClient,
DigitalOceanApiKeyAuthenticationProvider,
FetchRequestAdapter,
} from "@digitalocean/dots";
const token = process.env.DIGITALOCEAN_TOKEN;
const authProvider = new DigitalOceanApiKeyAuthenticationProvider(token!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);
const resp = await client.v2.droplets.get();
if (resp?.droplets) {
for (const droplet of resp.droplets) {
console.log(`${droplet.id}: ${droplet.name}`);
}
}For serverless inference, use InferenceClient from @digitalocean/dots. See the Inference how-tos for examples.