{"id":28510722,"url":"https://github.com/iobroker/create-adapter","last_synced_at":"2025-10-24T10:46:40.665Z","repository":{"id":33661159,"uuid":"159664503","full_name":"ioBroker/create-adapter","owner":"ioBroker","description":"Command line utility to create customized ioBroker adapters","archived":false,"fork":false,"pushed_at":"2025-09-27T22:16:17.000Z","size":5349,"stargazers_count":52,"open_issues_count":56,"forks_count":27,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-27T23:29:46.065Z","etag":null,"topics":["adapter","development","hacktoberfest","iobroker"],"latest_commit_sha":null,"homepage":"","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/ioBroker.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-11-29T12:42:06.000Z","updated_at":"2025-09-27T21:08:43.000Z","dependencies_parsed_at":"2024-01-15T14:15:40.957Z","dependency_job_id":"3293ee94-2f3f-49fe-82e7-31bd21eb5552","html_url":"https://github.com/ioBroker/create-adapter","commit_stats":{"total_commits":1374,"total_committers":19,"mean_commits":72.3157894736842,"dds":0.4759825327510917,"last_synced_commit":"a5df82e725ef4af573a9aba94ceaf700854e2bab"},"previous_names":["alcalzone/create-adapter"],"tags_count":64,"template":false,"template_full_name":null,"purl":"pkg:github/ioBroker/create-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioBroker%2Fcreate-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioBroker%2Fcreate-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioBroker%2Fcreate-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioBroker%2Fcreate-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ioBroker","download_url":"https://codeload.github.com/ioBroker/create-adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioBroker%2Fcreate-adapter/sbom","scorecard":{"id":112654,"data":{"date":"2025-08-11","repo":{"name":"github.com/ioBroker/create-adapter","commit":"4e14103dfb1ef17ad922dd6ae896142ba3ccc11b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 4/26 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:16","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:17","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/dependabot-automerge.yml:1","Warn: no topLevel permission defined: .github/workflows/test-and-release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependabot-automerge.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/dependabot-automerge.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dependabot-automerge.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/dependabot-automerge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-and-release.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/test-and-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-and-release.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/test-and-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-and-release.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/test-and-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test-and-release.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/test-and-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-and-release.yml:120: update your workflow using https://app.stepsecurity.io/secureworkflow/ioBroker/create-adapter/test-and-release.yml/master?enable=pin","Warn: containerImage not pinned by hash: templates/_devcontainer/iobroker/_Dockerfile.ts:9: pin your Docker image by updating iobroker/iobroker:latest to iobroker/iobroker:latest@sha256:dd19bd63e86b3767e567baf4d675466c92a80318287e9481b59b36a22b56804b","Warn: containerImage not pinned by hash: templates/_devcontainer/parcel/_Dockerfile.ts:10: pin your Docker image by updating node:12 to node:12@sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e","Warn: containerImage not pinned by hash: test/baselines/devcontainer/.devcontainer/iobroker/Dockerfile:1: pin your Docker image by updating iobroker/iobroker:latest to iobroker/iobroker:latest@sha256:dd19bd63e86b3767e567baf4d675466c92a80318287e9481b59b36a22b56804b","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   3 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 6 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-7v5v-9h63-cj86","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T13:34:49.674Z","repository_id":33661159,"created_at":"2025-08-15T13:34:49.674Z","updated_at":"2025-08-15T13:34:49.674Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280783846,"owners_count":26390277,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["adapter","development","hacktoberfest","iobroker"],"created_at":"2025-06-08T23:06:02.959Z","updated_at":"2025-10-24T10:46:40.655Z","avatar_url":"https://github.com/ioBroker.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"adapter-creator.png\" width=\"48\" height=\"48\" style=\"vertical-align: middle\" /\u003e\u0026nbsp;\u003cspan style=\"vertical-align: middle\"\u003eioBroker adapter creator\u003c/span\u003e\n\nCommand line utility to quickly create a new adapter or VIS widget for [ioBroker](https://github.com/ioBroker):\n\n\u003cimg src=\"docs/screenshot.png\"\u003e\n\n[\n![node](https://img.shields.io/node/v/@iobroker/create-adapter.svg)\n![npm](https://img.shields.io/npm/v/@iobroker/create-adapter.svg)\n](https://www.npmjs.com/package/@iobroker/create-adapter)\n![Test and Release](https://github.com/ioBroker/create-adapter/workflows/Test%20and%20Release/badge.svg)\n![License](https://img.shields.io/npm/l/@iobroker/create-adapter.svg)\n[\n![Changelog](https://img.shields.io/badge/read-Changelog-blue.svg)\n](CHANGELOG.md)\n\n## Prerequisites\n\nAny computer with Node.js in version 18 or higher and npm 9 or higher. Note that the created adapters or ioBroker itself may have different requirements.\n\n## Usage\n\nThis tool is not supposed to be installed. Instead, run the most recent version using\n\n```\nnpx @iobroker/create-adapter@latest [options]\n```\n\nin the directory where the directory of your project should be created. You don't need to create the adapter/widget directory, because it will be created for you.\n**WARNING:** If the path contains a space, this [won't work](https://github.com/npm/npx/issues/14).\n\nAfter a short while, you will be asked a few questions. Afterwards all the necessary files will be created for you.\n\n### Options\n\nThe following CLI options are available:\n\n-   `--target=/path/to/dir` - Specify which directory the adapter files should be created in (instead of the current dir). Shortcut: `-t`\n-   `--skipAdapterExistenceCheck` - Don't check if an adapter with the same name already exists on `npm`. Shortcut: `-x`\n-   `--replay=/path/to/file` - Re-run the adapter creator with the answers of a previous run (the given file needs to be the `.create-adapter.json` in the root of the previously generated directory). Shortcut: `-r`\n-   `--migrate=/path/to/dir` - Run the adapter creator with the answers pre-filled from an existing adapter directory (the given path needs to point to the adapter base directory where `io-package.json` is found). Shortcut: `-m`\n-   `--noInstall` - Don't install dependencies after creating the files. Shortcut: `-n`\n\nAll CLI options can also be [provided as environment variables](https://yargs.js.org/docs/#api-reference-envprefix) by prepending `CREATE_ADAPTER_`. Example: `CREATE_ADAPTER_TARGET=/tmp/iobroker/create-adapter/`\n\n### Environment variables\n\nBesides all environment variables mentioned above under \"Options\" the following variables change the behavior of the application:\n\n-   `GOOGLE_APPLICATION_CREDENTIALS` - if this is pointing to a valid JSON file, the Google API v3 will be used for translations, make sure that the credentials are allowed to use the Google Translation API. Check [the documentation](https://cloud.google.com/translate/docs/setup) for more details.\n\n## Features\n\n-   Choose between: ioBroker adapter, VIS widget or both\n-   Ask for package metadata (with automatic translation):\n    -   Title (mandatory)\n    -   Short description (optional)\n    -   Adapter start mode\n    -   Adapter/VIS category\n    -   Keywords (optional)\n-   IntelliSense (auto completion and tooltips) in supporting editors based on the [ioBroker declaration files](https://www.npmjs.com/package/@types/iobroker)\n-   JavaScript with the following optional tools:\n    -   [ESLint](https://github.com/eslint/eslint) for code quality\n    -   Type checking based on the ioBroker declarations, including strongly-typed `adapter.config` properties\n-   Or TypeScript with the following optional tools:\n    -   [ESLint](https://github.com/eslint/eslint) for code quality\n    -   Automatic formatting with [Prettier](https://github.com/prettier/prettier/)\n    -   [nyc](https://github.com/istanbuljs/nyc) for code coverage\n    -   strongly-typed `adapter.config` properties\n-   Choose between indentation: tabs or 4 spaces\n-   Choose your preferred quote style\n-   Integration in the ioBroker admin UI:\n    -   Settings page\n    -   An extra tab (optional)\n    -   Custom datapoint-specific options (optional)\n-   [React](https://reactjs.org/) as an alternative to plain HTML+CSS for the admin and extra tab UI, based on [`@iobroker/adapter-react`](https://github.com/ioBroker/adapter-react/)\n-   Predefined settings page for the admin UI\n-   Choice of an OpenSource license and automatic creation of the license file\n-   Built-in component tests using `mocha`, `chai` (with `chai-as-promised`) and `sinon` (with `sinon-chai`) for:\n    -   Correctly defined package files\n    -   and your own tests...\n-   Automated testing using Github Actions, including a script for semantic release of new versions\n\n## Developing\n\nFirst of all: **DO NOT** push changes to `master` directly! Just don't. Every change should be done through PRs, which have a template with a checklist to fill out.\nThis makes sure that `master` always works and every change is documented.\n\nFor developers of this package, there are a few things to know:\n\n-   `npm run build` creates a fresh build and deletes old build files. This is necessary when template files are renamed or deleted, as the compiled files will still be there.\n-   `npm run watch` keeps compiling incremental changes whenever you save a source file.\n-   The directory `/templates` contains a bunch of templates, which are basically TypeScript files exporting a single method:\n    -   This method accepts an object with the user's answers and returns a `string` or `Promise\u003cstring\u003e` containing the output file.\n    -   The last extension (`.ts`) is removed when creating the output file. Setting the `customPath` property of the template method allows you to override the output path of the file, either a constant or depending on the user's answers (function).\n    -   The outputted files are automatically formatted to have the correct indentation and multiple empty lines are removed. If you don't want this, set `noReformat` to true.\n-   Test your changes with `npm test` and/or write relevant tests. For a couple of representative combination of answers, baseline adapter directories are generated. If those baselines are changed as a result of your changes, please review if those changes are desired.\n-   Migration testing is available via `npm run test:migration`. This test clones the ioBroker.example repository (which contains reference adapters created with the adapter creator) and verifies that they can be successfully recreated, built, and linted using the current version of the creator. This ensures backward compatibility with previously generated adapters.\n\n## Publishing\n\nDo not publish directly using `npm`. Instead create a new release with the release script `npm run release ...`. This creates a tag on github, performs a test run on Github Actions and after a successful build automatically publishes to npm.\n\nYou can semantically increase the version and publish it by using\n\n```bash\nnpm run release [\u003creleaseType\u003e [\u003cpostfix\u003e]] [-- --dry]\n```\n\n(preferably) or set a specific version by using\n\n```bash\nnpm run release \u003cversion\u003e [-- --dry]\n```\n\nThe option `-- --dry` (don't forget the first pair of dashes) performs a dry run without updating files.\nThe available release types are:\n\n-   `major`\n-   `premajor`\n-   `minor`\n-   `preminor`\n-   `patch`\n-   `prepatch`\n-   `prerelease`\n\nand the `pre-...` versions allow you to append a postfix like `-beta`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiobroker%2Fcreate-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiobroker%2Fcreate-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiobroker%2Fcreate-adapter/lists"}