{"id":18099406,"url":"https://github.com/gunar/shellcheck","last_synced_at":"2025-03-17T15:13:00.985Z","repository":{"id":45443760,"uuid":"112321505","full_name":"gunar/shellcheck","owner":"gunar","description":"Linting for your bash code","archived":false,"fork":false,"pushed_at":"2024-06-08T12:28:37.000Z","size":973,"stargazers_count":32,"open_issues_count":6,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T10:45:00.625Z","etag":null,"topics":["nodejs","npm","shell","shellcheck"],"latest_commit_sha":null,"homepage":"http://www.shellcheck.net/","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/gunar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"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,"publiccode":null,"codemeta":null}},"created_at":"2017-11-28T10:32:52.000Z","updated_at":"2024-06-08T12:26:41.000Z","dependencies_parsed_at":"2024-06-08T13:58:15.785Z","dependency_job_id":null,"html_url":"https://github.com/gunar/shellcheck","commit_stats":{"total_commits":104,"total_committers":12,"mean_commits":8.666666666666666,"dds":0.6153846153846154,"last_synced_commit":"8f492ea4701c5960a134f14fbd73335a38113926"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fshellcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fshellcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fshellcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fshellcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunar","download_url":"https://codeload.github.com/gunar/shellcheck/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056425,"owners_count":20390719,"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":["nodejs","npm","shell","shellcheck"],"created_at":"2024-10-31T21:08:35.040Z","updated_at":"2025-03-17T15:13:00.959Z","avatar_url":"https://github.com/gunar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 --\u003e\n\n# shellcheck\n\n[![ci](https://github.com/gunar/shellcheck/actions/workflows/ci.yml/badge.svg)](https://github.com/gunar/shellcheck/actions/workflows/ci.yml)\n[![codeql](https://github.com/gunar/shellcheck/actions/workflows/codeql.yml/badge.svg)](https://github.com/gunar/shellcheck/actions/workflows/codeql.yml)\n\n[ShellCheck](https://www.shellcheck.net) - A shell script static analysis tool.\n\nDownloads the most recent version of [koalaman](https://github.com/koalaman)'s [ShellCheck](https://www.shellcheck.net).\n\n## Installation\n\n\u003e **Warning**: Node.js version `\u003e= 18.12.0` is required\n\n```sh\nnpm install --save-dev shellcheck\n```\n\n## Usage\n\n\u003e **Note**: On first execution `shellcheck` it's automatically downloaded\n\n\u003e **Note**: It's recommended to execute `shellcheck` using [`npx`](https://docs.npmjs.com/cli/commands/npx)\n\n\u003e **Note**: Proxy support via `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables\n\n\u003e **Note**: By default, all GitHub requests are anonymous. If you encounter error `403 | rate limit exceeded` (e.g., in CI), set the environment variable `GITHUB_TOKEN` to use your own personal access token\n\nExecute `shellcheck` directly from your npm scripts:\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"npx shellcheck path/to/script.sh\"\n  }\n}\n```\n\n### Environment Variables\n\n| **Name**                    | **Values**                                                 | **Default**                                                                   | **Description**                                                        |\n| :-------------------------- | :--------------------------------------------------------- | :---------------------------------------------------------------------------- | :--------------------------------------------------------------------- |\n| `SHELLCHECKJS_RELEASE`      | `latest` \\| `v(0\\|[1-9]\\d*)\\.(0\\|[1-9]\\d*)\\.(0\\|[1-9]\\d*)` | `latest`                                                                      | Release version. See \u003chttps://github.com/koalaman/shellcheck/releases\u003e |\n| `SHELLCHECK_BIN`            | Any valid path to an executable binary file                | _linux_ or _darwin_: `./bin/shellcheck` \u003cbr/\u003e _win32_: `.\\bin\\shellcheck.exe` | ShellCheck executable binary path                                      |\n| `SHELLCHECKJS_LOGGER_LEVEL` | `off` \\| `debug` \\| `info` \\| `warn` \\| `error`            | `info`                                                                        | Logger level                                                           |\n\n### Programmatic\n\n\u003e **Note**: More _functions_, _utilities_, and _constants_ are available\n\n```ts\nimport { shellcheck, download, config } from 'shellcheck';\n\n/**\n * Spawn ShellCheck.\n * Download ShellCheck if not found or invalid.\n */\nawait shellcheck({\n  args: ['path/to/script.sh', 'path/to/another/script.sh']\n  // Options...\n})\n  .then((result) =\u003e {\n    // Check error\n    if (result.error) throw result.error;\n\n    // Print stdout\n    if (result.stdout) console.log(result.stdout.toString('utf8'));\n    // Print stderr\n    if (result.stderr) console.error(result.stderr.toString('utf8'));\n\n    // Exit code\n    if (result?.status !== 0) throw new Error(`Exit code: ${result?.status}`);\n  })\n  .catch((err) =\u003e {\n    console.error(`Error: ${err}`);\n    throw err;\n  });\n\n/**\n * Download ShellCheck.\n */\nawait download({\n  destination: `path/to/destination/shellcheck`\n  // destination: `path\\\\to\\\\destination\\\\shellcheck.exe` // Windows\n  // Options...\n});\n```\n\n## Compatibility\n\n\u003e **Note**: [`Platform`](https://nodejs.org/api/process.html#processplatform) and [`Architecture`](https://nodejs.org/api/process.html#processarch) follow _Node.js_ naming convention\n\n| **Platform** | **Architecture** |\n| ------------ | ---------------- |\n| `linux`      | `x64`            |\n| `linux`      | `arm64`          |\n| `darwin`     | `x64`            |\n| `darwin`     | `arm64`          |\n| `win32`      | `x64`            |\n\n## Contributing\n\nI would love to see your contribution :heart:\n\nSee [CONTRIBUTING](./CONTRIBUTING.md) guidelines.\n\n## License\n\nThis project is licensed under the [MIT](https://opensource.org/licenses/MIT) License. \\\nSee [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunar%2Fshellcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunar%2Fshellcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunar%2Fshellcheck/lists"}