by rulego
⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
# Add to your Claude Code skills
git clone https://github.com/rulego/rulegoGuides for using mcp servers skills like rulego.
Last scanned: 4/27/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-04-27T06:28:21.880Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
English| 简体中文
Official Website | Docs | Contribution Guide
RuleGo is a lightweight, high-performance, embedded, orchestrable component-based rule engine built on the Go language.
It can help you quickly build loosely coupled and flexible systems that can respond and adjust to changes in business requirements in real time.
RuleGo also provides a large number of reusable components that support the aggregation, filtering, distribution, transformation, enrichment, and execution of various actions on data, and can also interact and integrate with various protocols and systems.
It has a wide range of application potential in low-code, business code orchestration, data integration, workflows, large model intelligent agents, edge computing, automation, IoT, and other scenarios.
RuleGo into existing applications. It can also be deployed independently as middleware, providing rule engine and orchestration services.Message Type Switch, JavaScript Switch, JavaScript Filter, JavaScript Transformer, HTTP Push, MQTT Push, Send Email, Log Recording, etc. Other components can be extended as needed.HTTP Endpoint, MQTT Endpoint, TCP/UDP Endpoint, UDP Endpoint, Kafka Endpoint, Schedule Endpoint, etc.RuleGo is an orchestrable rule engine that excels at decoupling your systems.
Install RuleGo using the go get command:
go get github.com/rulego/rulego
# or
go get gitee.com/rulego/rulego
RuleGo is extremely simple to use. Just follow these 3 steps:
Define rule chains using JSON:
Import the RuleGo package and use the rule chain definition to create a rule engine instance:
import "github.com/rulego/rulego"
//Load the rule chain definition file.
ruleFile := fs.LoadFile("chain_call_rest_api.json")
// Create a rule engine instance using the rule chain definition
ruleEngine, err := rulego.New("rule01", ruleFile)
// Define message metadata
metaData := types.NewMetadata()
metaData.PutValue("productType", "test01")
// Define message payload and message type
msg := types.NewMsg(0, "TELEMETRY_MSG", types.JSON, metaData, "{\"temperature\":35}")
// Hand over the message to the rule engine for processing
ruleEngine.OnMsg(msg)
Real time update of rule chain logic without restarting the application
// Dynamically update rule chain logic
err := ruleEngine.ReloadSelf(ruleFile)
// Update a node under the rule chain
ruleEngine.ReloadChild("node01", nodeFile)
// Get the rule chain definition
ruleEngine.DSL()
// Load all rule chain definitions in a folder into the rule engine pool
rulego.Load("/rules", rulego.WithConfig(config))
// Get an already created rule engine instance by ID
ruleEngine, ok := rulego.Get("rule01")
// Delete an already created rule engine instance
rulego.Del("rule01")
// Create a default configuration
config := rulego.NewConfig()
// Debug node callback, the node configuration must be set to debugMode:true to trigger the call
// Both node entry and exit information will call this callback function
config.OnDebug = func (chainId,flowType string, nodeId string, msg types.RuleMsg, relationType string, err error) {
}
// Use the configuration
ruleEngine, err := rulego.New("rule01", []byte(ruleFile), rulego.WithConfig(config))
The core feature of RuleGo is its component-based architecture, where all business logic is encapsulated in components that can be flexibly configured and reused. Currently,
RuleGo has built-in a vast array of commonly used components.