@anomalyhq/github-secrets-cli
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

github-secrets-cli

A CLI based GitHub Secrets Manager.

oclif Version Downloads/week License

ghs provides a command line interface to manage GitHub Secrets for your projects.

Note: You will need a GitHub Personal Access Token with the repo scope. Detailed instructions available in their docs
You can Click Here to quickly set up a key with the required permissions.

Usage

$ npm install -g @anomalyhq/github-secrets-cli
$ ghs COMMAND
running command...
$ ghs (-v|--version|version)
@anomalyhq/github-secrets-cli/1.2.0 darwin-x64 node-v14.15.4
$ ghs --help [COMMAND]
USAGE
  $ ghs COMMAND
...

Commands

ghs config:get

Outputs your configuration.

USAGE
  $ ghs config:get

See code: src/commands/config/get.ts

ghs config:set

Update your configuration

USAGE
  $ ghs config:set

OPTIONS
  -o, --org=org                                  Organisation the repo belongs to.
  -r, --repo=repo                                Name of the repo.
  -t, --personalAccessToken=personalAccessToken  Your GitHub Personal Access Token.

See code: src/commands/config/set.ts

ghs help [COMMAND]

display help for ghs

USAGE
  $ ghs help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

ghs secrets:get

Fetch a list of set secrets (cannot read secret values)

USAGE
  $ ghs secrets:get

OPTIONS
  -h, --help                                     show CLI help
  -o, --org=org                                  Organisation the repo belongs to.
  -r, --repo=repo                                Name of the repo.
  -t, --personalAccessToken=personalAccessToken  Your GitHub Personal Access Token.

See code: src/commands/secrets/get.ts

ghs secrets:remove

Remove a secret

USAGE
  $ ghs secrets:remove

OPTIONS
  -h, --help                                     show CLI help
  -o, --org=org                                  Organisation the repo belongs to.
  -r, --repo=repo                                Name of the repo.
  -s, --secret=secret                            (required) GitHub Secret to remove.
  -t, --personalAccessToken=personalAccessToken  Your GitHub Personal Access Token.
  -y, --autoYes                                  Skips user confirmation.

See code: src/commands/secrets/remove.ts

ghs secrets:set

Update/Create a secret

USAGE
  $ ghs secrets:set

OPTIONS
  -b, --base64                                   base64 the string before encoding.
  -f, --file=file                                Location of a file to create a secret from.
  -h, --help                                     show CLI help
  -i, --input=input                              String to create a secret from.
  -o, --org=org                                  Organisation the repo belongs to.
  -r, --repo=repo                                Name of the repo.
  -s, --secret=secret                            (required) GitHub Secret to update/create.
  -t, --personalAccessToken=personalAccessToken  Your GitHub Personal Access Token.

See code: src/commands/secrets/set.ts

ghs secrets:sync FILE

Add/Update multiple secrets from one file.

USAGE
  $ ghs secrets:sync FILE

ARGUMENTS
  FILE  Path to the file to read from.

OPTIONS
  -b, --base64                                   base64 the values before encoding.
  -f, --format=env|json|yaml                     (required) File format to parse secrets from.
  -h, --help                                     show CLI help
  -o, --org=org                                  Organisation the repo belongs to.
  -r, --repo=repo                                Name of the repo.
  -t, --personalAccessToken=personalAccessToken  Your GitHub Personal Access Token.

See code: src/commands/secrets/sync.ts

License

Distributed under the Apache 2.0 License. See LICENSE for further information.

Package Sidebar

Install

npm i @anomalyhq/github-secrets-cli

Weekly Downloads

0

Version

1.2.0

License

Apache-2.0

Unpacked Size

45.7 kB

Total Files

30

Last publish

Collaborators

  • mdevraj