https://github.com/wechaty/go-wechaty-getting-started
Go Wechaty starter project template that works out-of-the-box
https://github.com/wechaty/go-wechaty-getting-started
chatbot getting-started go wechaty
Last synced: 6 months ago
JSON representation
Go Wechaty starter project template that works out-of-the-box
- Host: GitHub
- URL: https://github.com/wechaty/go-wechaty-getting-started
- Owner: wechaty
- License: apache-2.0
- Created: 2020-05-13T15:13:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-18T08:35:58.000Z (10 months ago)
- Last Synced: 2025-06-29T20:39:04.481Z (8 months ago)
- Topics: chatbot, getting-started, go, wechaty
- Language: Makefile
- Homepage: https://gitpod.io/#https://github.com/wechaty/go-wechaty-getting-started
- Size: 108 KB
- Stars: 48
- Watchers: 3
- Forks: 15
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# go-wechaty-getting-started  [](https://github.com/wechaty/go-wechaty-getting-started/actions?query=workflow%3AGo)
[](https://github.com/wechaty/go-wechaty-getting-started)
[](https://gitpod.io/#https://github.com/wechaty/go-wechaty-getting-started)
[](https://play.golang.org/p/JGw_2TrVQeg)
[](https://github.com/wechaty/go-wechaty)
Go Wechaty Starter Project Template that Works Out-of-the-Box
## Connecting Chatbots
[](https://github.com/Wechaty/wechaty)
Wechaty is a RPA SDK for Wechat **Individual** Account that can help you create a chatbot in 6 lines of Go.
## The World's Shortest Go ChatBot: 7 lines of Code
```go
package main
import (
"fmt"
"github.com/wechaty/go-wechaty/wechaty"
)
func main() {
_ = wechaty.NewWechaty().
OnScan(func(ctx *wechaty.Context, qrCode string, status schemas.ScanStatus, data string) {
fmt.Printf("Scan QR Code to login: %s\nhttps://wechaty.github.io/qrcode/%s\n", status, qrCode)
}).
OnLogin(func(ctx *wechaty.Context, user *user.ContactSelf) { fmt.Printf("User %s logined\n", user) }).
OnMessage(func(ctx *wechaty.Context, message *user.Message) { fmt.Printf("Message: %s\n", message) }).
Start()
}
```
## Requirements
1. Go 1.14+
## Install
```shell
make install
```
## Run
Get a Token for your Bot first. Learn more from our [Wechaty Developers Program](https://github.com/wechaty/wechaty/wiki/Wechaty-Developer-Program)
```sh
export WECHATY_PUPPET_SERVICE_TOKEN=your_token_at_here
make bot
```
## Wechaty Getting Started in Multiple Languages
- [TypeScript Wechaty Getting Started](https://github.com/wechaty/wechaty-getting-started)
- [Python Wechaty Getting Started](https://github.com/wechaty/python-wechaty-getting-started)
- [Java Wechaty Getting Started](https://github.com/wechaty/java-wechaty-getting-started)
- [Go Wechaty Getting Started](https://github.com/wechaty/go-wechaty-getting-started)
## Badge
[](https://github.com/wechaty/go-wechaty)
```md
[](https://github.com/wechaty/go-wechaty)
```
## Maintainers
[@wechaty/go](https://github.com/orgs/wechaty/teams/go/members)
## Copyright & License
- Code & Docs © 2020 - now Wechaty Contributors
- Code released under the Apache-2.0 License
- Docs released under Creative Commons