Gunbot JWT Token Generator — Broxynet
Developer Utility · JWT Auth

Gunbot JWT Token Generator

A production-ready Node.js CLI that logs into your running Gunbot instance and prints (and optionally saves) the signed JWT token you need for API access. No npm install required — all dependencies ship vendored in node_modules/.

3Setup Steps
< 1 minTo Run
Node v18+Minimum
Step 01 — Prerequisites

What You’ll Need

Before running the generator, confirm that you have each of the following in place.

  • Node.js v18 or newer — the runtime that executes the CLI. Download from nodejs.org if needed. (npm is not required to run this tool.)
  • A running Gunbot instance — where your installation is reachable, e.g. http://127.0.0.1:5000 for a local setup or the address of your remote server.
  • Gunbot password — the master password configured in your Gunbot installation. Entered at the prompt and never stored on disk.
  • Gunthy wallet key — used to derive the AES encryption key for login; entered hidden and never stored.
Note: Keep both credentials handy but do not share them in plain text. The CLI reads them interactively so they are never written to disk.
Step 02 — Get the App

Download & Place the jwt-app Folder

The tool ships as a self-contained folder. No build step and no package installation are required.

  1. Create or choose a working directory, e.g. C:\gunbot (Windows) or ~/gunbot (Linux).
  2. Download the complete jwt-app folder from the Files section below and place it inside that directory.
  3. That’s it — the vendored dependencies in node_modules/ (axios, readline-sync) are already included, so you skip npm install.

Folder Layout

jwt-app/
├── bin/gbtoken-gen.js      # CLI entry point (run this)
├── src/index.js            # interactive prompt flow + output handling
├── lib/auth.js             # Gunbot login request
├── lib/encrypt.js          # AES password encryption
├── lib/config.js           # URL persistence (no secrets saved)
├── node_modules/           # vendored deps: axios, readline-sync
└── package.json
No dependencies to install: everything the CLI needs is already present in node_modules/. If you ever need to restore them, run npm install from the folder root.
Step 03 — Run the CLI

Execute & Retrieve Your JWT Token

Follow the platform-specific steps below. The CLI will prompt you for your credentials and return a signed token on success.

Windows (Command Prompt or PowerShell)

  1. Open Command Prompt or PowerShell.
  2. Navigate into the app folder:
    cd C:\gunbot\jwt-app
  3. Run the entry point with Node.js:
    node bin/gbtoken-gen.js

Linux / macOS (Ubuntu · Debian, etc.)

  1. Open a Terminal.
  2. Navigate into the app folder:
    cd ~/gunbot/jwt-app
  3. Run the entry point with Node.js:
    node bin/gbtoken-gen.js

Optional: Save the Token to a File

Pass --output to write the token to a file (the default suggestion is token.txt):

node bin/gbtoken-gen.js --output token.txt

What You’ll See at the Prompt

When prompted, enter your details in order. Password and wallet key inputs are hidden (not echoed).

  • Gunbot URL — e.g. http://127.0.0.1:5000. Reused automatically on the next run if you’ve configured it before.
  • Gunbot password — entered silently; never stored.
  • Gunthy wallet key — entered silently; used to derive the AES key and never stored.

Successful Output

✅ Authentication successful.
JWT Token: eyJhbGciOi...
Token written to token.txt   # only if --output was given
Troubleshooting: If you receive a connection error, verify that your Gunbot instance is running and reachable at the URL you provided. A 401 response typically means an incorrect password or wallet key. On any failure the CLI exits with code 1, so it can be safely used inside scripts.
Reference — Output, Config & Security

What Gets Saved (and What Doesn’t)

Only the Gunbot URL is persisted. Credentials are never written to disk.

  • URL persistence: Your last-used Gunbot URL is stored in config/gunbot.json so it’s reused automatically on the next run. This file should never be committed to version control.
  • Credentials are never saved: The password and wallet key are read interactively each time and discarded — they are not written anywhere on disk.
  • Moving config: Set the environment variable GBTOKEN_CONFIG_DIR to store config/ somewhere other than the default location.

How Encryption Works

Your password is encrypted with AES-128-CBC using a key derived from your wallet string (SHA-256, truncated to 16 bytes) and sent as ENC:<base64> — matching the Gunbot login scheme. Only the URL is persisted; credentials are never written to disk.

Keep it out of version control: Keep token.txt (and anything under config/) out of your repository — see the project’s .gitignore.
Reference — Files

Download & Verification

Verify the integrity of your download using the SHA-256 checksum below.

File: jwt-app/ (complete folder, incl. vendored node_modules/)
SHA-256: 354ead721e9448578d98bf173073305c9030c4091cab6c6d525f77f07d2c465b
MD5: 223683cae33c2694646a8a601c23b925
Download
This software is provided “as is” for testing and development purposes only. No liability is assumed by the developer or Broxynet for any resulting losses, damages, or misuse. Use of this CLI is entirely at your own risk — you are responsible for safeguarding your credentials and ensuring compliance with your exchange and Gunbot terms of service.