JSPM

@miketromba/loops-cli

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q41027F
  • License MIT

CLI for the Loops email marketing API — manage contacts, send events, transactional emails, and more from the command line. AI-agent optimized output.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@miketromba/loops-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    loops-cli banner

    npm version license node version

    CLI for the Loops email marketing API — manage contacts, send events, transactional emails, and more from the command line.

    Optimized for both developers and AI agents with multiple output formats.

    Unofficial — this project is not affiliated with or endorsed by Loops. It is a community-built tool powered by the official TypeScript SDK.

    Install

    npm install -g @miketromba/loops-cli

    Or use without installing:

    npx @miketromba/loops-cli --help

    Quick start

    # Authenticate
    loops auth login --api-key <your-api-key>
    
    # Find a contact
    loops contacts find --email user@example.com
    
    # Create a contact
    loops contacts create --email user@example.com --properties '{"firstName":"Jane"}'
    
    # Send an event
    loops events send --email user@example.com --event-name signup
    
    # List mailing lists
    loops mailing-lists list
    
    # Send a transactional email
    loops transactional send --transactional-id txn_123 --email user@example.com --data-variables '{"name":"Jane"}'

    Authentication

    Get your API key at Settings > API.

    # Store locally
    loops auth login --api-key <your-api-key>
    
    # Or use environment variable
    export LOOPS_API_KEY=your_api_key_here

    Commands

    Command Description
    contacts Create, update, find, delete contacts
    contact-properties List and create custom contact properties
    mailing-lists List mailing lists
    events Send events to trigger email workflows
    transactional List and send transactional emails
    api-key Test API key validity
    auth Login, logout, check auth status
    config CLI configuration management

    Output formats

    Auto-detects TTY for human-readable output, pipes for agent-optimized output.

    loops mailing-lists list              # table (TTY) or compact (piped)
    loops mailing-lists list -o json      # JSON
    loops mailing-lists list -o csv       # CSV
    loops mailing-lists list -o id        # IDs only
    loops mailing-lists list -o count     # count only

    AI agent usage

    The CLI is optimized for AI agents with compact output format:

    mailingLists 1-2/2 page=1
      [1] id=list_123 name=Newsletter isPublic=true
      [2] id=list_456 name=Updates isPublic=false

    Set LOOPS_API_KEY and pipe commands for minimal-token responses.

    Development

    bun install
    bun run dev -- --help
    bun test
    bun run build

    License

    MIT