Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

github-action-readme-generator

bitflight-devops1.2kApache-2.01.9.1TypeScript support: included

The docs generator for GitHub Actions. Auto-syncs action.yml to README.md with 8 sections: inputs, outputs, usage, badges, branding & more. Works as CLI or GitHub Action.

github-actions, actions, documentation, readme-generator, action-yml, markdown-generator, github-action-docs, auto-docs, devops, cli, inputs-outputs, usage-generator

readme

GitHub Action README Generator

branding<icon:book-open color:yellow> GitHub Action: GitHub Action's Readme Generator

Release%20by%20tagRelease%20by%20dateCommitOpen%20IssuesDownloads


📓 The docs generator for GitHub Actions. Auto-syncs action.yml → README.md with 8 sections including inputs, outputs, usage, badges & branding. Sensible defaults, highly configurable.

Quick Start

npx github-action-readme-generator

That's it. Run this in your GitHub Action repository and your README.md is updated.

Features

| | Feature | Description | | :----------------: | ------------------- | ------------------------------------------------------------ | | :white_check_mark: | Inputs Table | Auto-generates markdown table from action.yml inputs | | :white_check_mark: | Outputs Table | Auto-generates markdown table from action.yml outputs | | :white_check_mark: | Usage Example | Creates ready-to-copy YAML workflow snippet | | :white_check_mark: | Auto-Versioning | Updates uses: owner/repo@v1.2.3 on every release | | :white_check_mark: | GitHub Badges | Adds release, commit, issues, and download badges | | :white_check_mark: | SVG Branding | Generates icon from action.yml branding (100+ icons) | | :white_check_mark: | Easy Setup | Add section markers to README, configure via .ghadocs.json | | :white_check_mark: | Dual Mode | Use as CLI (npx) or GitHub Action in workflows |

How It Works

This tool uses markdown comments as section markers in your README:

<!-- start inputs -->
<!-- end inputs -->

Run the generator, and content between these markers is automatically updated from your action.yml. See README.example.md for a complete template.

Works as both CLI and GitHub Action - configure via .ghadocs.json, command line args, or the Action's with: section.

CLI Usage

