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/.
Before running the generator, confirm that you have each of the following in place.
http://127.0.0.1:5000 for a local setup or the address of your remote server.jwt-app FolderThe tool ships as a self-contained folder. No build step and no package installation are required.
C:\gunbot (Windows) or ~/gunbot (Linux).jwt-app folder from the Files section below and place it inside that directory.node_modules/ (axios, readline-sync) are already included, so you skip npm install.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
node_modules/. If you ever need to restore them, run npm install from the folder root.Follow the platform-specific steps below. The CLI will prompt you for your credentials and return a signed token on success.
cd C:\gunbot\jwt-app
node bin/gbtoken-gen.js
cd ~/gunbot/jwt-app
node bin/gbtoken-gen.js
Pass --output to write the token to a file (the default suggestion is token.txt):
node bin/gbtoken-gen.js --output token.txt
When prompted, enter your details in order. Password and wallet key inputs are hidden (not echoed).
http://127.0.0.1:5000. Reused automatically on the next run if you’ve configured it before.✅ Authentication successful.
JWT Token: eyJhbGciOi...
Token written to token.txt # only if --output was given
1, so it can be safely used inside scripts.Only the Gunbot URL is persisted. Credentials are never written to disk.
config/gunbot.json so it’s reused automatically on the next run. This file should never be committed to version control.GBTOKEN_CONFIG_DIR to store config/ somewhere other than the default location.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.
token.txt (and anything under config/) out of your repository — see the project’s .gitignore.Verify the integrity of your download using the SHA-256 checksum below.