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

cc-channel

v0.1.1

Published

Feishu/Lark channel for Claude Code - trigger Claude Code from Feishu messages

Readme

cc-channel

Feishu/Lark channel for Claude Code - trigger Claude Code from Feishu messages

A lightweight service that lets you use Claude Code from Feishu/Lark. Send messages to your Feishu bot and get responses from Claude Code running on your local machine.

Features

  • 🚀 Easy setup - One command initialization
  • 💬 Multi-turn conversations - Maintains context across messages
  • 🔄 Background service - Runs as a daemon, no terminal needed
  • 📁 Per-chat working directory - Each chat can have its own working directory
  • 🌐 WebSocket connection - No public IP or port forwarding required

Prerequisites

  • Node.js 18+
  • Claude Code CLI installed and configured
  • A Feishu/Lark self-built application (see setup guide below)

Installation

npm install -g cc-channel

Quick Start

1. Create a Feishu Application

  1. Go to Feishu Open Platform (or Lark Developer for international)
  2. Create a new "Self-built Application" (自建应用)
  3. Note down your App ID and App Secret
  4. In the app settings:
    • Enable "Bot" capability (机器人能力)
    • Add message event subscription: im.message.receive_v1
    • Configure event subscription method as WebSocket (事件订阅方式: 使用长连接接收事件)

2. Initialize cc-channel

cc-channel init

This will guide you through:

  • Entering your Feishu App ID and Secret
  • Setting the default working directory
  • Testing the connection
  • Starting the background service

3. Use in Feishu

  1. Add your bot to a group chat, or
  2. Start a direct message with the bot

Send any message to trigger Claude Code!

Usage

Commands

# Initialize configuration
cc-channel init

# Start background service
cc-channel start

# Start in foreground (for debugging)
cc-channel start --foreground

# Stop background service
cc-channel stop

# Show status
cc-channel status

# View logs
cc-channel logs
cc-channel logs --follow

# Configuration
cc-channel config list
cc-channel config set claude.defaultWorkDir ~/projects

In-Chat Commands

When messaging the bot in Feishu:

| Command | Description | |---------|-------------| | (any message) | Execute with Claude Code | | /cc help | Show available commands | | /cc cd <path> | Change working directory | | /cc pwd | Show current directory | | /cc clear | Clear conversation history | | /cc status | Show session status |

Configuration

Configuration is stored in ~/.cc-channel/config.json.

Example Configuration

{
  "feishu": {
    "appId": "cli_xxxx",
    "appSecret": "xxxx",
    "verificationToken": "",
    "encryptKey": "",
    "domain": "feishu"
  },
  "claude": {
    "defaultWorkDir": "~",
    "timeout": 300000
  }
}

Environment Variables

You can also configure via environment variables:

  • CC_CHANNEL_FEISHU_APP_ID
  • CC_CHANNEL_FEISHU_APP_SECRET
  • CC_CHANNEL_FEISHU_DOMAIN
  • CC_CHANNEL_WORK_DIR

How It Works

┌─────────────────┐     WebSocket      ┌─────────────────┐
│   Feishu Bot    │ ◄───────────────► │   cc-channel    │
│   (Cloud)       │                    │   (Local)       │
└─────────────────┘                    └────────┬────────┘
                                                │
                                                │ spawn
                                                ▼
                                       ┌─────────────────┐
                                       │  Claude Code    │
                                       │  CLI            │
                                       └─────────────────┘
  1. You send a message to your Feishu bot
  2. Feishu pushes the event via WebSocket to cc-channel
  3. cc-channel spawns Claude Code CLI with your message
  4. The response is sent back to Feishu

Multi-turn Conversations

cc-channel maintains conversation history per chat:

  • Each chat (direct message or group) has its own session
  • Context is passed to Claude Code for follow-up questions
  • Use /cc clear to start a fresh conversation

Security Considerations

  • Only users who can message your Feishu bot can trigger Claude Code
  • All execution happens locally on your machine
  • Session data is stored in ~/.cc-channel/sessions/

Troubleshooting

Claude CLI not found

# Check if claude is in PATH
which claude

# If installed but not found, add to PATH
export PATH="$PATH:$(dirname $(which claude))"

Connection issues

  1. Verify your App ID and Secret are correct
  2. Make sure WebSocket mode is enabled in Feishu app settings
  3. Check logs: cc-channel logs

Service not starting

# Check service status
cc-channel status

# Try running in foreground to see errors
cc-channel start --foreground

Development

# Clone the repo
git clone https://github.com/L-x-C/cc-channel.git
cd cc-channel

# Install dependencies
npm install

# Build
npm run build

# Run locally
node dist/cli.js init

License

MIT