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/dots

Quickstart

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.

More Information

GitHub - digitalocean/dots

The DoTs GitHub repository.

github.com
SDK and Client Libraries

All official and community client libraries.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.