10,896
stars
+0+4+30
966
forks
233
watchers
275
prs
480
issues
88
releases
–
discussions
README
Robotgo
--
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Français | Deutsch | Español | Русский | Português
Golang Desktop Automation, auto test and AI Computer Use.
Control the mouse, keyboard, read the screen, process, Window Handle, image and bitmap and global event listener.
RobotGo supports Mac, Windows, and Linux; and robotgo supports arm64 and x86-amd64.
I build Codg now, Easy code and work AI agent system: auto, asynchronous, concurrency, efficiently and High accuracy
--
RobotGo-Pro get the JavaScript, Python, Lua and others version, tech supports, new features and newest robotgo version ("no open-source version now").
Contents
- Docs
- Donate
- Binding
- Requirements
- Cgo-free Builds
- Installation
- Update
- Examples
- Type Conversion and keys
- Cross-Compiling
- Authors
- Plans
- License
Docs
- GoDoc
- API Docs (Deprecated, no updated)
Donate
Donors and sponsors, or others, Contact: [email protected]
Binding
ADB, packaging android adb and ios wda, robotgo compatible API.
Requirements
Go 1.26+ (see go.mod) and one backend:
- Default (Cgo): CGO_ENABLED=1, a C compiler and the platform libraries below.
- Pure Go (tested): no C toolchain; see Cgo-free Builds.
Both need the feature-specific dependencies
for the features you use.
Default Cgo setup
macOS
Go and the Xcode Command Line Tools (Clang):
sh
brew install go
xcode-select --install
Permissions (Cgo and pure Go): in System Settings Privacy & Security,
grant the app or terminal Accessibility (input) and Screen Recording
(capture).
Windows
powershell
winget install GoLang.Go
Plus one C toolchain. LLVM-MinGW:
powershell
winget install MartinStorsjo.LLVM-MinGW.UCRT
$env:CC = "clang"
Or MinGW-w64 (WinLibs):
powershell
winget install BrechtSanders.WinLibs.POSIX.UCRT
$env:CC = "gcc"
The toolchain's bin (e.g. C:\mingw64\bin) must be on PATH and match
GOARCH. Any other Cgo-compatible compiler, such as a manual
MinGW-w64 install, also works.
Bitmap ships libpng for MinGW-w64 only;
with another toolchain, build libpng yourself.
Linux (X11)
Build: GCC, libc headers, X11/XTest headers. Runtime: an X server with XTEST
and DISPLAY set. For native Wayland, see Cgo-free Builds.
Ubuntu / Debian:
sh
Go (Snap if the distro package is too old)
sudo snap install go --classic
or: sudo apt install golang
Core (Cgo): compiler, libc, X11, XTest
sudo apt install gcc libc6-dev libx11-dev xorg-dev libxtst-dev
Clipboard (X11)
sudo apt install xsel xclip
Bitmap: libpng
sudo apt install libpng++-dev
GoHook: XCB, XKB
sudo apt install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev libxkbcommon-dev
Fedora:
sh
Core (Cgo): compiler, libc, X11, XTest
sudo dnf install gcc glibc-devel libX11-devel libXtst-devel
Clipboard (X11)
sudo dnf install xsel xclip
Bitmap: libpng
sudo dnf install libpng-devel
GoHook: XKB (Fedora 0 {
robotgo.Type("Hi galaxy!", fpid[0])
robotgo.KeyTap("a", fpid[0], "cmd")
robotgo