{"id":27061171,"url":"https://github.com/mdusi/puppetchef","last_synced_at":"2025-04-05T14:19:44.562Z","repository":{"id":286201121,"uuid":"948170417","full_name":"mdusi/puppetchef","owner":"mdusi","description":"A tool that uses Puppeteer to execute web automation recipes defined in YAML format.","archived":false,"fork":false,"pushed_at":"2025-04-04T22:36:29.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T23:25:37.174Z","etag":null,"topics":["automation","puppeteer","web","yaml"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mdusi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2025-03-13T21:41:10.000Z","updated_at":"2025-04-04T22:34:51.000Z","dependencies_parsed_at":"2025-04-04T23:36:18.264Z","dependency_job_id":null,"html_url":"https://github.com/mdusi/puppetchef","commit_stats":null,"previous_names":["mdusi/puppetchef"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdusi%2Fpuppetchef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdusi%2Fpuppetchef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdusi%2Fpuppetchef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdusi%2Fpuppetchef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdusi","download_url":"https://codeload.github.com/mdusi/puppetchef/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247346487,"owners_count":20924218,"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","puppeteer","web","yaml"],"created_at":"2025-04-05T14:19:44.018Z","updated_at":"2025-04-05T14:19:44.553Z","avatar_url":"https://github.com/mdusi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Puppetchef\n\nA web automation tool that uses Puppeteer to execute web automation recipes defined in YAML format.\n\n## Features\n\n- **YAML-based Recipe Definition**: Write your web automation tasks in a simple, readable YAML format (syntax inspired by Ansible).\n- **Schema Validation**: Built-in validation for recipe structure and operations.\n- **Plugin System**: Extend functionality with custom plugins.\n- **Configuration Management**: Flexible configuration through JSON files.\n- **Verbose Logging**: Detailed execution logs for debugging.\n- **Syntax Check Mode**: Validate recipes without executing them.\n- **Common Plugins and Commands**: Built-in plugins and commands for easier automation.\n\n## Installation\n\n```bash\nnpm install puppetchef\n```\n\n## Usage\n\n```bash\npuppetchef \u003crecipe\u003e [options]\n```\n\n### Command Line Options\n\n- `\u003crecipe\u003e`: Recipe file in YAML format (required).\n- `-c, --conf \u003cfile\u003e`: Configuration file (default: `puppetchefrc`).\n- `-v, --verbose`: Enable verbose logging (default: `false`).\n- `--syntax-check`: Validate recipe only, without executing (default: `false`).\n\n### Examples\n\n```bash\n# Basic usage with a recipe file\npuppetchef recipe.yaml\n\n# With configuration file and verbose logging\npuppetchef recipe.yaml -c config.json -v\n\n# Validate recipe without executing\npuppetchef recipe.yaml --syntax-check\n```\n\n### Configuration File (puppetchefrc)\n\nCreate a JSON configuration file to customize browser behavior:\n\n```json\n{\n  \"browser\": {\n    \"headless\": false,\n    \"defaultViewport\": {\n      \"width\": 1920,\n      \"height\": 1080\n    }\n  }\n}\n```\n\n### Recipe Format\n\n```yaml\nurl: \"https://example.com\"\nname: \"Login Test\"\ntasks:\n  - name: \"Login\"\n    steps:\n      - puppetchef.builtin.common:\n          command: \"fill_out\"\n          selector: \"#username\"\n          data: \"testuser\"\n      - puppetchef.builtin.common:\n          command: \"fill_out\"\n          selector: \"#password\"\n          data: \"password123\"\n      - puppetchef.builtin.common:\n          command: \"click\"\n          selector: \"#submit\"\n```\n\n### Plugins\n\nCreate custom plugins to extend functionality:\n\n```javascript\n// plugin.js\nmodule.exports = {\n  customAction: async (page, data = {}) =\u003e {\n    // Custom automation logic\n    await page.locator(data.selector);\n\n    // If you need to return values for later use\n    return { x: 20, y: \"msg\"};\n  }\n};\n```\n\nUse plugins in your recipe (plugin below is expected in ./plugins/plugin.js):\n\n```yaml\nname: Example Recipe\nurl: https://example.com/demo-url\ntasks:\n  - name: \"Custom Action\"\n    steps:\n      - puppetchef.plugins.plugin:\n          command: \"customAction\"\n          selector: \"#username\"\n        # Make the return value of customAction available to the following steps\n        register: ret\n      - puppetchef.builtin.common:\n          command: debug\n          data: \"{{ ret.y }}\"\n          format: \"Debugging: %s\"\n        # Conditionals for when to execute this step\n        when: ret.x \u003e 0\n```\n\n## Development\n\n### Project Structure\n\n```\npuppetchef/\n├── src/\n│   ├── index.js    # Main automation logic\n│   └── recipe.js   # Recipe parsing and validation\n├── builtin/\n│   ├── common.js   # Utility functions\n├── index.js        # CLI entry point\n└── package.json\n```\n\n### Running Tests\n\n```bash\nnpm test\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdusi%2Fpuppetchef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdusi%2Fpuppetchef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdusi%2Fpuppetchef/lists"}