Skip to content
Projects

Shudesu/line-harness-oss

View on GitHub

About

L Harness — self-hosted LINE Official Account CRM: step messaging, broadcasts, forms and reservations, with MCP and TypeScript SDK. By Shudesu (野田修一).

Business & Finance

How these counts are measured

Measured star growth

in 24h
0
in 7 days
+4
in 15 days
+4
in 1 month
+11

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

🌐 日本語 | English | 简体中文 | 한국어 | Español

Authentication hardening for existing installations: SQL migration and key backfill are required. Read the upgrade guide first. workers.dev and public webhook/LIFF paths remain available.

Instagram signed-link bindings: IG_LINK_TOKEN_POLICY (default off), optional dedicated secret IG_LINK_TOKEN_SECRET, and shared-secret fallback IG_HARNESS_LINK_SECRET. See the migration 075 and coordinated rollout guide.

L Harness

Try free on LINE 👈

A fully open-source CRM for LINE Official Accounts. Free alternative to proprietary LINE CRM SaaS (priced at ¥10,000–20,000+/month). Runs on Cloudflare's free tier. $0/month server cost. Fully operable from Claude Code.

Start with one copy-and-paste command

On a PC with Node.js 22+ and Git, paste this into your terminal. Follow the prompts for Cloudflare login and LINE configuration.

npx --yes create-line-harness@latest

Current version: v0.13.2 ・ MIT License ・ TypeScript / Cloudflare Workers + D1


Why L Harness?

Proprietary SaaS A Proprietary SaaS B L Harness
Monthly cost ¥20,000+ ¥10,000+ $0
Step messaging ✅ ✅ ✅
Segment broadcasts ✅ ✅ ✅
Rich menu switching ✅ ✅ ✅
Forms (LIFF) ✅ ✅ ✅
Lead scoring ✅ ❌ ✅
IF-THEN automation partial partial ✅
Public API ❌ ❌ all features
Claude Code (AI) integration ❌ ❌ MCP server included
BAN detection & account migration ❌ ❌ ✅
Multi-account extra contract extra contract built-in
Friend deduplication ❌ ❌ ✅ (cross-account, picture token matching)
Source code closed closed MIT (this repo)

Quick Start

One-command setup

npx --yes create-line-harness@latest

The CLI guides you through setup:

  • Cloudflare account auth (wrangler login)
  • D1 database creation + schema/migrations
  • Worker / dashboard deployment
  • LINE Official Account credentials registration
  • Guided manual setup of the LINE Login channel and LIFF app
  • Initial Owner user for the dashboard

Follow the final instructions to configure the Webhook URL, LINE Login callback URL, and LIFF endpoint, then open the displayed dashboard URL. Setup time depends on account preparation and LINE configuration.

Requirements

  • Cloudflare account with R2 enabled (payment information is required for R2)
  • LINE Official Account + Messaging API channel
  • Node.js 22+ (including npm / npx) and Git

Features

Messaging

  • Step scenarios — minute-level delay_minutes, conditional branching, stealth delivery
  • Broadcasts — to all / by tag / by segment, immediate or scheduled, auto-queued for 500+ recipients
  • Reminders — countdown delivery from a target date (3 days before / 1 day before / day-of)
  • Templates — personalize with {{name}} {{uid}} {{auth_url:CHANNEL_ID}}
  • Tracked links — click counting → automatic tagging → scenario triggering

CRM

  • Friend management — webhook auto-registration, profile fetching, custom metadata
  • Tags — segmentation conditions and scenario triggers
  • Lead scoring — automatic score calculation from behavior
  • Operator chat — direct 1:1 reply from the dashboard
  • Conversation inbox — list unanswered conversations sorted by idle time (automated sends excluded)
  • Friend deduplication — auto-tag the same physical user across multiple accounts via picture_url token matching

Marketing

  • Rich menus — per-user / per-tag automatic switching
  • Forms (LIFF) — fully in-LINE forms, answers auto-saved as metadata
  • Calendar booking — Google Calendar integrated booking via LIFF
  • Staff management — Owner / Admin / Staff roles, individual API keys

Affiliate Tracking (ASP)

  • Self-serve link issuance — affiliates generate their own tracked LIFF links without admin intervention
  • Campaign management — set a fixed reward per campaign, run multiple campaigns in parallel
  • Timeline tracking — records click → friend-add → conversion in sequence, attribution via last-touch
  • Approval workflow — approve/reject attributed conversions to finalize rewards, with duplicate-account flags to surface potential fraud
  • LINE push notifications — automatic push to the affiliate when a conversion is confirmed
  • Details: docs/wiki/27-Affiliate-ASP.md

Automation

  • IF-THEN rules — 7 trigger types × 6 action types
  • Auto-replies — exact / partial keyword matching
  • Webhook in/out — integration with Stripe, Slack, etc.
  • Notification rules — conditional alerts
  • Delivery timing — fully controlled by delay_minutes and scheduled_at (v0.13.2 removed all system-side time gates; you control timing operationally)

Multi-account

  • Manage multiple LINE Official Accounts from a single dashboard
  • Per-account scope for scenarios, tags, broadcasts
  • BAN detection → automatic friend migration to the next account in the pool
  • Traffic pools — automatic distribution across multiple accounts

AI integration

  • MCP server included (@line-harness/mcp-server) — natural-language operation from Claude Code
    • list_conversations / get_conversation — AI-monitored unanswered conversations
    • create_scenario / update_step — let AI design scenarios
    • broadcast / send_message — sending requires user confirmation
  • Official SDK (@line-harness/sdk) — typed TypeScript SDK, ESM + CJS, zero dependencies

iOS app support

  • GET /api/capabilities — capability/version negotiation endpoint for the iOS app (the-harness-ios)
  • Available to Owner / Admin / Staff roles

Architecture

[ LINE Platform ] ⇄ [ Cloudflare Worker (Hono) ] ⇄ [ D1 SQLite ]
                              ⇅
                    [ Cloudflare Pages (Next.js 15) ]
                              ⇅
                    [ MCP Server / SDK / Claude Code ]
  • Worker (apps/worker): API + LIFF + webhook receiver, cron-driven delivery
  • Web (apps/web): Next.js 15 dashboard (19 sections)
  • Packages:
    • @line-harness/sdk — TypeScript SDK
    • @line-harness/mcp-server — MCP server for Claude Code
    • create-line-harness — setup CLI
    • @line-harness/plugin-template — plugin extension template
    • @line-harness/db — D1 migrations + helpers
    • @line-harness/line-sdk — thin LINE API wrapper
    • @line-harness/shared — shared type definitions

Resources


License

MIT License. Free for commercial use, modification, and redistribution.


Contributing

Issues and PRs welcome. Please open them against Shudesu/line-harness-oss (this repo).


L Harness by @Shudesu — an AI-native open-source LINE CRM

Explore related projects

Loading…