@cloady/sdk
v0.3.0
Published
Generated TypeScript client + types for the Cloady API (from openapi.json).
Maintainers
Readme
@cloady/sdk
TypeScript client for the Cloady API — fully typed, generated from the platform's OpenAPI contract. The same API the dashboard uses.
Install
npm install @cloady/sdkQuickstart
Create an API token in the dashboard under Account → API tokens.
import { createCloady } from "@cloady/sdk";
const cloady = createCloady({
auth: process.env.CLOADY_TOKEN,
});
const { data } = await cloady.deployApp({
path: { slug: "acme" },
body: {
region: "eu1",
source: { type: "git", repoUrl: "github.com/acme/shop" },
},
});
console.log(data.app.status);Node helpers
@cloady/sdk/node resolves credentials the same way the CLI does — stored config from cloady login, then CLOADY_TOKEN:
import { clientFromEnv } from "@cloady/sdk/node";
const cloady = clientFromEnv();
const { data } = await cloady.getMe();Docs
Full API reference at cloady.com/docs.
