{"id":15678955,"url":"https://github.com/anandchowdhary/puppet","last_synced_at":"2025-04-13T15:25:58.432Z","repository":{"id":37908881,"uuid":"255962483","full_name":"AnandChowdhary/puppet","owner":"AnandChowdhary","description":"🎭 Natural language web automation with Puppeteer","archived":false,"fork":false,"pushed_at":"2024-06-16T11:34:15.000Z","size":1282,"stargazers_count":13,"open_issues_count":12,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T01:45:08.559Z","etag":null,"topics":["automation","chrome","chromium","puppeteer","scraper","typescript","web"],"latest_commit_sha":null,"homepage":"https://puppet.js.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnandChowdhary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-15T15:39:39.000Z","updated_at":"2025-03-04T05:35:56.000Z","dependencies_parsed_at":"2024-10-31T21:02:07.404Z","dependency_job_id":"a88d5d12-2cb5-470a-8f7f-9a95afc39711","html_url":"https://github.com/AnandChowdhary/puppet","commit_stats":{"total_commits":74,"total_committers":6,"mean_commits":"12.333333333333334","dds":"0.21621621621621623","last_synced_commit":"2c8c826cbe2310bcb9e2206b20aee2d52802a152"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"AnandChowdhary/node.ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fpuppet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fpuppet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fpuppet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnandChowdhary%2Fpuppet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnandChowdhary","download_url":"https://codeload.github.com/AnandChowdhary/puppet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248734225,"owners_count":21153176,"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","chrome","chromium","puppeteer","scraper","typescript","web"],"created_at":"2024-10-03T16:25:36.129Z","updated_at":"2025-04-13T15:25:58.394Z","avatar_url":"https://github.com/AnandChowdhary.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎭 Puppet\n\nNatural-language web automation using [Puppeteer](https://github.com/puppeteer/puppeteer).\n\n[![Node CI](https://img.shields.io/github/workflow/status/AnandChowdhary/puppet/Node%20CI?label=GitHub%20CI\u0026logo=github)](https://github.com/AnandChowdhary/puppet/actions)\n[![Travis CI](https://img.shields.io/travis/AnandChowdhary/puppet?label=Travis%20CI\u0026logo=travis%20ci\u0026logoColor=%23fff)](https://travis-ci.org/AnandChowdhary/puppet)\n[![Coverage](https://coveralls.io/repos/github/AnandChowdhary/puppet/badge.svg?branch=master\u0026v=2)](https://coveralls.io/github/AnandChowdhary/puppet?branch=master)\n[![Dependencies](https://img.shields.io/librariesio/release/npm/puppet)](https://libraries.io/npm/puppet)\n[![License](https://img.shields.io/npm/l/puppet)](https://github.com/AnandChowdhary/puppet/blob/master/LICENSE)\n[![Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/npm/puppet.svg)](https://snyk.io/test/npm/puppet)\n[![Based on Node.ts](https://img.shields.io/badge/based%20on-node.ts-brightgreen)](https://github.com/AnandChowdhary/node.ts)\n[![npm type definitions](https://img.shields.io/npm/types/puppet.svg)](https://unpkg.com/browse/puppet/dist/index.d.ts)\n[![npm package](https://img.shields.io/npm/v/puppet.svg)](https://www.npmjs.com/package/puppet)\n[![npm downloads](https://img.shields.io/npm/dw/puppet)](https://www.npmjs.com/package/puppet)\n[![Contributors](https://img.shields.io/github/contributors/AnandChowdhary/puppet)](https://github.com/AnandChowdhary/puppet/graphs/contributors)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n[![npm](https://nodei.co/npm/puppet.png)](https://www.npmjs.com/package/puppet)\n\n## ⭐️ How it works\n\nWrite in natural language (following the [Commands](#-commands) section). For example, you can create a file with the following set of commands:\n\n**`path/to/download.puppet`**:\n\n```txt\nGo to typeform.com\nClick on the login link\nType username user@example.com\nType password 3rjiw9qie2308\nClick on login button\nTake a screenshot\nDownload https://admin.typeform.com/export\nSave to to report.csv\n```\n\nThen, run the command:\n\n```bash\npuppet \"path/to/download.puppet\"\n```\n\n## 💡 Usage\n\n### CLI\n\nInstall the package globally from [npm](https://www.npmjs.com/package/puppet):\n\n```bash\nnpm install --global puppet\n```\n\n```bash\n# Local Puppet file\npuppet \"path/to/commands.puppet\"\n\n# Remote Puppet file\npuppet https://pastebin.com/raw/AeY1MAwF\n\n# Commands directly in CLI\npuppet \"open example.com\" \"get page HTML\" \"save as page.html\"\n```\n\n### API\n\nImport and use the API:\n\n```ts\nconst { puppet } = require(\"puppet\"); // Node.js\nimport { puppet } from \"puppet\"; // TypeScript/ES6\n\n// Local Puppet file\nawait puppet(\"path/to/commands.puppet\");\n\n// Remote Puppet file\nawait puppet(\"https://pastebin.com/raw/AeY1MAwF\");\n\n// Commands directly as an array of strings\nawait puppet([\"open example.com\", \"get page HTML\", \"save as page.html\"]);\n```\n\n## 🔫 Commands\n\n### Navigation\n\n- `Go to example.com`\n- `Navigate to URL https://example.com`\n- `Go to the page on example.com`\n- `Open www.example.com`\n\n### Timers\n\n- `Wait for 10 seconds`\n- `Wait for 2 minutes`\n- `Wait for 100ms`\n- `Wait for navigation`\n\n### Screenshot\n\n- `Take a screenshot of this page`\n- `Take a JPEG screenshot`\n- `Full screenshot this page`\n- `Make a transparent screenshot`\n- `Screenshot and omit the background`\n\n### Export page to PDF/HTML\n\n- `Save this page as PDF`\n- `Save page HTML`\n- `Get the HTML`\n- `Save the whole page as PDF`\n\n### Save to file\n\n- `Save result to path/to/file`\n- `Save this screenshot to path/to/file`\n- `Save this to the file path/to/file`\n\n### Mouse events\n\n- `Click on point [123, 456]`\n- `Right click on coordinates 123, 456`\n- `Move mouse cursor to points 123, 456`\n- `Click on 123, 456 using middle mouse button`\n\n## 👩‍💻 Development\n\nBuild TypeScript:\n\n```bash\nnpm run build\n```\n\nRun unit tests and view coverage:\n\n```bash\nnpm run test-without-reporting\n```\n\n## Related work\n\n- [Puppeteer](https://github.com/puppeteer/puppeteer) is the headless Chrome API for Node.js\n- [Archiver](https://github.com/AnandChowdhary/archiver) is the Internet Archive saver I made using Puppeteer\n- [TagUI](https://github.com/kelaberetiv/TagUI) is a CLI for digital process automation (RPA)\n\n## ✨ Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://anandchowdhary.com/?utm_source=github\u0026utm_medium=about\u0026utm_campaign=about-link\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/2841780?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAnand Chowdhary\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-AnandChowdhary\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/AnandChowdhary/puppet/commits?author=AnandChowdhary\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/AnandChowdhary/puppet/commits?author=AnandChowdhary\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/AnandChowdhary/puppet/commits?author=AnandChowdhary\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://gitspo.com\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/973543?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGajus Kuizinas\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-gajus\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## 📄 License\n\n- Code: [MIT](./LICENSE) © [Anand Chowdhary](https://anandchowdhary.com)\n- Landing page copy: CC-BY 4.0 Puppet\n- Icon: CC-BY 3.0 [Jon Trillana](https://thenounproject.com/search/?q=puppet\u0026i=44227)\n- Illustrations: CC-0 [Pablo Stanley](https://www.opendoodles.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fpuppet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanandchowdhary%2Fpuppet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanandchowdhary%2Fpuppet/lists"}