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

@andie/cd2

v0.0.4

Published

CloudDrive2 gRPC CLI and Agent Skill

Readme

cd2

cd2 is a Node.js CLI and Agent Skill for basic CloudDrive2 file operations over gRPC.

The npm package is @andie/cd2; the executable command is cd2.

Install And Run

npx @andie/cd2 --help

For local development:

pnpm install
pnpm cd2 -- --help

Configure

npx @andie/cd2 config set endpoint localhost:19798
npx @andie/cd2 config set token <api-token>
npx @andie/cd2 config get

Config is stored at ~/.config/cd2/config.json unless XDG_CONFIG_HOME is set.

Precedence:

  1. CLI flags
  2. Environment variables
  3. User config

Environment variables:

CD2_ENDPOINT=localhost:19798
CD2_API_TOKEN=<api-token>

Commands

npx @andie/cd2 stat /docs/a.txt
npx @andie/cd2 ls /docs --refresh
npx @andie/cd2 tree /docs --max-depth 3 --limit 300
npx @andie/cd2 find /docs --name invoice --max-depth 8 --limit 200
npx @andie/cd2 find /docs --glob "*.pdf" --type file
npx @andie/cd2 mkdir /docs/new-folder
npx @andie/cd2 upload ./a.txt /docs/a.txt
npx @andie/cd2 download /docs/a.txt ./a.txt
npx @andie/cd2 rename /docs/a.txt b.txt
npx @andie/cd2 mv /docs/b.txt /archive --conflict skip
npx @andie/cd2 cp /archive/b.txt /docs --conflict rename
npx @andie/cd2 rm /docs/b.txt

Remote paths must be absolute and begin with /.

upload and download take full file paths. mv and cp take destination directories. Use rename to change a file name.

rename takes a single new name, not a path. Use mv to move a file to another directory.

rm uses normal CloudDrive2 deletion by default. Use --permanent only when permanent deletion is explicitly desired.

tree and find use bounded recursive listing. If --max-depth or --limit is omitted, the command applies defaults and reports the effective values in data.limits. Check data.truncated and data.truncation.byLimit / data.truncation.byMaxDepth before treating the result as complete.

find filters names locally from recursive listings; it does not use CloudDrive2 native search.

Output

Commands write stable JSON Agent Results to stdout:

{
  "ok": true,
  "command": "stat",
  "data": {}
}

Diagnostics and progress go to stderr.

Mutation commands return an operation receipt. Prefer these fields over raw CloudDrive2 RPC fields:

{
  "ok": true,
  "command": "cp",
  "data": {
    "from": "/archive/a.txt",
    "to": "/docs/a.txt",
    "destDir": "/docs",
    "conflict": "rename",
    "reportedPaths": [],
    "warnings": [
      {
        "code": "RESULT_PATH_NOT_REPORTED",
        "message": "CloudDrive2 did not report the final path."
      }
    ]
  }
}

For cp, mv, and rename, to is the requested target path. If CloudDrive2 reports affected paths, they appear in reportedPaths; this array can be empty even when the command succeeds. rm returns removed: true after successful deletion.

Development

pnpm test
pnpm typecheck
pnpm build

The normal test suite does not require live CloudDrive2 credentials.

Optional live smoke test:

CD2_ENDPOINT=localhost:19798 \
CD2_API_TOKEN=<api-token> \
CD2_LIVE_ROOT=/ \
pnpm live:smoke

Use a dedicated API token scoped to a disposable test root. If CloudDrive2 token RootDirectoryRequired is set, that root appears to the CLI as /.