This is a CLI tool that helps you to encrypt and decrypt the IntelliJ SFCC B2C Credentials file.
You can run the npm link
command before using this tool. This will allow you to directly run the intellij-sfcc-cli
command in your command line directly.
yarn install
npm link
# prior to an npm link
yarn decrypt -s "~/intellij-sfcc-credentials.creds" -t "~/intellij-sfcc-credentials.json" -k "12345--2210b196f067f24-7"
# after an npm link
intellij-sfcc-cli decrypt -s "~/intellij-sfcc-credentials.creds" -t "~/intellij-sfcc-credentials.json" -k "12345--2210b196f067f24-7"
# return access keys for a particular host
intellij-sfcc-cli decrypt -h abcd-001 -u [email protected]
# using environment variables
intellij-sfcc-cli decrypt
# return access keys for a particular host using environment variables
intellij-sfcc-cli decrypt -h abcd-001
# prior to an npm link
yarn encrypt -s "~/intellij-sfcc-credentials.json" -t "~/intellij-sfcc-credentials.creds" -k "12345--2210b196f067f24-7"
# after an npm link
intellij-sfcc-cli encrypt -s "~/intellij-sfcc-credentials.json" -t "~/intellij-sfcc-credentials.creds" -k "12345--2210b196f067f24-7"
# using environment variables
intellij-sfcc-cli encrypt
Use intellij-sfcc-cli --help
or just intellij-sfcc-cli
to get started and see the full list of commands available:
Usage: jb-sfcc-cred-cli [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
decrypt [options]
encrypt [options]
help [command] display help for command
Environment:
SFCC_INTELLIJ_CREDENTIALS_FILE set path for `intellij-sfcc-credentials.creds` file (encrypted file)
SFCC_INTELLIJ_JSON_FILE set path for `intellij-sfcc-credentials.json` file (decrypted file)
SFCC_INTELLIJ_CREDENTIALS_KEY secret key used to decrypt/encrypt credentials file
SFCC_USERNAME SFCC user name/email address
Rename sample.env
to .env
or use global environment variables
SFCC_INTELLIJ_CREDENTIALS_FILE=~/intellij-sfcc-credentials.creds
SFCC_INTELLIJ_JSON_FILE=~/intellij-sfcc-credentials.json
SFCC_INTELLIJ_CREDENTIALS_KEY=12345--2210b196f067f24-7
[email protected]