Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@igor-lemon/secure-electron-license-keys-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@igor-lemon/secure-electron-license-keys-cli

A CLI to create and offline license keys for your Electron apps.

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

secure-electron-license-keys-cli

A secure way to generate license keys for your Electron apps.

Usage

First, you must install the package.

> npm i secure-electron-license-keys-cli

After installing the package, you need to run the cli tool to create the license key you'll package in a given distributable.

> secure-electron-license-keys-cli # alternately, you can run "selkc"

Running the above command will create a public.key, private.key and license.data. Keep the private key in a safe location.

The public.key and license.data [by default] you will need to put in the root of your Electron app. The secure-electron-license-keys package will attempt to decrypt the license.data with the public.key. If decryption with the public key succeeds, you can act as appropriate within your app (ie. deny access or allow the user to continue).

Options

There are a number of options you can use to customize your license key generation.

ArgShorthandDefaultDescription
--major-ma"*"Represents the major version of your app
--minor-mi"*"Represents the minor version of your app
--patch-p"*"Represents the patch version of your app
--user-u""Represents a unique value, tied to a user (ie. an email)
--expire-e""A value when the license expires (ie. could be a date)
--public-pu"public.key"The name of the public key when generated
--private-pr"private.key"The name of the private key when generated
--license-l"license.data"The name of the license data file when generated
--output-oprocess.cwd()The path where the keys/license data file are generated to
--private-key-pknullThe path to the private key
--public-key-pubknullThe path to the public key
--valid-to-vtnullSet the time of license valid. Patterns: years-<num>, months-<num>, days-<num>, hours-<num>, minutes-<num>, seconds-<num>

Samples

Here are some examples of using some of the options in the command line.

> secure-electron-license-keys-cli --major "2"
> secure-electron-license-keys-cli --major "2" --expire "2022-06-05"
> secure-electron-license-keys-cli --expire "2022-12-25" --user "uniqueuseremail@account.com"
> secure-electron-license-keys-cli --expire "2022-12-25" --user "uniqueuseremail@account.com" --valid-to "months-6"

Note - you can also use the shorthand (ie. selkc instead of secure-electron-license-keys-cli)

Keywords

FAQs

Package last updated on 22 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc