Skip to content

sandragolden/intellij-sfcc-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intellij-sfcc-cli

Introduction

This is a CLI tool that helps you to encrypt and decrypt the IntelliJ SFCC B2C Credentials file.

How to

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

Decrypt Credentials File to JSON File

# 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

Encrypt JSON File to Credentials File

# 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

Commands

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

Environment Variables Sample

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]

About

Intellij SFCC Plugin Credential Helper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published