lomi.cli
v2.0.4
Published
Command line interface for lomi's payment infrastructure
Maintainers
Readme
lomi. CLI
Command line interface for interacting with the lomi. payment platform.
Installation
npm install -g lomi.cli
# or
pnpm add -g lomi.cliCommands
lomi. login
Authenticates the CLI with your lomi. account via a browser flow.
Usage:
lomi. loginProcess:
- Initiates device authorization flow.
- Prompts you to copy a
user_code. - Opens a browser to a
verification_urifor you to paste the code and authorize. - Polls for completion and saves the received
cliTokenglobally.
This token authenticates subsequent lomi. commands.
lomi. init
Initializes a new project in the current directory.
Usage:
lomi. initProcess:
- Prompts for your API key, target environment (Production/Sandbox), and language (TS/JS).
- Creates:
lib/lomi./client.(ts|js): SDK client setup.examples/create-checkout-session.(ts|js): Checkout Session creation example.examples/webhook-handler.(ts|js): Basic webhook handler example..env: StoresLOMI_API_KEYandLOMI_WEBHOOK_SECRETplaceholder.
- Runs
pnpm initif nopackage.jsonexists. - Installs
@lomi./sdkanddotenvdependencies (pnpm add).
Note: Add your actual LOMI_WEBHOOK_SECRET to the .env file.
lomi. status
Checks login status and API connectivity.
Usage:
lomi. statusProcess:
- Verifies login status (requires prior
lomi. login). - Checks if the globally stored
cliTokenexists. - Tests connection to the lomi. API
/healthendpoint. - Reports success or failure for both token and connection checks.
