LINE Channel for Claude Code
LINE Messaging API channel plugin for Claude Code — send and receive messages via LINE DMs and group chats with built-in access control, observer mode, and auto-tunnel.
Agent-Guided Setup
New to this? Just paste this to your Claude Code session and let Claude guide you:
Help me install the LINE channel plugin from https://github.com/leepoweii/claude-code-channel-line
Read the README and walk me through each step.
First, check if I have the prerequisites (Bun, cloudflared). Install anything missing.
Then, help me create a LINE bot. If I don't have a LINE Developer account yet, walk me through these 3 guides (give me the links and open them for me):
1. Create LINE Official Account: https://app.tango.us/app/workflow/Create-LINE-Official-Account-bcb29bafb4394e529219413673e59061
2. Enable Messaging API: https://app.tango.us/app/workflow/Enable-Messaging-API-in-LINE-Official-Account-Manager-94cf2b025ff8475094caae548be28c54
3. Get tokens: https://app.tango.us/app/workflow/Get-LINE-Bot-credentials-ce7105c4ecb845b9b43b37e690c3e2ee
Key LINE URLs I'll need:
- LINE Official Account Manager: https://manager.line.biz/
- LINE Developer Console: https://developers.line.biz/console/
After I have my Channel Secret and Channel Access Token, help me:
1. Install the plugin (`/plugin marketplace add` + `/plugin install`)
2. Configure credentials (`/line:configure token`)
3. Tell me the exact command to restart Claude Code with the channel enabled
4. After restarting, help me pair my LINE account and lock down access with `/line:access policy allowlist`
Claude will check your system, install missing tools, and walk you through the full setup interactively.
Prerequisites
Supported platforms: macOS and Linux (including WSL on Windows). Native Windows is not supported.
Install these before setting up the plugin:
# Claude Code (requires Node.js 18+)
npm i -g @anthropic-ai/claude-code
# Bun runtime
curl -fsSL https://bun.sh/install | bash
# cloudflared (for auto-tunnel)
# macOS:
brew install cloudflared
# Linux:
curl -fsSL https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared && chmod +x /usr/local/bin/cloudflared
You also need a LINE Messaging API channel. See step 1 below.
Quick Setup
1. Create a LINE bot and get tokens
Follow these guides if you need help (screenshot walkthroughs):
- Create LINE Official Account
- Enable Messaging API
- Get Channel Secret + Access Token
You need two values: Channel Secret and Channel Access Token.
2. Install the plugin
In Claude Code, run:
/plugin marketplace add leepoweii/leepoweii
/plugin install line@leepoweii
3. Configure credentials
In Claude Code, run:
/line:configure token
Claude will ask for your Channel Secret and Channel Access Token. Paste them in.
This saves credentials to ~/.claude/channels/line/.env.
4. Start with channels enabled
Exit Claude Code and restart with the channel flag:
claude --dangerously-load-development-channels plugin:line@leepoweii
The plugin will:
- Start a local HTTP server for LINE webhooks
- Create a cloudflared tunnel automatically
- Set the webhook URL on LINE
- Begin receiving messages
Note: The LINE channel is not yet on the Claude Code official approved channels allowlist. You must use the --dangerously-load-development-channels flag. This flag only bypasses the allowlist check and does not skip other security checks.
5. Pair your account
Open LINE and message your bot. It replies with a pairing code and your user ID.
Back in Claude Code, approve it:
/line:access pair <code>
You're connected! Messages from LINE now flow into your Claude Code session.
Access Control
The plugin uses a sender allowlist to prevent unauthorized access and prompt injection. Only users you've explicitly approved can interact with Claude.
How the Allowlist Works
| Context | Who can trigger Claude | How to add |
|---|
| DMs | Users in dms.allowlist | Pairing or /line:access allow U... |
| Groups | Only DM-allowlisted users | Same — add the user to DM allowlist |
| Groups (non-allowed) | Cannot trigger | Their messages are buffered as context in observer mode, but never trigger a response |
Managing the Allowlist
Add a user via pairing (recommended for first-time setup):