apeman-scrt

Secret manager for apeman.

Usage no npm install needed!

<script type="module">
  import apemanScrt from 'https://cdn.skypack.dev/apeman-scrt';
</script>

README

apeman-scrt

Build Status Code Climate Code Coverage npm Version JS Standard

Secret manager for apeman.

Installation

Install apeman-scrt module via npm.

$ npm install apeman-scrt -g

Usage

  1. Prepare an Apemanfile.js at your project root.
  2. Run the command via CLI.

Apemanfile.js

/** Example of Apemanfile.js */

'use strict'

module.exports = {
  $cwd: __dirname,
  $pkg: { /* ... */ },
  $proto: [ /* ... */ ],
  $tmpls: { /* ... */ },
  $tasks: { /* ... */ },
  $apps: { /* ... */ },
  $wtchs: { /* ... */ },
  $infra: { /* ... */ },
  // Secret json file path.
  $scrt: './secret.json'
}

Then,

$ apeman-scrt MYSQL_ROOT_PASSWORD
CLI Options
$ apeman-scrt -h

  Usage: apeman-scrt [options] [name...] 

  Encrypt/decrypt secret file.

  Options:

    -h, --help                           output usage information
    -V, --version                        output the version number
    -p, --password <password>            Password of secret.
    -c, --configuration <configuration>  Pathname of Apemanfile

  Examples:

    $ apeman-scrt                     # Update secret file.


Programmatic API

apeman-scrt also provide programmatic API.

Firstly, install the module locally.

$ npm install apeman-scrt --save-dev

Then,

'use strict'

const apemanScrt = require('apeman-scrt')

apemanScrt({

}).then(() => {
    /* ... */
})

Programmatic Options
Key Description Default
password Password of secret.
configuration Pathname of Apemanfile

License

This software is released under the MIT License.

Links