smartmail-cli
v1.0.2
Published
CLI tool for SmartMail SaaS platform
Maintainers
Readme
SmartMail CLI
A command-line interface tool for the SmartMail SaaS platform.
Installation
Install globally via npm:
npm install -g smartmail-cliPrerequisites
- Node.js installed on your system.
- Access to a SmartMail backend instance.
Commands
Login
Authenticate with your SmartMail account.
smartmail login- Prompts for your email and password.
- On successful login, stores the JWT token locally for subsequent requests.
Get API Key
Retrieve your API key for API access.
smartmail get apikey- Requires authentication (token must be stored from login).
- Displays the API key in the terminal.
Get Template
Fetch a template by its name.
smartmail get template <template-name>- Replace
<template-name>with the actual name of the template. - Requires authentication.
- Displays the template details (e.g., ID, name, HTML content).
Logout
Clear the stored authentication token.
smartmail logout- Removes the stored token, requiring re-login for future commands.
Examples
Login to your account:
smartmail login # Enter email: [email protected] # Enter password: ********Retrieve your API key:
smartmail get apikey # Output: Your API Key: sm_abc123...Fetch a template named "welcome":
smartmail get template welcome # Output: Template details...Logout:
smartmail logout # Output: Logged out successfully.
Development
For development and testing:
# Install dependencies
npm install
# Build the project
npm run build
# Run linting
npm run lint
# Format code
npm run format
# Run in development mode
npm run devSupport
For issues or feature requests, refer to the SmartMail documentation or contact support.
