explaingit

koishijs/koishi

5,571TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A TypeScript framework for building chatbots that work across multiple platforms including Discord and Feishu. Plugin-based so you can add features without restructuring your bot.

Mindmap

mindmap
  root((koishi))
    What it does
      Chatbot framework
      Multi-platform bots
      Plugin system
    Platforms
      Discord
      Feishu/Lark
      Others via plugins
    Tech
      TypeScript
      Node.js
      Monorepo
    Audience
      Bot developers
      TypeScript devs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a bot that runs on both Discord and Feishu without writing separate code for each platform.

USE CASE 2

Create a Koishi plugin to handle custom commands or integrate your bot with an external API.

USE CASE 3

Use Koishi's plugin system to add scheduled messages, moderation tools, or database features to an existing bot.

Tech stack

TypeScriptNode.js

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Node.js and a bot token from the target platform (e.g., Discord developer portal).

No license information is available from the sources provided.

In plain English

Koishi is a TypeScript framework for building chatbots that work across multiple messaging platforms. Rather than writing a separate bot for each service, you write your bot logic once and Koishi handles connecting it to Discord, Feishu (also called Lark), and other messaging platforms. The goal is to avoid duplicating work when you want your bot to run in more than one place. The framework is built around a plugin system, which means you add or remove features without changing the core application. Each piece of functionality, whether it handles commands, manages user data, or connects to a specific platform, is a separate plugin. You mix and match plugins to build the bot you need, and you can start small and extend it over time without restructuring the whole project. Koishi is written in TypeScript, which gives it type checking and editor autocomplete during development. This can make the development process more predictable compared to plain JavaScript, especially as a bot grows in complexity and the number of plugins increases. The project's topics and the platform list suggest it originated in the Chinese-speaking developer community. Feishu, also marketed as Lark internationally, is a messaging and collaboration platform used widely in China and among multinational companies. Including it alongside Discord gives the framework relevance across both Chinese-speaking and international audiences. The root README in this repository points to a documentation file inside the package structure, which suggests the project is organized as a monorepo where each package maintains its own documentation.

Copy-paste prompts

Prompt 1
Help me get started with Koishi to build a Discord bot in TypeScript. Show me how to create a basic bot that responds to a slash command.
Prompt 2
I want to write a Koishi plugin that fetches data from a public API every hour and posts the result to a channel. Write the plugin code.
Prompt 3
How does Koishi's plugin lifecycle work? Explain the hooks available and how I can add middleware to process all incoming messages before they reach command handlers.
Open on GitHub → Explain another repo

← koishijs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.