Overview & Installation
Introduction to Nyota Drive and the official isomorphic TypeScript SDK.
Nyota Drive is an enterprise-grade object storage platform backed by Cloudflare R2. It provides secure, S3-compatible file storage with no egress fees, natively integrated into the Nyota ecosystem.
Instead of wrestling with complex AWS IAM policies and raw S3 SDKs, Nyota Drive abstracts the infrastructure. Developers interact with logical entities (Files, Folders, and Shares), while our backend handles quotas, concurrent multi-part uploading, and public CDN routing.
The Official SDK
The @nyota/drive-sdk is an isomorphic TypeScript package. It runs flawlessly in Node.js backends, Edge Workers (Cloudflare/Vercel), and directly in standard Web Browsers.
Installation
Install the package via your preferred package manager:
npm install @nyota/drive-sdkpnpm add @nyota/drive-sdkInitialization
Initialize the SDK by passing your Workspace API Key.
If you provide a key starting with ny_test_, the SDK will automatically
route all uploads to your isolated Sandbox bucket.
import { NyotaDrive } from "@nyota/drive-sdk";
const drive = new NyotaDrive({
apiKey: process.env.NYOTA_API_KEY,
});
// The SDK exposes 4 primary namespaces:
// drive.files.*
// drive.folders.*
// drive.shares.*
// drive.applications.*