@dipayan_/loti-cli
v1.0.2
Published
CLI manager for the LOTI infrastructure
Readme
🛠️ @dipayan_/loti-cli
The official Command Line Interface for LOTI (Local OTP Testing Infrastructure).
This CLI instantly scaffolds a local, Dockerized SMS queue (Node.js + Redis) and a React dashboard, allowing you to test physical SMS dispatch in your development environment for free.
📦 Installation
Install the package globally so you can run the loti command from any directory.
npm install -g @dipayan_/loti-cli
Prerequisite: You must have Docker Desktop installed and running on your machine.
🚀 Commands
loti init
Run this command in an empty directory or the root of your project to initialize the infrastructure.
loti init What it does:
- Scans your machine for a clean, random open port.
- Generates a
.envconfiguration file with rate limits and queue backoff settings. - Generates a
docker-compose.ymlfile linked to the LOTI cloud image. - Silently boots the containers in the background.
loti dashboard
Opens the real-time React dashboard in your default web browser.
loti dashboardWhat it does: The dashboard allows you to monitor the BullMQ job queue, track failed SMS deliveries, and display the QR code required to link the companion Android Worker app.
⚙️ Configuration
After running loti init, you can modify the generated .env file to customize your local queue limits:
HOST_PORT=59338
GLOBAL_RATE_LIMIT=3
RETRY_BACKOFF_INMS=5000Where ,
HOST_PORT
(PORT choosen by you, otherwise default)
GLOBAL_RATE_LIMIT
(retry limit after failing)
RETRY_BACKOFF_INMS
(retry time gap in ms)
Simply restart the containers (docker-compose restart) for the new limits to take effect.
