open-index/open-npm huggingface dataset:
npm package: @papercrane/paper-crane-tools
Description: Crane's personal tool library
Author: crane
Latest version: 0.0.27

This is Crane's personal tool library.

## Usage

```bash
pnpm install @papercrane/paper-crane-tools
```

## Dependencies

To use `crane-tools`, you need to install the following dependencies:

```bash
pnpm install radash date-fns ulid big.js
```
npm package: @papercraneai/summarize-chat
Description: CLI tool that creates and maintains an evolving summary of learnings from Claude Code conversations
Author: Papercrane AI
Latest version: 1.0.1

# @papercraneai/summarize-chat

CLI tool that creates and maintains an evolving summary of learnings from your Claude Code conversations.

## Features

- Discovers conversations from `~/.claude/history.jsonl`
- Incrementally processes only new messages since last run
- Maintains a single evolving summary document (not per-session)
- Uses Claude (Haiku) to intelligently merge new learnings
- Keeps summary under a configurable size for context loading
- Tracks token usage and cost

## Installation

```bash
npm install -g @papercraneai/summarize-chat
```

**Prerequisites:** Requires [Claude Code](https://claude.ai/code) to be installed and authenticated.

## Usage

```bash
# Basic usage - summarize recent conversations
summarize-chat run --since 24

# Specify a custom summary file
summarize-chat run --sync-summary ~/my-learnings.md --since 24

# Check status
summarize-chat status
```

### Options

```
summarize-chat run [options]

Options:
  --in-summary <path>    Read existing summary from this file
  --out-summary <path>   Write summary to this file
  --sync-summary <path>  Read and write to the same file
  --staleness <hours>    Hours before a session is considered stale (default: 2)
  --since <hours>        Only process sessions from the last X hours
  --max-size <kb>        Maximum summary size in KB (default: 50)
  --full                 Re-summarize all sessions (ignore state)
```

### Default Paths

- **Summary:** `~/.claude/learning-summary/summary.md`
- **State:** `~/.claude/learning-summary/state.json`

## How It Works

1. **Discovery:** Reads `~/.claude/history.jsonl` to find conversation sessions
2. **Filter:** Skips sessions still active (within staleness window) and already processed
3. **Parse:** Extracts user/assistant messages from session JSONL files
4. **Summarize:** Sends existing summary + new messages to Claude with instructions to merge learnings while keeping under the size limit
5. **Update:** Saves the updated summary and records processed sessions in state

## Output

```
--- Results ---
Sessions processed: 2
Total messages summarized: 121
Summary size: 10.5KB

--- Token Usage ---
Model: claude-haiku-4-20250514
Input tokens: 15,297 (3 uncached, 0 cache read, 15,294 cache write)
Output tokens: 2,912
Cost: $0.0337
```

## License

MIT
npm package: @papercups-io/chat-widget-native
Description: Papercups chat widget for React Native
Author: reichert621
Latest version: 1.0.5

# @papercups-io/chat-widget-native

> Papercups chat widget for React Native

[![NPM](https://img.shields.io/npm/v/@papercups-io/chat-widget-native.svg)](https://www.npmjs.com/package/@papercups-io/chat-widget-native) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Demo

<img width="383" alt="Screen Shot 2020-08-16 at 8 57 25 PM" src="https://user-images.githubusercontent.com/5264279/90348303-6c04d080-e003-11ea-8976-6f9d355ca4c8.png">

Try it out! https://snack.expo.io/@reichertjalex/papercups

## Install

```bash
npm install --save @papercups-io/chat-widget-native
```

## Usage

First, sign up at https://app.papercups.io/register to get your account token. Your account token is what you will use to pass in as the `accountId` prop below.

***NB**: make sure to pass in an `external_id` with the `customer` prop so that we can identify the person you're chatting with and load their message history if you've chatted with them before! (See below for an example)*

You can render the chat widget however you like. Here's how you might do it in a modal:

```tsx
import React from 'react';
import {StyleSheet, Button, View} from 'react-native';
import Modal from 'react-native-modal';
import ChatWidget from '@papercups-io/chat-widget-native';

export default function App() {
  const [isModalVisible, setModalVisible] = React.useState(false);

  return (
    <View style={{flex: 1, padding: 24}}>
      <Button title="Open chat" onPress={() => setModalVisible(true)} />

      <Modal
        isVisible={isModalVisible}
        onBackdropPress={() => setModalVisible(false)}
      >
        <View style={styles.modal}>
          <ChatWidget
            // Update this with your own account token!
            accountId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
            title="Welcome to Papercups!"
            subtitle="We'll reply as soon as we can 😊"
            greeting="Hi there! :wave: Have any questions?"
            customer={{
              // Update this with a unique identifer for the customer/user,
              // so that we can load the message history if you've chatted
              // with this person in the past!
              external_id: 'xxxxxxxx',
              email: 'alex@test.com',
              name: 'Alex',
            }}
          />
        </View>
      </Modal>
    </View>
  );
}

const styles = StyleSheet.create({
  modal: {
    flex: 1,
    borderRadius: 4,
    overflow: 'hidden',
  },
});
```

## License

MIT © Papercups
npm package: @papercups-io/docusaurus-plugin
Description: Papercups plugin for docusaurus
Author: Rob Honsby
Latest version: 1.0.0

# @papercups-io/docusaurus

This plugins enable usage of the Papercups chat widget on Docusaurus powered websites.

## Install

```
npm install --save @papercups-io/docusaurus
```

## Usage

1. Sign up at https://app.papercups.io/register to get your account token. Your account token is what you will use to pass in as the accountId prop below.

2. Configure the plugin in `docusaurus.config.js`:

```
// docusaurus.config.js
module.exports = {
  plugins: [
    [
      "@papercups-io/docusaurus-plugin",
      {
        /* REQUIRED */
        // Pass in your Papercups account token here after signing up
        accountId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',

        /* OPTIONAL */
        title: 'Welcome to Papercups!',
        subtitle: 'Ask us anything in the chat window below 😊',
        newMessagePlaceholder: 'Start typing...',
        primaryColor: '#13c2c2',

        // Initial message that new users will see.
        greeting: 'Hi there! How can I help you?',

        // Used only when self-hosting Papercups. Otherwise leave it empty.
        baseUrl: 'https://app.papercups.io',

        // Add this if you want to require the customer to enter
        // their email before being able to send you a message
        requireEmailUpfront: true,

        // Add this if you want to indicate when you/your agents
        // are online or offline to your customers
        showAgentAvailability: true,
      },
    ],
  ],
};
```
npm package: @papercups-io/storytime
Description: Track and record user sessions
Author: reichertjalex@gmail.com
Latest version: 1.0.6

# @papercups-io/storytime

> Papercups screen sharing feature

[![NPM](https://img.shields.io/npm/v/@papercups-io/storytime.svg)](https://www.npmjs.com/package/@papercups-io/storytime) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Demo

**Screenshot:**
<img width="1190" alt="Screen Shot 2020-11-02 at 2 35 02 PM" src="https://user-images.githubusercontent.com/5264279/97911075-b3ece700-1d18-11eb-875d-07db7c4f20b7.png">

**GIF:**
![demo](https://user-images.githubusercontent.com/5264279/96898977-56c27d00-145e-11eb-907b-ca8db13a0fa0.gif)

## Install

```bash
npm install --save @papercups-io/storytime
```

## Usage

First, sign up at https://app.papercups.io/register to get your account token. Your account token is what you will use to pass in as the `accountId` prop below.

### Using in HTML

Paste the code below between your `<head>` and `</head>` tags:

```html
<!-- 
  Note that if you already have included the `window.Papercups` configuration with the chat widget, 
  you should **NOT** duplicate it here! All the config settings should be the same for now.
-->
<script>
  window.Papercups = {
    config: {
      // Pass in your Papercups account token here after signing up
      accountId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
      // Optionally pass in metadata to identify the customer
      customer: {
        name: 'Test User',
        email: 'test@test.com',
        external_id: '123',
      },
      // Optionally specify the base URL
      baseUrl: 'https://app.papercups.io',
    },
  };
</script>
<script
  type="text/javascript"
  async
  defer
  src="https://app.papercups.io/storytime.js"
></script>
```

_:warning: **Note** that if you already have included the `window.Papercups` configuration with the [chat widget](https://github.com/papercups-io/chat-widget#using-in-html), you should **NOT** duplicate it here!_

If you **already** have the config set, just include this script below it:

```html
<script
  type="text/javascript"
  async
  defer
  src="https://app.papercups.io/storytime.js"
></script>
```

### Using as an NPM module

Place the code below in any pages on which you would like to render the widget. If you'd like to render it in all pages by default, place it in the root component of your app.

```tsx
import {Storytime} from '@papercups-io/storytime';

const st = Storytime.init({
  // Pass in your Papercups account token here after signing up 
  accountId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx',
  // Optionally specify the base URL
  baseUrl: 'https://app.papercups.io',
});

// If you want to stop the session recording manually, you can call:
// st.finish();

// Otherwise, the recording will stop as soon as the user exits your website.
```
npm package: @paperdave/asset-bundle
Description: Minimal archive format
Author: Dave Caruso
Latest version: 1.0.0

# @paperdave/asset-bundle

Minimal archive format designed for browser use. Used to bundle and serve image resources for [Scale of the Universe](https://scaleofuniverse.com). Asset Buffers are not intended for large payloads, but rather embedding many small ones. The API allows easy streaming from `fetch` or wherever.

```sh
# install package locally
bun add @paperdave/asset-bundle
npm install @paperdave/asset-bundle

# globally install `abundle` cli
bun add -g @paperdave/asset-bundle
```

```ts
import {
  encodeAssetBundle,
  decodeAssetBundleStream,
  decodeAssetBundle,
} from '@paperdave/asset-bundle';

const encoded = await encodeAssetBundle([
  // data accepts any Buffer/Blob/Stream/string/
  { name: 'hello.txt', data: "world" },
  { name: 'something.png', data: Bun.file("./local.png") },
]);
// -> Blob { type: "application/asset-bundle" }

for (const { name, data } = decodeAssetBundleStream(encoded)) {
  // { name: string, data: Blob }
  console.log({ name, size: data.size });
}

const map = await decodeAssetBundle(encoded);
// -> Map<string, Blob>
```

Decoding supports streams, and in that case will allow you to iterate over partial files. This isnt fully streamed, as each file that is emit is emitted once the entire file has been loaded.

Tree-shaking should also allow you to only include the decoding code if you are writing a web frontend that only consumes bundles.

## CLI

There is a CLI for the bundler which depends on the [Bun runtime](https://bun.sh).

```
abundle: create and read asset bundles

- abundle pack <inputs...> <bundle>
- abundle unpack <bundle> <outdir>
- abundle ls <bundle>
- abundle read <bundle> <file> [output = stdout]
- abundle verify <bundle>
```

## File Format

The format is extremely trivial:

- `u8[7]` Start with these bytes "BUNDLE1"
- For each file
  - `u16` with byteLength of the following field:
  - `u8[...]` with file name
  - `u16` with byteLength of the following field:
  - `u8[...]` with file type
  - `u32` size of asset
  - `u8[...]` Buffer, no compression or processing
  - `u8[20]` SHA-1 hash of this file
  - repeat
npm package: @paperdave/events
Description: Another event emitter library, with easy TS types.
Author: Dave Caruso
Latest version: 1.0.4

# @paperdave/events

<div>
<a href="https://github.com/paperdave/various#project-status-meaning"><img alt="Status: Stable" src="https://img.shields.io/badge/status-stable-brightgreen"></a>
<a href="https://www.npmjs.com/package/@paperdave/events"><img alt="NPM Version" src="https://img.shields.io/npm/v/@paperdave/events.svg?label=latest%20release"></a>
</div>
<br>

Another event emitter library. This one has built-in types as well as a little of dom-compatibility by supporting short `.on` and `.off` methods, but also `.addEventListener` and `.removeEventListener` methods. Add functions return a "Cleanup" function which can be called to quickly remove the listener.