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

@line-harness/sdk

v0.9.0

Published

AI-native SDK for LINE Harness — programmatic LINE official account automation

Downloads

1,915

Readme

@line-harness/sdk

AI-native SDK for LINE Harness — programmatic LINE official account automation.

Replaces L社/U社 with a fully API-driven approach designed for AI agents (Claude Code).

Install

npm install @line-harness/sdk

Quick Start

import { LineHarness } from '@line-harness/sdk'

const client = new LineHarness({
  apiUrl: 'https://your-worker.workers.dev',
  apiKey: 'your-api-key',
})

// Create a 3-step education scenario
const scenario = await client.createStepScenario('Welcome Flow', 'friend_add', [
  { delay: '0m', type: 'text', content: 'Welcome! Thanks for adding us.' },
  { delay: '1d', type: 'text', content: 'Here are 3 things you should know...' },
  { delay: '3d', type: 'flex', content: JSON.stringify(flexMessageJson) },
])

// Broadcast to all friends
await client.broadcastText('Weekend sale! 50% off!')

// Broadcast to tagged friends
await client.broadcastToTag(tagId, 'text', 'VIP exclusive coupon: CODE123')

API Reference

Low-Level (1:1 with Worker API)

Friends

const { items, total, hasNextPage } = await client.friends.list({ limit: 50, offset: 0 })
const friend = await client.friends.get(friendId)
const count = await client.friends.count()
await client.friends.addTag(friendId, tagId)
await client.friends.removeTag(friendId, tagId)

Tags

const tags = await client.tags.list()
const tag = await client.tags.create({ name: 'VIP', color: '#EF4444' })
await client.tags.delete(tagId)

Scenarios

const scenarios = await client.scenarios.list()
const scenario = await client.scenarios.create({ name: 'Flow', triggerType: 'friend_add' })
const full = await client.scenarios.get(scenarioId)
await client.scenarios.update(scenarioId, { isActive: false })
await client.scenarios.delete(scenarioId)

// Steps
await client.scenarios.addStep(scenarioId, {
  stepOrder: 1, delayMinutes: 0, messageType: 'text', messageContent: 'Hello!',
})
await client.scenarios.updateStep(scenarioId, stepId, { messageContent: 'Updated' })
await client.scenarios.deleteStep(scenarioId, stepId)

// Enrollment
await client.scenarios.enroll(scenarioId, friendId)

Broadcasts

const broadcasts = await client.broadcasts.list()
const broadcast = await client.broadcasts.create({
  title: 'Sale', messageType: 'text', messageContent: '50% off!', targetType: 'all',
})
await client.broadcasts.update(broadcastId, { scheduledAt: '2026-04-01T09:00:00Z' })
await client.broadcasts.send(broadcastId)
await client.broadcasts.delete(broadcastId)

High-Level (Convenience)

// Create scenario with steps in one call (delay: '0m', '1h', '1d', '1w')
await client.createStepScenario(name, triggerType, steps)

// Broadcast text to all
await client.broadcastText('Message')

// Broadcast to tagged friends
await client.broadcastToTag(tagId, 'text', 'Message')

Error Handling

import { LineHarness, LineHarnessError } from '@line-harness/sdk'

try {
  await client.scenarios.get('nonexistent')
} catch (err) {
  if (err instanceof LineHarnessError) {
    console.log(err.status)    // 404
    console.log(err.message)   // 'Scenario not found'
    console.log(err.endpoint)  // 'GET /api/scenarios/nonexistent'
  }
}

Requirements

  • Node.js 18+ (uses native fetch)
  • A deployed LINE Harness Worker API

License

MIT