@inialum/token-generator
v0.3.0
Published
CLI tool to generate token
Readme
@inialum/token-generator
CLI tool to generate a token for INIALUM services.
Usage
Install the package:
pnpm add -D @inialum/token-generatorOr if you prefer to run it directly without installing it:
pnpm dlx @inialum/token-generator -- <options>Create a
.envfile in the root of your project:TOKEN_SECRET=<secret>You can create random secret value for
TOKEN_SECRETwith the following command:openssl rand -base64 32Add the following script to your
package.json:{ "scripts": { "generate-token": "inialum-token-generator --service-name <service_name> --env-file <path_to_env_file>" } }--service-nameis required. It is the name of the service that will use the token.--env-fileis optional. If not provided, the tool will look for a.envfile in the root of your project.Run the script in your project:
pnpm run generate-token
Tips
You can also install from JSR and run it on Deno:
deno install -g --allow-read --allow-env --allow-run -n inialum-token-generator jsr:@inialum/token-generator
inialum-token-generator -- <options>License
Licensed under Apache License 2.0.
