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-ink

v2.0.8

Published

Ink components for rendering pCloud domain objects — file lists, change history, account panels

Readme

@kud/pcloud-ink

☁️ Ink components for rendering pCloud domain objects — file listings, change history, shares, sync health, and the assembled browser.

The presentation layer of the pCloud toolchain: @kud/pcloud provides the types, formatters and rewind engine, this package renders them, and @kud/pcloud-cli consumes them.

Install

npm install @kud/pcloud-ink

ink (>=7) and react (>=19) are peer dependencies.

Usage

Every list component is presentation-only — props in, no data fetching, no input handling. The consuming surface owns selection, navigation and loading, so the same component composes into a one-shot CLI command or a pane in a larger dashboard.

import { render } from "ink"
import { FileList, sortItems } from "@kud/pcloud-ink"

const { unmount } = render(
  <FileList items={sortItems(contents)} rows={contents.length} />,
)
unmount()

Components

| Component | Renders | | --------------- | ----------------------------------------------- | | FileList | Folder contents — kind, name, size, modified | | ChangesList | Change events, folded into one row per file/day | | ShareList | Folder shares, in either direction | | TrashList | Deleted items, with the id that restores each | | PublinkList | Public links, with downloads and expiry | | RevisionList | A file's revisions, newest first | | SyncList | Local sync pair health | | SettingsPanel | Client ignore rules | | AccountPanel | Email, plan and storage use with a progress bar |

Each takes rows (the visible window height) and an optional selected index. Lists are controlled: pass selected and own the key handling yourself.

The assembled browser

PCloudBrowser is the exception — a full interactive client, not a presentation-only component. It mounts the lists above into six tabs and owns its own navigation.

import { render } from "ink"
import { PCloudBrowser } from "@kud/pcloud-ink"

render(<PCloudBrowser onExit={() => process.exit(0)} api={client} />, {
  alternateScreen: true,
})

| Prop | Purpose | | ---------- | ------------------------------------------------------------------------- | | onExit | Required. The host owns the terminal lifecycle, so quitting is yours | | api | An authenticated client. Omit and the stored credential is used | | sync | Reads local sync pairs. Omit and the Sync tab is absent | | settings | Reads and writes client settings. Omit and the Settings tab is absent |

sync and settings are providers rather than built-in because they read a SQLite database on the host machine, not the pCloud API. A rendering package has no business opening that file, and a consumer with no local pCloud install should not be offered a tab that could only ever be empty.

Helpers

  • sortItems — folders first, then files, each alphabetically
  • windowSlice — the visible slice that keeps selected in view
  • fit — pad and truncate to an exact width, always leaving a gutter
  • eventTone — maps a change event to its glyph, label and colour
  • buildRuns / buildRows — fold change events into runs and day headings
  • byNewest — order revisions by id, since the API promises no order
  • shareRights — the four permission booleans as positional rwcd

Accessibility

State is never carried by colour alone.

Change events are distinguished by glyph and label (+ created, ~ modified, - deleted) with colour as reinforcement only. Directories are marked with a trailing slash. Share permissions render positionally as rwcd, so rw-- and r--d are distinguishable at a glance where "read, modify" and "read, delete" are not. Sync health leads with or before any colour is applied.

Every fixed-width column goes through fit, which truncates as well as pads — a value that exactly fills its column would otherwise weld itself to the next one, and padEnd alone never shortens anything.

Licence

MIT © kud