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

@pinarkive/pinarkive-cli

v1.0.2

Published

Command-line interface for the Pinarkive API v3

Readme

@pinarkive/pinarkive-cli

Command-line interface for the Pinarkive API v3. Upload files, pin CIDs, list files, delete files, inspect clusters, scaffold from templates, share encrypted files, run diagnostics, and watch folders—similar to the Vercel or Docker CLIs.

Installation

Global install (recommended)

npm install -g @pinarkive/pinarkive-cli

Then run:

pinarkive --help

From source

git clone <repo>
cd pinarkive-cli
npm install
npm run build
node dist/cli.js --help

Or link for local development:

npm link
pinarkive --help

Setup

Store your API key locally (required for all API commands except gateway and open):

pinarkive login

You'll be prompted for your API key. It is saved to ~/.pinarkive/config.json.

Get your API key from Pinarkive or your dashboard.

Commands

| Command | Description | |--------|-------------| | login | Save your API key to ~/.pinarkive/config.json | | upload <file> | Upload a file; shows CID, size, and gateway URL | | pin <cid> | Pin an existing CID | | files | List your uploaded files (CID, size, cluster, created_at) | | delete <cid> | Delete a file by CID | | clusters | List your clusters | | gateway <cid> | Print the gateway URL for a CID | | open <cid> | Open the gateway URL in your browser | | init | Create a new project from a template (from pinarkive-templates) | | share <file> | Encrypt file (AES), upload, and get a share link. Options: -p password, -e expires, -c cluster | | whoami | Show current user (email, plan, cluster count) | | doctor | Run diagnostics: API, API key, gateway, cluster access | | watch <folder> | Watch folder; upload and pin new files as they appear |

Usage examples

# Authenticate
pinarkive login

# Upload a file
pinarkive upload image.png

# Pin an existing CID
pinarkive pin bafybeigd...

# List your files
pinarkive files

# Delete a file
pinarkive delete bafybeigd...

# List clusters
pinarkive clusters

# Get gateway URL (no auth required)
pinarkive gateway bafybeigd...

# Open content in browser
pinarkive open bafybeigd...

# Create project from template (express-api, next-upload, node-script, python-upload, secure-share)
pinarkive init

# Share a file with password (encrypted upload + share link)
pinarkive share document.pdf -p mypassword
pinarkive share document.pdf -p secret -c mycluster

# Show current user
pinarkive whoami

# Run diagnostics
pinarkive doctor

# Watch folder and auto-upload new files
pinarkive watch ./uploads

Example output

Upload:

Uploading file...
✔ Upload successful

CID:
bafybeigd...

Size:
1.23 MB

Gateway:
https://gateway.pinarkive.com/ipfs/bafybeigd...

Gateway:

$ pinarkive gateway bafybeigd...
https://gateway.pinarkive.com/ipfs/bafybeigd...

Share:

$ pinarkive share image.png -p mypass
✔ File encrypted
✔ Uploaded

CID:
bafy...

Share link:
https://pinarkive.com/#/bafy...:mypass

Doctor:

✔ API reachable
✔ API key valid
✔ Gateway reachable
✔ Cluster access

API base URL

All requests use: https://api.pinarkive.com/api/v3

Authentication: Bearer token (API key) in the Authorization header. The CLI uses the official @pinarkive/pinarkive-sdk-ts for all API calls.

Scripts

  • npm run build — Compile TypeScript to dist/
  • npm run dev — Run CLI with ts-node: npm run dev -- upload image.png
  • npm run lint — Run ESLint on src/

Project structure

src/
  cli.ts          # Commander entry, command registration
  api.ts          # Pinarkive SDK client, base URL, auth
  config.ts       # Read/write ~/.pinarkive/config.json
  crypto-share.ts # AES encryption for share command
  types/
    degit.d.ts    # Type declaration for degit
  commands/
    login.ts
    upload.ts
    pin.ts
    files.ts
    delete.ts
    clusters.ts
    gateway.ts
    open.ts
    init.ts       # Template scaffolding
    share.ts      # Encrypt + upload + share link
    whoami.ts     # Current user info
    doctor.ts     # Diagnostics
    watch.ts      # Folder watch + upload/pin

License

MIT