{"id":13583304,"url":"https://github.com/vcaesar/robotn","last_synced_at":"2025-05-07T02:03:08.005Z","repository":{"id":57553683,"uuid":"173992501","full_name":"vcaesar/robotn","owner":"vcaesar","description":"Robotn, Native cross-platform GUI automation","archived":false,"fork":false,"pushed_at":"2023-03-07T00:36:08.000Z","size":114,"stargazers_count":179,"open_issues_count":4,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-25T14:07:50.734Z","etag":null,"topics":["automation","c","go","javascript","node","python","robot","robotgo","robotn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vcaesar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-03-05T17:39:36.000Z","updated_at":"2025-04-21T07:07:23.000Z","dependencies_parsed_at":"2024-04-08T18:06:40.376Z","dependency_job_id":null,"html_url":"https://github.com/vcaesar/robotn","commit_stats":{"total_commits":109,"total_committers":1,"mean_commits":109.0,"dds":0.0,"last_synced_commit":"7014c73c5c0fe3dcdd48707a397168105b5139e6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcaesar%2Frobotn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcaesar%2Frobotn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcaesar%2Frobotn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vcaesar%2Frobotn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vcaesar","download_url":"https://codeload.github.com/vcaesar/robotn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252681926,"owners_count":21787766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","c","go","javascript","node","python","robot","robotgo","robotn"],"created_at":"2024-08-01T15:03:23.394Z","updated_at":"2025-05-07T02:03:07.973Z","avatar_url":"https://github.com/vcaesar.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Robotn\n\n\u003c!--\u003cimg align=\"right\" src=\"https://raw.githubusercontent.com/go-vgo/robotgo/master/logo.jpg\"\u003e--\u003e\n\u003c!--[![Build Status](https://travis-ci.org/go-vgo/robotgo.svg)](https://travis-ci.org/go-vgo/robotgo)\n[![codecov](https://codecov.io/gh/go-vgo/robotgo/branch/master/graph/badge.svg)](https://codecov.io/gh/go-vgo/robotgo)--\u003e\n\u003c!--\u003ca href=\"https://circleci.com/gh/go-vgo/robotgo/tree/dev\"\u003e\u003cimg src=\"https://img.shields.io/circleci/project/go-vgo/robotgo/dev.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e--\u003e\n[![Build Status](https://travis-ci.org/go-vgo/robotgo.svg)](https://travis-ci.org/go-vgo/robotgo)\n[![CircleCI Status](https://circleci.com/gh/go-vgo/robotgo.svg?style=shield)](https://circleci.com/gh/go-vgo/robotgo)\n![Appveyor](https://ci.appveyor.com/api/projects/status/github/go-vgo/robotgo?branch=master\u0026svg=true)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-vgo/robotgo)](https://goreportcard.com/report/github.com/go-vgo/robotgo)\n[![GoDoc](https://godoc.org/github.com/go-vgo/robotgo?status.svg)](https://godoc.org/github.com/go-vgo/robotgo)\n[![GitHub release](https://img.shields.io/github/release/go-vgo/robotgo.svg)](https://github.com/go-vgo/robotgo/releases/latest)\n[![Join the chat at https://gitter.im/go-vgo/robotgo](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-vgo/robotgo?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\u003c!-- [![Release](https://github-release-version.herokuapp.com/github/go-vgo/robotgo/release.svg?style=flat)](https://github.com/go-vgo/robotgo/releases/latest) --\u003e\n\u003c!-- \u003ca href=\"https://github.com/go-vgo/robotgo/releases\"\u003e\u003cimg src=\"https://img.shields.io/badge/%20version%20-%206.0.0%20-blue.svg?style=flat-square\" alt=\"Releases\"\u003e\u003c/a\u003e --\u003e\n\n  \u003eGolang Desktop Automation, binding other language. Control the mouse, keyboard, bitmap, read the screen,   Window Handle and global event listener.\n\nRobotn supports Mac, Windows, and Linux(X11). Robot supports go, javascript, python and other.\n\n[简体中文](https://github.com/vcaesar/robotn/blob/master/README_zh.md)\n\n## Contents\n- [Docs](#docs)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Update](#update)\n- [Examples](#examples)\n- [Authors](#authors)\n- [Plans](#plans)\n- [Donate](#donate)\n- [Contributors](#contributors)\n- [License](#license)\n\n## Docs\n  - [GoDoc](https://godoc.org/github.com/go-vgo/robotgo)\n  - [API Docs](https://github.com/go-vgo/robotgo/blob/master/docs/doc.md) \u0026nbsp;\u0026nbsp;\u0026nbsp;\n  - [中文文档](https://github.com/go-vgo/robotgo/blob/master/docs/doc_zh.md)\n\n## Requirements:\n\nNow, there is no prebuild binary version available, Please make sure `Golang, GCC` is installed correctly before installing robotgo.\n\n[Robotgo Requirements](https://github.com/go-vgo/robotgo#requirements)\n\n# Install robotn\n```\nnpm install robotn\n```\n\nAlso, you can [Build from source code](#Build-from-source-code). The python's `pip install`, and the prebuilt binaries will be added in the future.\n\n## [Examples:](https://github.com/go-vgo/robotgo/blob/master/examples)\n\n#### [Mouse](https://github.com/go-vgo/robotgo/blob/master/examples/mouse/main.go)\n\n```js\nvar robot = require('robotn');\n\nrobot.scroll(10, 10);\nrobot.mouseClick(\"left\", true);\nrobot.moveSmooth(100, 200, 1.0, 100.0);\n```\n\n#### python\n\n```py\nimport robot\n\nrobot.scroll(10, 10)\nrobot.mouseClick(\"left\", true)\nrobot.moveSmooth(100, 200, 1.0, 100.0)\n```\n\n#### [Keyboard](https://github.com/go-vgo/robotgo/blob/master/examples/key/main.go)\n\n```js\nvar robot = require('robotn');\n\nrobot.typeStr(\"测试\")\nrobot.typeStr(\"山达尔星新星军团, galaxy. こんにちは世界.\")\nrobot.sleep(1)\n\nrobot.keyTap(\"enter\")\n\nrobot.writeAll(\"Test\")\nvar text = robot.readAll()\nconsole.log(text)\n```\n\n#### [Screen](https://github.com/go-vgo/robotgo/blob/master/examples/screen/main.go)\n\n```js\nvar robot = require('robotn');\n\nvar pos = robot.getMousePos()\nconsole.log(\"pos: \", pos)\nvar color = robot.getPixelColor(100, 200)\nconsole.log(\"color---- \", color)\n```\n\n#### [Bitmap](https://github.com/go-vgo/robotgo/blob/master/examples/bitmap/main.go)\n\n```js\nvar robot = require('robotn');\n\nvar bitmap = robot.captureScreen(10, 20, 30, 40)\nconsole.log(\"...\", bitmap)\n\nvar pos = robot.findBitmap(bitmap)\nconsole.log(\"FindBitmap------ \", pos)\n\nrobot.saveBitmap(bitmap, \"test.png\")\n// use `robot.freeBitmap(bit)` to free the bitmap\nrobot.freeBitmap(bitmap)\n```\n\n#### [Event](https://github.com/go-vgo/robotgo/blob/master/examples/event/main.go)\n\n```js\nvar robot = require('robotn');\n\nvar keve = robot.addEvent(\"k\");\nif (keve) {\n  console.log(\"you press... \", \"k\");\n}\n\nvar s = robot.addEvents(\"q\", \"ctrl\");\nif (s) {\n  console.log(\"you press... \", \"mouse left button\");\n}\n```\n\n#### [Window](https://github.com/go-vgo/robotgo/blob/master/examples/window/main.go)\n\n```js\nvar robot = require('robotn');\n\nvar fpid = robot.findIds(\"Google\")\nconsole.log(\"pids... \", fpid)\n\nif (fpid.length \u003e 0) {\n  robot.activePID(fpid[0])\n\n  robot.kill(fpid[0])\n}\n\nrobot.activeName(\"chrome\")\n\nvar isExist = robot.pidExists(100)\nif (isExist) {\n  console.log(\"pid exists is\", isExist)\n\n  robot.kill(100)\n}\n\nvar abool = robot.showAlert(\"test\", \"robotgo\")\nif (abool == 0) {\n  console.log(\"ok@@@ \", \"ok\")\n}\n\nvar title = robot.getTitle()\nconsole.log(\"title@@@ \", title)\n```\n\n## Build from source code:\n\n### Install robotgo\n```\ngo get -u github.com/go-vgo/robotgo\n```\n\n```\ngit clone https://github.com/vcaesar/robotn\n```\n\n### [Build-tools](https://github.com/vcaesar/gocs)\n```\ngo get -v github.com/vcaesar/gocs\n```\n\n### Building\n\n```\ncd robotn\n```\n\n```\ngocs -n robotgo\n```\n\n#### node:\n##### Install npm modules\n```\nnpm install\n```\n\n#### python\n```\npip install cffi\n```\n\n## Authors\n* [The author is vz](https://github.com/vcaesar)\n* [Maintainers](https://github.com/orgs/go-vgo/people)\n* [Contributors](https://github.com/go-vgo/robotgo/graphs/contributors)\n\n## Plans\n- Update Find an image on screen, read pixels from an image\n- Update Window Handle\n- Try support Android, maybe support IOS\n\n## Contributors\n\n- See [contributors page](https://github.com/go-vgo/robotgo/graphs/contributors) for full list of contributors.\n- See [Contribution Guidelines](https://github.com/go-vgo/robotgo/blob/master/CONTRIBUTING.md).\n\n## License\n\nRobotgo is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.\n\nSee [LICENSE-APACHE](http://www.apache.org/licenses/LICENSE-2.0), [LICENSE-MIT](https://github.com/go-vgo/robotgo/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvcaesar%2Frobotn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvcaesar%2Frobotn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvcaesar%2Frobotn/lists"}