Getting Started
nsuite exposes its public helpers from one package entry. Import only the utilities required by your script or service.
Install
bash
npm install nsuiteThe package supports Node.js 18 and later and ships TypeScript declarations.
Import helpers
ts
import { getDirname, getFilePath, writeFileSafely } from "nsuite";
const filePath = getFilePath(import.meta.url);
const directory = getDirname(import.meta.url);
await writeFileSafely(`${directory}/output.txt`, "Generated by nsuite.", {
encoding: "utf8",
});Select the right guide
- Use Files and Paths for local filesystem work, glob matching, archives, and safe writes.
- Use Remote Services and Storage for SSH, Aliyun OSS, and Qiniu OSS workflows.
- Use the API Reference when you need the precise TypeScript contract.