https://github.com/stoe/action-reporting-cli
CLI to report on GitHub Actions
https://github.com/stoe/action-reporting-cli
cli github reporting
Last synced: 9 months ago
JSON representation
CLI to report on GitHub Actions
- Host: GitHub
- URL: https://github.com/stoe/action-reporting-cli
- Owner: stoe
- License: mit
- Created: 2022-02-22T15:11:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T06:47:22.000Z (10 months ago)
- Last Synced: 2025-04-13T16:51:20.566Z (9 months ago)
- Topics: cli, github, reporting
- Language: JavaScript
- Homepage: https://npm.im/@stoe/action-reporting-cli
- Size: 555 KB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license
- Codeowners: .github/codeowners
- Security: .github/security.md
Awesome Lists containing this project
README
# action-reporting-cli
[](https://github.com/stoe/action-reporting-cli/actions/workflows/test.yml) [](https://github.com/stoe/action-reporting-cli/actions/workflows/github-code-scanning/codeql) [](https://github.com/stoe/action-reporting-cli/actions/workflows/publish.yml) [](https://github.com/prettier/prettier)
> CLI to report on GitHub Actions
## Usage example
```sh
$ npx @stoe/action-reporting-cli [--options]
```
## Required options [one of]
- `--enterprise`, `-e` GitHub Enterprise (Cloud|Server) account slug (e.g. _enterprise_).
- `--owner`, `-o` GitHub organization/user login (e.g. _owner_).
If `--owner` is a user, results for the authenticated user (`--token`) will be returned.
- `--repository`, `-r` GitHub repository name with owner (e.g. _owner/repo_).
## Additional options
- `--token`, `-t` GitHub Personal Access Token (PAT) (default `GITHUB_TOKEN`).
- `--hostname` GitHub Enterprise Server hostname (default `api.github.com`).
For example: `github.example.com`
## Report options
- `--all` Report all below.
- `--listeners` Report `on` listeners used.
- `--permissions` Report `permissions` values for `GITHUB_TOKEN`.
- `--runs-on` Report `runs-on` values.
- `--secrets` Report `secrets` used.
- `--uses` Report `uses` values.
- `--exclude` Exclude GitHub Actions created by GitHub.
From https://github.com/actions and https://github.com/github organizations.
Only applies to `--uses`.
- `--unique` List unique GitHub Actions.
Possible values are `true`, `false` and `both`.
Only applies to `--uses`. Will create an additional `*-unique.{csv,json,md}` report file.
- `--vars` Report `vars` used.
## Report output options
- `--csv` Path to save CSV output (e.g. /path/to/reports/report.csv).
- `--json` Path to save JSON output (e.g. /path/to/reports/report.json).
- `--md` Path to save markdown output (e.g. /path/to/reports/report.md).
## Helper options
- `--help`, `-h` Print action-reporting-cli help.
- `--version`, `-v` Print action-reporting-cli version.
## Examples
```sh
# Report on everything in the `my-enterprise` GitHub Enterprise Cloud account.
# Save CSV, JSON and markdown reports to `./reports/actions.{csv,json,md}`.
$ npx @stoe/action-reporting-cli \
--token ghp_000000000000000000000000000000000000 \
--enterprise my-enterprise \
--all \
--csv ./reports/actions.csv \
--json ./reports/actions.json \
--md ./reports/actions.md
```
```sh
# Report on everything in the `my-org` GitHub organization.
# Save JSON report to `./reports/actions.json`.
$ npx @stoe/action-reporting-cli \
--token ghp_000000000000000000000000000000000000 \
--owner my-org \
--permissions \
--runs-on \
--secrets \
--uses \
--vars \
--json ./reports/actions.json
```
```sh
# Report on unique GitHub Actions in the `my-org/myrepo` GitHub repository.
# Exclude GitHub Actions created by GitHub.
# Save CSV report to `./reports/actions.csv`.
$ npx @stoe/action-reporting-cli \
--token ghp_000000000000000000000000000000000000 \
--repository my-org/myrepo \
--uses \
--exclude \
--unique both \
--csv ./reports/actions.csv
```
```sh
# Report on everything in the `my-org` GitHub organization on `github.example.com` GitHub Enterprise Server.
# Save JSON report to `./reports/actions.json`.
$ npx @stoe/action-reporting-cli \
--hostname github.example.com \
--token ghp_000000000000000000000000000000000000 \
--owner my-org \
--all \
--json ./reports/actions.json
```
## License
[MIT](./license) © [Stefan Stölzle](https://github.com/stoe)