Usage Options Description Default
--help Show help [boolean]
--paths:action, --action Path to the action.yml [default: ""]
--paths:readme, --readme Path to the README.md [default: ""]
--show_logo, --logo Display the action's logo in the README [default: false]
--prettier, --pretty Format the markdown using prettier formatter [default: false]
--versioning:enabled, --versioning Enable the update of the usage version to match the latest version in the package.json file [default: false]
--versioning:override, --version Show version number[boolean] [default: ""]
--versioning:prefix, --vp Prefix the version with this value (if it isn't already prefixed) [default: ""]
--versioning:branch, --branch If versioning is disabled show this branch instead [default: ""]
--title_prefix, --prefix Add a prefix to the README title [default: ""]

Stand Alone Usage - if you have a Docker Action

npx --yes github-action-readme-generator@latest

Install with Yarn or NPM as a dev dependency

yarn add -D github-action-readme-generator
# or
npm i --save-dev github-action-readme-generator

Add a script to your project file

You can modify the script below to include any extra variables you like or use none, and instead use a .ghadocs.json file.

{
  "scripts": {
    "ghadocs": "github-action-readme-generator --readme README.md && git add README.md"
  }
}

Using as a Pre-commit Hook

You can automate README generation on every commit by using this tool as a pre-commit hook. This ensures your documentation stays up-to-date automatically.

  1. Install the tool locally (if you haven't already):
npm install --save-dev github-action-readme-generator
# or
yarn add -D github-action-readme-generator
  1. Configure pre-commit:

Add the following to your .pre-commit-config.yaml file:

repos:
  - repo: local
    hooks:
      - id: github-action-readme-generator
        name: Generate README from action.yml
        entry: npx github-action-readme-generator
        language: system
        files: ^(action\.yml|\.ghadocs\.json)$
        pass_filenames: false

This configuration will automatically regenerate your README whenever action.yml or .ghadocs.json changes.

Configuration

Example .ghadocs.json with all possible values

{
  "paths": {
    "action": "action.yml",
    "readme": "README.md"
  },
  "show_logo": true,
  "versioning": {
    "enabled": true,
    "override": "",
    "prefix": "v",
    "branch": "main"
  },
  "owner": "bitflight-devops",
  "repo": "github-action-readme-generator",
  "title_prefix": "GitHub Action: ",
  "prettier": true
}

Table of Contents

Usage

- uses: bitflight-devops/github-action-readme-generator@v1.9.0
  with:
    # Description: The absolute or relative path to the `action.yml` file to read in
    # from.
    #
    # Default: action.yml
    action: ""

    # Description: The absolute or relative path to the markdown output file that
    # contains the formatting tokens within it.
    #
    # Default: README.md
    readme: ""

    # Description: The GitHub Action repository owner, this field is autodetected by
    # default. Example: `bitflight-devops` or `your-gh-username`
    #
    owner: ""

    # Description: The GitHub Action repository name, this field is autodetected by
    # default. Example: `github-action-readme-generator`
    #
    repo: ""

    # Description: Save the provided values in a `.ghadocs.json` file. This will
    # update any existing `.ghadocs.json` file that is in place.
    #
    # Default: false
    save: ""

    # Description: Use `prettier` to pretty print the new README.md file
    #
    # Default: true
    pretty: ""

    # Description: Enable the update of the usage version to match the latest version
    # in the `package.json` file Output if your action repo is
    # `reviewdog/action-eslint` and version in package.json is `1.0.1`:
    # `uses: reviewdog/action-eslint@1.0.1`
    #
    # Default: true
    versioning_enabled: ""

    # Description: Set a specific version to display in the README.md, maybe you want
    # to use a major or minor version
    #
    version_override: ""

    # Description: Prefix the version with this value, if it isn't already prefixed
    #
    # Default: v
    version_prefix: ""

    # Description: If versioning is disabled, use this branch in the usage example,
    # where the default is `main` Output if your action repo is
    # `reviewdog/action-eslint`: `uses: reviewdog/action-eslint@main`
    #
    # Default: main
    versioning_default_branch: ""

    # Description: Add a prefix to the README title. The title template looks like
    # this:
    #
    # # {brand}{prefix}{title}
    #
    # Default: GitHub Action:
    title_prefix: ""

    # Description: Include additional badge showing latest tag
    #
    # Default: true
    include_github_version_badge: ""

    # Description: Create the branding svg image from the branding object in
    # `action.yml` then save it to this path. Then update the `README.md` file to
    # source the branding image from this path. You can use a section template like
    # this: `<!-- start branding --><!-- stop branding -->` or use the action input:
    # `branding_as_title_prefix: true` to prefix the 'title' section with the image.
    # The title template looks like this:
    #
    # # {brand}{prefix}{title}
    #
    # Default: .github/ghadocs/branding.svg
    branding_svg_path: ""

    # Description: Prefix the title in the `<!-- start title -->` section with the svg
    # branding image The title template looks like this:
    #
    # # {brand}{prefix}{title}
    #
    # Default: true
    branding_as_title_prefix: ""

Inputs

Input Description Default Required
action The absolute or relative path to the action.yml file to read in from. action.yml false
readme The absolute or relative path to the markdown output file that contains the formatting tokens within it. README.md false
owner The GitHub Action repository owner, this field is autodetected by default.
Example: bitflight-devops or your-gh-username
| false
repo The GitHub Action repository name, this field is autodetected by default.
Example: github-action-readme-generator
| false
save Save the provided values in a .ghadocs.json file.
This will update any existing .ghadocs.json file that is in place.
| false
pretty Use prettier to pretty print the new README.md file true false
versioning_enabled Enable the update of the usage version to match the latest version in the package.json file
Output if your action repo is reviewdog/action-eslint and version in package.json is 1.0.1:
uses: reviewdog/action-eslint@1.0.1
true false
version_override Set a specific version to display in the README.md, maybe you want to use a major or minor version | false
version_prefix Prefix the version with this value, if it isn't already prefixed v false
versioning_default_branch If versioning is disabled, use this branch in the usage example, where the default is main
Output if your action repo is reviewdog/action-eslint:
uses: reviewdog/action-eslint@main
main false
title_prefix Add a prefix to the README title.
The title template looks like this:
# {brand}{prefix}{title}
GitHub Action: false
include_github_version_badge Include additional badge showing latest tag true false
branding_svg_path Create the branding svg image from the branding object in action.yml
then save it to this path.
Then update the README.md file to source the branding image from this path.
You can use a section template like this:
Output Description Value
sections A json object containing a map of section names to their new content
readme The path to the generated README.md file
readme_before The content of the readme file before the changes were made
readme_after The content of the readme file after the changes were made

NOTE: volta.sh is a great tool for managing node versions, and is configured in this directory. If you have volta installed, you can run volta install to install the correct version of node for this project.


Bitflight DevOps

Built by Bitflight DevOps

changelog

1.9.1 (2026-01-28)

Bug Fixes

  • disambiguate duplicate TOC anchors and persist empty TOC (767a192)

1.9.0 (2026-01-28)

Features

  • implement table of contents generation for contents section (3e9a0a4)

1.8.10 (2026-01-25)

Bug Fixes

1.8.9 (2026-01-18)

Bug Fixes

1.8.8 (2026-01-11)

Bug Fixes

  • add legacy-peer-deps to .npmrc for CI compatibility (9ba9b37)
  • disable n/no-missing-import rule for ESLint compatibility (0e4141c)
  • remove legacy-peer-deps by upgrading and removing unmaintained packages (3755216)

1.8.7 (2026-01-08)

Bug Fixes

  • upgrade @typescript-eslint/eslint-plugin to 8.51.0 and remove deprecated rule (e3034a1)

1.8.6 (2026-01-05)

Bug Fixes

  • correct npm ln typo to npm link in setup-node action (78073c4)
  • revert npm ln to npm link change - ln is a valid alias (eab4124)
  • update engines and esbuild-node-externals for Node 25 compatibility (73968ba)

1.8.5 (2025-12-07)

Bug Fixes

1.8.4 (2025-11-21)

Bug Fixes

  • add 📓 emoji to description and adjust wording to stay under 125 chars (abd2cad)

1.8.3 (2025-11-21)

Bug Fixes

  • release: update package.json (489cdf9)

1.8.2 (2025-11-21)

Bug Fixes

  • ci: add conventional commits to github actions version updater (c49de89)

1.8.1 (2025-11-06)

Performance Improvements

  • externalize prettier to reduce bundle size by 58% (9d29197)

1.8.0 (2025-11-05)

Bug Fixes

  • add 'vibes' to contributions for Jamie Nelson (#414) (684c155)
  • add division by zero check and improve diff error handling (cc937f9)
  • add integration test and resolve linting issues (9e8993a), closes #335 #335
  • apply linting and formatting fixes (a4392aa)
  • correct lint:eslint:fix script and apply auto-fixes (fa7bcee)
  • defaults: fix npm release blockage (34e2f46)
  • remove match regex from nconf env config to enable INPUT_ var transformation (b61f097)
  • update nconf import for CommonJS/ESM compatibility (#409) (1878c34)
  • use Node 24 for semantic-release to satisfy version requirement (529a2d2)
  • use Node 24 for semantic-release to satisfy version requirement (5e0acc4)
  • use sanitized artifact names to avoid special characters (f64a248)

Features

  • add integration test workflow for real-world repositories (ca961e5)
  • add matrix testing for Node.js 20.x and 24.x versions (aa4ee85)
  • add Value column to outputs table and pre-commit hook documentation (81a096d)
  • enable npm provenance for automated publishing without manual token (b2484cf)
  • enable npm provenance with OIDC and Node 24 for semantic-release (#413) (c526aae)
  • refactor: JSDocs added, Unit Tests added using ViTest, refactored for maintainability (#239) (0451f2c)

1.9.0 (2025-11-05)

Bug Fixes

  • add division by zero check and improve diff error handling (cc937f9)
  • add integration test and resolve linting issues (9e8993a), closes #335 #335
  • apply linting and formatting fixes (a4392aa)
  • correct lint:eslint:fix script and apply auto-fixes (fa7bcee)
  • remove match regex from nconf env config to enable INPUT_ var transformation (b61f097)
  • update nconf import for CommonJS/ESM compatibility (#409) (1878c34)
  • use Node 24 for semantic-release to satisfy version requirement (529a2d2)
  • use Node 24 for semantic-release to satisfy version requirement (5e0acc4)
  • use sanitized artifact names to avoid special characters (f64a248)

Features

  • add integration test workflow for real-world repositories (ca961e5)
  • add matrix testing for Node.js 20.x and 24.x versions (aa4ee85)
  • add Value column to outputs table and pre-commit hook documentation (81a096d)
  • enable npm provenance for automated publishing without manual token (b2484cf)
  • enable npm provenance with OIDC and Node 24 for semantic-release (#413) (c526aae)

1.8.0 (2023-11-20)

Bug Fixes

  • defaults: fix npm release blockage (34e2f46)

Features

  • refactor: JSDocs added, Unit Tests added using ViTest, refactored for maintainability (#239) (0451f2c)

1.7.2 (2023-10-24)

Bug Fixes

  • dist: dist check was failing due to not installing optional dependencies (347fb89)
  • dist: dist check was failing due to not installing optional dependencies (9aa26d9)
  • markdown: update formatting in tables to use and tags (e950f20)
  • usage: usage section was missing descriptions (8dc2738)
  • usage: usage section was missing its descriptions (4d6e063)

1.7.1 (2023-10-24)

Bug Fixes

  • nconf: nconf released a fix for dynamic imports (2e5c3c3)

1.7.0 (2023-10-22)

Bug Fixes

  • readme: newlines missing around content sections in readme (0ca9980)

Features

  • branding: icons now correctly centered on circle (2c26d93)
  • branding: new segment for readme generates action.yml branding svg (07c3bbe)
  • engines: update node engines to be >= 18, from 14 (35b5d08)
  • improve devx (9f34cf8)

1.6.0 (2023-10-16)

Bug Fixes

  • test: inputs test was failing due to node20 bundling error (7b5cac4)

Features

  • refactor: make the readme sections update in memory before writing it out once (a4468c1)

1.5.1 (2023-10-14)

Bug Fixes

  • only replace grave accents when vertical pipe (e69fb0d)
  • release: update the release workflows (4f5b377)