Skip to main content

CLI Commands

The backend includes several custom Ace commands to help with administration, debugging, and testing. You can run these commands using node ace <command_name> (or npm run ace <command_name>).

User Management

make:user

Creates a new user in the database. Useful for bootstrapping the first admin.

node ace make:user "John Doe" "john@example.com" "securePassword123"

link:role

Assigns an RBAC Role to a User.

node ace link:role <userId> <roleId>

Note: You need to know the IDs (integers) of the user and role.

Debugging & Testing

test:notification

Interactive wizard to send a real notification to a specific user. Useful for testing WebSocket delivery, SMS, or Push Notifications without waiting for a real camera event.

node ace test:notification
# Follow the prompts:
# 1. Enter Email
# 2. Select Type (Success, Warning, Error)
# 3. Select Priority (Low, High)
# 4. Enter Title & Message

try:sms

Sends a test SMS using the configured Twilio credentials to a target phone number.

node ace try:sms <phoneNumber>

Monitoring

notification:stats

Displays statistics about Sent vs Failed notifications directly in the terminal.

node ace notification:stats