项目作者: anomaly

项目描述 :
A command line tool for managing Github project secrets
高级语言: TypeScript
项目地址: git://github.com/anomaly/github-secrets-cli.git
创建时间: 2020-07-06T05:46:01Z
项目社区:https://github.com/anomaly/github-secrets-cli

开源协议:Apache License 2.0

下载


github-secrets-cli

A CLI based GitHub Secrets Manager.

oclif
@anomalyhq/github-secrets-cli"">Version
@anomalyhq/github-secrets-cli"">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.

ghs config:get

Outputs your configuration.

  1. USAGE
  2. $ ghs config:get

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

ghs config:set

Update your configuration

  1. USAGE
  2. $ ghs config:set
  3. OPTIONS
  4. -o, --org=org Organisation the repo belongs to.
  5. -r, --repo=repo Name of the repo.
  6. -t, --personalAccessToken=personalAccessToken Your GitHub Personal Access Token.

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

ghs help [COMMAND]

display help for ghs

  1. USAGE
  2. $ ghs help [COMMAND]
  3. ARGUMENTS
  4. COMMAND command to show help for
  5. OPTIONS
  6. --all see all commands in CLI

See code: @oclif/plugin-help

ghs secrets:get

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

  1. USAGE
  2. $ ghs secrets:get
  3. OPTIONS
  4. -h, --help show CLI help
  5. -o, --org=org Organisation the repo belongs to.
  6. -r, --repo=repo Name of the repo.
  7. -t, --personalAccessToken=personalAccessToken Your GitHub Personal Access Token.

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

ghs secrets:remove

Remove a secret

  1. USAGE
  2. $ ghs secrets:remove
  3. OPTIONS
  4. -h, --help show CLI help
  5. -o, --org=org Organisation the repo belongs to.
  6. -r, --repo=repo Name of the repo.
  7. -s, --secret=secret (required) GitHub Secret to remove.
  8. -t, --personalAccessToken=personalAccessToken Your GitHub Personal Access Token.
  9. -y, --autoYes Skips user confirmation.

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

ghs secrets:set

Update/Create a secret

  1. USAGE
  2. $ ghs secrets:set
  3. OPTIONS
  4. -b, --base64 base64 the string before encoding.
  5. -f, --file=file Location of a file to create a secret from.
  6. -h, --help show CLI help
  7. -i, --input=input String to create a secret from.
  8. -o, --org=org Organisation the repo belongs to.
  9. -r, --repo=repo Name of the repo.
  10. -s, --secret=secret (required) GitHub Secret to update/create.
  11. -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.

  1. USAGE
  2. $ ghs secrets:sync FILE
  3. ARGUMENTS
  4. FILE Path to the file to read from.
  5. OPTIONS
  6. -b, --base64 base64 the values before encoding.
  7. -f, --format=env|json|yaml (required) File format to parse secrets from.
  8. -h, --help show CLI help
  9. -o, --org=org Organisation the repo belongs to.
  10. -r, --repo=repo Name of the repo.
  11. -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.