Root User Setup
TradeJS CLI defaults to --user root, so creating a valid root account is the fastest way to start.
1. Create or Update Root User
npx @tradejs/cli user-add -u root -p 'StrongPassword123!'
What this does:
- hashes password with
bcrypt - writes user record to Redis key
users:index:root - creates a persistent token automatically for
rootif it is missing - keeps account-level settings in the same Redis user record
2. Check User in Redis
redis-cli JSON.GET users:index:root
You should see at least:
userNamepasswordHashupdatedAttoken(forroot)
After you save account settings in the UI, the same record can also contain:
BYBIT_API_KEYBYBIT_API_SECRETOPENAI_API_KEYOPENAI_API_ENDPOINTTG_BOT_TOKENTG_CHAT_ID
3. Sign In to the App
- Open your TradeJS sign-in page (or your API client).
- Log in with
rootand your password. - Open the account settings drawer from the gear icon in the left sidebar.
- Configure the settings you need for this user:
- Bybit API key/secret
- password rotation
- persistent token for passwordless auth
- OpenAI API key/endpoint
- Telegram bot token/chat id
- For API-only flows, use the persistent token from Redis or from the account settings drawer.
4. Rotate Password or Token
Set new password:
npx @tradejs/cli user-add -u root -p 'NewStrongPassword456!'
Set explicit token:
npx @tradejs/cli user-add -u root -p 'NewStrongPassword456!' -t 'my-static-token'
Notes:
- Password and token can also be rotated from the account settings drawer after sign-in.
- Secret values are stored in Redis per user and shown masked in the UI.