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

@tokenrip/cli

v1.0.1

Published

CLI and library for AI agents to create and share assets via Tokenrip

Downloads

61

Readme

@tokenrip/cli

Asset sharing for AI agents. Create shareable links for PDFs, images, HTML pages, markdown documents, and charts — from the command line or programmatically.

Install

npm install -g @tokenrip/cli

Quick Start

# 1. Create an API key (auto-saved)
tokenrip auth create-key

# 2. Upload a file
tokenrip asset upload report.pdf --title "Q1 Report"

# 3. Publish structured content
tokenrip asset publish dashboard.html --type html --title "Dashboard"

# 4. Check your assets
tokenrip asset list

Every command outputs machine-readable JSON:

{ "ok": true, "data": { "id": "abc-123", "url": "https://...", "title": "Q1 Report", "type": "file" } }

CLI Commands

tokenrip asset upload <file> [--title <title>]

Upload a binary file (PDF, image, etc.) and get a shareable link. MIME type is auto-detected.

tokenrip asset upload chart.png
tokenrip asset upload slides.pdf --title "Team Slides"

tokenrip asset publish <file> --type <type> [--title <title>]

Publish structured content for rich rendering in the browser.

Supported types: markdown, html, chart, code, text, json

tokenrip asset publish notes.md --type markdown
tokenrip asset publish page.html --type html --title "Landing Page"
tokenrip asset publish data.json --type chart --title "Revenue Chart"

tokenrip asset list

List your published assets and their metadata.

tokenrip asset list
tokenrip asset list --since 2026-03-30T00:00:00Z --type markdown --limit 5

tokenrip asset update <uuid> <file> [--type <type>]

Publish a new version of an existing asset.

tokenrip asset update 550e8400-... report-v2.md --type markdown
tokenrip asset update 550e8400-... chart.png --label "with axes fixed"

tokenrip asset delete <uuid>

Permanently delete an asset and its shareable link.

tokenrip asset delete 550e8400-e29b-41d4-a716-446655440000

tokenrip asset stats

Show storage usage statistics.

tokenrip auth create-key

Create a new API key (auto-saved to config).

tokenrip auth create-key
tokenrip auth create-key --name "My Agent" --no-save

tokenrip config set-key <key>

Save your API key to ~/.config/tokenrip/config.json.

tokenrip config set-url <url>

Set a custom API server URL (default: https://api.tokenrip.com).

Provenance Tracking

All asset commands support lineage metadata:

  • --parent <uuid> — Parent asset ID
  • --context <text> — Creator context (agent name, task description)
  • --refs <urls> — Comma-separated input reference URLs

Library Usage

@tokenrip/cli also works as a Node.js library for programmatic asset creation.

import { loadConfig, getApiUrl, getApiKey, createHttpClient } from '@tokenrip/cli';

const config = loadConfig();
const client = createHttpClient({
  baseUrl: getApiUrl(config),
  apiKey: getApiKey(config),
});

// Publish markdown content
const { data } = await client.post('/v0/assets', {
  type: 'markdown',
  content: '# Hello\n\nGenerated by my agent.',
  title: 'Agent Output',
});

console.log(data.data.id); // asset UUID

Exports

| Export | Description | |--------|-------------| | loadConfig() | Load config from ~/.config/tokenrip/config.json | | saveConfig(config) | Persist config to disk | | getApiUrl(config) | Resolve API URL (config > env > default) | | getApiKey(config) | Resolve API key (config > env) | | createHttpClient(config?) | Axios instance with auth and error handling | | CliError | Typed error class with error codes | | toCliError(err) | Normalize any error to CliError | | outputSuccess(data) | Print { ok: true, data } JSON | | outputError(err) | Print { ok: false, error, message } and exit | | wrapCommand(fn) | Wrap async handler with error catching |

Configuration

Configuration is read from ~/.config/tokenrip/config.json:

{
  "apiKey": "tr_...",
  "apiUrl": "https://api.tokenrip.com",
  "preferences": {}
}

Environment variables take precedence over the config file:

| Variable | Overrides | |----------|-----------| | TOKENRIP_API_KEY | apiKey | | TOKENRIP_API_URL | apiUrl |

Output Format

All commands output JSON to stdout. In a TTY, output is human-readable by default — use --json or pipe to get JSON. Errors exit with code 1.

Success:

{ "ok": true, "data": { ... } }

Error:

{ "ok": false, "error": "NO_API_KEY", "message": "No API key configured. Run `tokenrip config set-key <key>`" }

Error Codes

| Code | Meaning | |------|---------| | NO_API_KEY | No API key configured | | FILE_NOT_FOUND | Input file does not exist | | INVALID_TYPE | Publish type not one of: markdown, html, chart, code, text, json | | UNAUTHORIZED | API key is invalid or expired | | TIMEOUT | Request timed out (30s) | | NETWORK_ERROR | Cannot reach the API server |

License

MIT