{"id":15646049,"url":"https://github.com/npalm/action-docs","last_synced_at":"2025-05-16T15:08:14.397Z","repository":{"id":37529667,"uuid":"340717016","full_name":"npalm/action-docs","owner":"npalm","description":"Generate docs for GitHub actions","archived":false,"fork":false,"pushed_at":"2025-05-06T10:29:43.000Z","size":1521,"stargazers_count":93,"open_issues_count":22,"forks_count":24,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-08T21:27:31.067Z","etag":null,"topics":["cli","documentation-generator","github-actions","github-reusable-workflows","hacktoberfest"],"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/npalm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-02-20T17:50:59.000Z","updated_at":"2025-05-03T06:35:53.000Z","dependencies_parsed_at":"2024-02-04T11:52:12.800Z","dependency_job_id":"105bf6b1-f1e6-4cea-9fd5-dc7133717e54","html_url":"https://github.com/npalm/action-docs","commit_stats":{"total_commits":158,"total_committers":13,"mean_commits":"12.153846153846153","dds":0.430379746835443,"last_synced_commit":"aa6bf323dbd8db52ee8797fd3b41e61e3307db11"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npalm%2Faction-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npalm%2Faction-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npalm%2Faction-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npalm%2Faction-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npalm","download_url":"https://codeload.github.com/npalm/action-docs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553958,"owners_count":22090417,"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":["cli","documentation-generator","github-actions","github-reusable-workflows","hacktoberfest"],"created_at":"2024-10-03T12:11:10.204Z","updated_at":"2025-05-16T15:08:09.371Z","avatar_url":"https://github.com/npalm.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003c!-- BADGES/ --\u003e\n\n![example workflow](https://github.com/npalm/action-docs/actions/workflows/ci.yml/badge.svg) [![npm](https://img.shields.io/npm/v/action-docs.svg)](https://npmjs.org/package/action-docs) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=action-docs\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=action-docs) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=action-docs\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=action-docs) [![CodeScene Code Health](https://codescene.io/projects/49602/status-badges/code-health)](https://codescene.io/projects/49602)\n\n\u003c!-- /BADGES --\u003e\n\n# Action docs\n\nA CLI to generate and update documentation for GitHub actions or workflows, based on the definition `.yml`. To update your README in a GitHub workflow you can use the [action-docs-action](https://github.com/npalm/action-docs-action).\n\n## TL;DR\n\n### Add the following comment blocks to your README.md\n\n```md\n\u003c!-- action-docs-header source=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-description source=\"action.yml\" --\u003e # applicable for actions only\n\n\u003c!-- action-docs-inputs source=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-outputs source=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-runs source=\"action.yml\" --\u003e # applicable for actions only\n```\n\nOptionally you can also add the following section to generate a usage guide, replacing \\\u003cproject\\\u003e and \\\u003cversion\\\u003e with the name and version of your project you would like to appear in your usage guide.\n\n```md\n\u003c!-- action-docs-usage source=\"action.yml\" project=\"\u003cproject\u003e\" version=\"\u003cversion\u003e\" --\u003e\n```\n\n### Generate docs via CLI\n\n```bash\nnpm install -g action-docs\ncd \u003cyour github action\u003e\n\n# write docs to console\naction-docs\n\n# update README\naction-docs --update-readme\n```\n\n### Run the cli\n\n```\naction-docs -u\n```\n\n## CLI\n\n### Options\n\nThe following options are available via the CLI\n\n```\nOptions:\n      --version              Show version number                       [boolean]\n  -t, --toc-level            TOC level used for markdown   [number] [default: 2]\n  -a, --action               GitHub action file\n             [deprecated: use \"source\" instead] [string] [default: \"action.yml\"]\n  -s, --source               GitHub source file [string] [default: \"action.yml\"]\n      --no-banner            Print no banner\n  -u, --update-readme        Update readme file.                        [string]\n  -l, --line-breaks          Used line breaks in the generated docs.\n                          [string] [choices: \"CR\", \"LF\", \"CRLF\"] [default: \"LF\"]\n  -n, --include-name-header  Include a header with the action/workflow name\n                                                                       [boolean]\n      --help                 Show help                                 [boolean]\n```\n\n### Update the README\n\nAction-docs can update your README based on the `action.yml`. The following sections can be updated: name header, description, inputs, outputs, usage, and runs. Add the following tags to your README and run `action-docs -u`.\n\n```md\n\u003c!-- action-docs-header source=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-description source=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-inputs source=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-outputs source=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-runs action=\"action.yml\" --\u003e\n\n\u003c!-- action-docs-usage action=\"action.yml\" project=\"\u003cproject\u003e\" version=\"\u003cversion\u003e\" --\u003e\n```\n\nOr to include all of the above, use:\n\n```md\n\u003c!-- action-docs-all source=\"action.yml\" project=\"\u003cproject\u003e\" version=\"\u003cversion\u003e\" --\u003e\n```\n\nFor updating other Markdown files add the name of the file to the command `action-docs -u \u003cfile\u003e`.\n\nIf you need to use `another/action.yml`:\n\n1. write it in tags like `source=\"another/action.yml\"`;\n2. specify in a command via the `-s` option like `action-docs -s another/action.yml`\n\n### Examples\n\n#### Print action markdown docs to console\n\n```bash\naction-docs\n```\n\n#### Update README.md\n\n```bash\naction-docs --update-readme\n```\n\n#### Print action markdown for non default action file\n\n```bash\naction-docs --source another/action.yaml\n```\n\n#### Update readme, custom action file and set TOC level 3, custom readme\n\n```bash\naction-docs --source ./some-dir/action.yml --toc-level 3 --update-readme docs.md\n```\n\n## API\n\n```javascript\nimport { generateActionMarkdownDocs } from 'action-docs'\n\nawait generateActionMarkdownDocs({\n  sourceFile: 'action.yml'\n  tocLevel: 2\n  updateReadme: true\n  readmeFile: 'README.md'\n});\n```\n\n## Contribution\n\nWe welcome contributions, please checkout the [contribution guide](CONTRIBUTING.md).\n\n## License\n\nThis project is released under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpalm%2Faction-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpalm%2Faction-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpalm%2Faction-docs/lists"}