npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kud/pcloud-sdk

v0.1.0

Published

Typed pCloud API client — shared SDK for CLI, MCP, and extensions

Readme

@kud/pcloud-sdk

Typed pCloud API client — shared SDK for CLI, MCP, and extensions.

Install

npm install @kud/pcloud-sdk

Requires Node.js 20 or later.

Quick start

Username / password

import { PCloudAPI } from "@kud/pcloud-sdk"

const api = new PCloudAPI()
await api.authenticate("[email protected]", "password")

const info = await api.userInfo()

OAuth access token

import { PCloudAPI } from "@kud/pcloud-sdk"

const api = new PCloudAPI()
api.setAccessToken("your-access-token")

const folder = await api.listFolder("/")

The default API server is https://eapi.pcloud.com (EU endpoint). Pass a second argument to setAccessToken to override it.

API reference

All methods return a typed promise. result: 0 indicates success; a non-zero result with an error string indicates failure.

Authentication

| Method | Description | | ----------------------------------- | ----------------------------------------------- | | authenticate(username, password) | Password auth — stores session token internally | | setAccessToken(token, apiServer?) | OAuth auth — optionally override the API server |

Account

| Method | Description | | ------------ | ------------------------------------- | | userInfo() | Returns account info, quota, and plan |

Files & folders

| Method | Description | | ---------------------------- | ---------------------------------------------- | | listFolder(path?) | List folder contents (default "/") | | stat(path) | File or folder metadata | | createFolder(path) | Create folder if it does not already exist | | deleteFolder(folderid) | Delete folder and all its contents recursively | | copyFile(fileid, topath) | Copy file to a destination path | | moveFile(fileid, topath) | Move file to a destination path | | renameFile(fileid, toname) | Rename file in place | | deleteFile(fileid) | Permanently delete a file | | getFileLink(fileid) | Get a temporary download link | | checksumFile(fileid) | Returns SHA-256, SHA-1, and MD5 checksums |

Revisions

| Method | Description | | ------------------------------------ | ------------------------------------ | | listRevisions(fileid) | List available revisions for a file | | revertRevision(fileid, revisionid) | Revert a file to a previous revision |

Sharing

| Method | Description | | ------------------------------------------ | --------------------------------- | | listShares() | List active shares | | shareFolder(folderid, mail, permissions) | Share a folder with another user | | acceptShare(sharerequestid) | Accept an incoming share request | | declineShare(sharerequestid) | Decline an incoming share request | | removeShare(sharerequestid) | Remove an existing share |

Public links

| Method | Description | | ------------------------------------------------ | --------------------------------- | | getFilePublink(fileid, expire?, maxdownloads?) | Create a public link for a file | | getFolderPublink(folderid, expire?) | Create a public link for a folder | | listPublinks() | List all active public links | | deletePublink(code) | Delete a public link by code |

Zip

| Method | Description | | ---------------------------------------------- | ------------------------------------- | | getZipLink(fileids[], folderids?, filename?) | Get a download link for a zip archive |

Trash

| Method | Description | | -------------------------- | ----------------------------- | | listTrash() | List items in the trash | | restoreFromTrash(fileid) | Restore a file from the trash |

Rewind

| Method | Description | | ----------------------------------- | ------------------------------------------ | | listRewindFiles(path) | List rewind events for a path | | restoreFromRewind(fileid, topath) | Restore a file from rewind to a given path |

Low-level

| Method | Description | | ---------------------------- | -------------------------------------------------------- | | request<T>(method, params) | Generic request — maps directly to a pCloud API endpoint |

Types

All types are exported from the package root.

| Type | Description | | ------------------------ | ----------------------------------------------------------- | | PCloudFile | File metadata: fileid, name, path, size, modified | | PCloudFolderItem | Item within a folder listing — file or subfolder | | PCloudFolderMetadata | Folder metadata including its contents array | | PCloudFolderResponse | Response wrapper for folder operations | | PCloudUserInfo | Account info: email, quota, usedquota, plan | | PCloudFileLinkResponse | Download link: hosts[] and path | | PCloudChecksumResponse | Checksums: sha256, sha1, md5 | | PCloudRevision | Single revision entry | | PCloudShareItem | Share record with permissions and status | | PCloudPublink | Public link with code, expiry, and download count | | PCloudTrashItem | Trash entry extending PCloudFile with deletetime | | PCloudRewindItem | Rewind entry with fileid, path, and time | | PCloudResponse<T> | Generic response wrapper | | PCloudAuthResponse | Raw authentication response |

Licence

MIT