https://github.com/nodef/extra-gcpconfig
Get ready to use GCP Config from parameters and environment variables.
https://github.com/nodef/extra-gcpconfig
cli cloud command config console environment extra gcp google parameter platform shell variable
Last synced: about 1 year ago
JSON representation
Get ready to use GCP Config from parameters and environment variables.
- Host: GitHub
- URL: https://github.com/nodef/extra-gcpconfig
- Owner: nodef
- License: mit
- Created: 2019-01-12T04:33:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-02T15:21:37.000Z (almost 3 years ago)
- Last Synced: 2025-01-26T09:15:51.043Z (over 1 year ago)
- Topics: cli, cloud, command, config, console, environment, extra, gcp, google, parameter, platform, shell, variable
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/extra-gcpconfig
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Get ready to use [GCP Config] from parameters and environment variables.
> Do you want to:
> - Have GCP Config loaded from environment variables?
> - Get GCP Config from arguments?
## Setup
1. Run `npm install -g extra-gcpconfig` in **console**.
2. To install this as a package use `npm install extra-gcpconfig`.
## Console
```bash
gcpconfig
# get default GCP config
gcpconfig --credentialsFile credentials.json
gcpconfig --keyFilename credentials.json
# use a custom credentials file
## credentials/config file can be JSON
```
### Reference
```bash
gcpconfig [options]
# -> GCP config as JSON
# Options:
# --help: show this help
# -cf, --credentialsFile: set custom GCP credentails file path
# -kf, --keyFilename: set custom GCP credentails file path
# Environment variables:
$GOOGLE_APPLICATION_CREDENTIALS # set default GCP credentails file path
```
## Package
```javascript
const gcpconfig = require('extra-gcpconfig');
gcpconfig();
// get default GCP config
gcpconfig({keyFilename: 'credentials.json'});
// use a custom credentials file
/// credentials/config file can be JSON
var A = process.argv, o = {};
for(var i=0, I=A.length; i new index in arguments array
gcpconfig(options);
// options: custom GCP config options
// -> GCP config options
// Default options:
options = {
keyFilename: null // set custom GCP credentails file path
};
```
## Similar
Do you need anything similar?
> - [extra-googletranslate] can translate long text to target language.
> - [extra-googletts] can generate speech from text.
Suggestions are welcome. Please [create an issue].
[](https://nodef.github.io)
> References: [GCP Config].
[GCP Config]: https://cloud.google.com/docs/authentication/production
[extra-googletranslate]: https://www.npmjs.com/package/extra-googletranslate
[extra-googletts]: https://www.npmjs.com/package/extra-googletts
[create an issue]: https://github.com/nodef/extra-gcpconfig/issues