@happyvertical/smrt-cli
Developer CLI for SMRT framework with code generation, project scaffolding, and deployment tools.
v0.19.0CLIDeveloper Tools
Overview
smrt-cli automatically generates CLI commands for all SMRT objects decorated with @smrt({ cli: true }). Provides list, get, create, update, delete operations plus custom methods.
Installation
bash
npm install -g @happyvertical/smrt-cliQuick Start
bash
# List all available commands
smrt --help
# List objects
smrt events list --limit 10
smrt profiles list --where '{"status":"active"}'
# Get object by ID
smrt events get event-123
# Create object
smrt profiles create --name "John Doe" --email "john@example.com"
# Update object
smrt profiles update profile-456 --status inactive
# Delete object
smrt events delete event-789
# Custom methods (from @smrt decorator)
smrt issues incorporateFeedback issue-42 --applyUpdate true
smrt issues rollback issue-42Configuration
typescript
// Enable CLI in decorator
@smrt({
cli: true, // Enable all operations
// OR specify operations:
cli: {
include: ['list', 'get', 'create', 'incorporateFeedback', 'rollback']
}
})
class Issue extends SmrtObject {
// ...
}