npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@manycontacts/cli

v1.0.11

Published

ManyContacts CLI - Programmatic access to all ManyContacts operations

Downloads

802

Readme

ManyContacts CLI

Terminal CLI for ManyContacts that allows AI agents (Claude Code, Cowork, etc.) and power users to perform all ManyContacts operations programmatically.

Installation

npm install -g @manycontacts/cli

Or run directly:

npx @manycontacts/cli

Setup

Login (generates and stores a CLI token automatically)

mc auth login --email [email protected] --password mypassword

Register a new account

mc auth register --email [email protected] --name "My Company"

Environment variables

  • MC_CLI_TOKEN - CLI authentication token (alternative to login)
  • MC_API_URL - API base URL (default: https://api.manycontacts.com)

Usage

All responses are JSON by default (ideal for AI agent consumption):

{ "ok": true, "data": {...}, "pagination": { "page": 1, "limit": 50, "has_more": true } }

Quick account context

mc context

Returns: organization, connected channels, counters (contacts, users, tags, etc.), active features and modules.

Contact management

mc contacts list --open true --limit 20
mc contacts get +34600000000
mc contacts create --phone "+34600000000" --name "John Smith"
mc contacts update +34600000000 --name "John A. Smith"
mc contacts assign +34600000000 --user <user-id>
mc contacts unassign +34600000000
mc contacts close +34600000000
mc contacts open +34600000000
mc contacts tag-add +34600000000 --tag <tag-id>
mc contacts tag-remove +34600000000 --tag <tag-id>
mc contacts team-add +34600000000 --team <team-id>
mc contacts set-stage +34600000000 --funnel <funnel-id> --stage <stage-id>
mc contacts set-notes +34600000000 --notes "Contact notes"
mc contacts bulk --action close --phones "+34600000000,+34600000001"
mc contacts bulk --action add_tag --phones "+34600000000" --value <tag-id>
mc contacts delete +34600000000

Contact list filters

| Filter | Example | Description | |---|---|---| | --open | --open true | Filter by open (true) or closed (false) status | | --assigned-to | --assigned-to <user-id> | Filter by assigned user | | --tags | --tags id1,id2 | Contacts that have all specified tags | | --team | --team <team-id> | Contacts assigned to a team | | --stages | --stages id1,id2 | Contacts in specific funnel stages | | --date-from | --date-from 2026-01-01 | Updated after this date (max 90 days range) | | --date-to | --date-to 2026-04-14 | Updated before this date (max 90 days range) | | --unread | --unread | Only contacts with unread messages | | --blacklist | --blacklist | Only blacklisted contacts | | --scheduled | --scheduled | Only contacts with pending scheduled messages |

Filters can be combined:

mc contacts list --tags <vip-tag-id> --open true --limit 100
mc contacts list --team <support-team-id> --unread --date-from 2026-01-15 --date-to 2026-04-14

Messaging

mc messages list +34600000000 --limit 20
mc messages get +34600000000 <message-id>
mc messages send text +34600000000 --body "Hello, how can we help you?"
mc messages send note +34600000000 --body "Internal team note"
mc messages send media +34600000000 --file ./document.pdf --caption "Attachment"
mc messages send template +34600000000 --template <template-id> --vars '["John"]'
mc messages read +34600000000 <message-id>

Templates

mc templates list
mc templates list --status approved
mc templates get <template-id>
mc templates sync

The list command shows all visible templates with their name, code, status, components and media flags. Use --status to filter by approved, pending or rejected. The sync command fetches the latest templates from the WhatsApp (Meta Cloud API) account.

Tags

mc tags list
mc tags create --name "VIP" --color "#ff0000"
mc tags update <id> --name "Premium"
mc tags delete <id>

Teams

mc teams list
mc teams create --name "Support"
mc teams add-member <team-id> --user <user-id>
mc teams remove-member <team-id> --user <user-id>
mc teams delete <id>

Funnels / Pipelines

mc funnels list
mc funnels create --name "Sales"
mc funnels add-stage <funnel-id> --name "Contacted" --order 1
mc funnels update-stage <funnel-id> <stage-id> --name "Negotiating"
mc funnels delete-stage <funnel-id> <stage-id> --move-to <other-stage-id>
mc funnels contacts <funnel-id>
mc funnels delete <id>

Custom fields

mc custom-fields list
mc custom-fields create --name "Company" --type text
mc custom-fields update <id> --name "Organization"
mc custom-fields delete <id>

Quick replies

mc short-responses list
mc short-responses create --name "greeting" --text "Hello! How can I help you?"
mc short-responses update <id> --text "Updated text"
mc short-responses delete <id>

AI agents

mc ai-agents list
mc ai-agents create --name "Assistant" --instructions "You are a sales assistant..."
mc ai-agents get <id>
mc ai-agents update <id> --active true --instructions "New instructions..."
mc ai-agents feedback <id>
mc ai-agents delete <id>

Channels

mc channels list
mc channels connect whatsapp-api
mc channels connect whatsapp-coexistence
mc channels connect whatsapp-qr
mc channels whatsapp-profile
mc channels update-whatsapp-profile --about "Our company" --description "Description"
mc channels delete <id>

The connect command returns a URL that must be opened in a browser. Each channel type follows a different flow:

  • whatsapp-qr: Shows a QR code to scan with WhatsApp on your phone.
  • whatsapp-api: Opens a Meta embedded signup popup to authorize the WhatsApp Business API.
  • whatsapp-coexistence: Same as whatsapp-api but for the Coexistence mode.

Widget

mc widget get
mc widget get-code
mc widget update --name "My Widget"

Organization

mc org get
mc org update --timezone "Europe/Madrid" --auto-reply-open true
mc org schedule get
mc org schedule update --data '[{"day":1,"start":"09:00","end":"18:00","active":true}]'
mc org apikey
mc org checklist
mc org empty --confirm

Users and permissions

mc users list
mc users get <id>
mc users update <id> --name "New name"
mc users invite --email "[email protected]"
mc users invitations
mc users revoke-invitation <id>
mc users permissions-schema
mc users delete <id>

Campaigns

mc campaigns list
mc campaigns create --name "Black Friday" --template <template-id> --phones "+34600000000,+34600000001,+34600000002" --date "2026-11-27T10:00:00"
mc campaigns create --name "Promo" --template <id> --phones "+34600000000" --date "2026-12-01T09:00:00" --variables '["John","20%"]'
mc campaigns delete <id>

Billing

mc billing subscriptions
mc billing checkout

Email

mc email status
mc email folders
mc email list
mc email get <id>
mc email send --to "[email protected]" --subject "Subject" --body "<p>Content</p>"
mc email disconnect

CLI tokens

mc auth whoami
mc auth token-list
mc auth token-create --name "CI/CD Pipeline" --scopes "contacts:read,messages:read"
mc auth token-revoke <token-id>
mc auth token-rotate <token-id>
mc auth logout

Security

  • CLI tokens are stored hashed (SHA-256) in the database
  • Granular scopes: account:read, account:write, contacts:read, contacts:write, messages:read, messages:write, campaigns:read, campaigns:write, settings:read, settings:write, ai:read, ai:write, email:read, email:write, *
  • 7-day free trial: after trial expiration, a paid subscription is required to continue using the CLI
  • Rate limit: 60 requests/minute (paid accounts), 10 requests/minute (free accounts within trial)
  • Optional IP allowlist per token
  • Optional token expiration
  • Audit log for all operations
  • All operations are scoped to the token's organization

For AI agents

The CLI is designed to be used by AI agents:

  • JSON output: all responses are parseable JSON
  • mc context: quick summary of the account state
  • mc --help: documentation for all commands
  • Consistent error codes: { "ok": false, "error": "message" }
  • --quiet: suppresses spinners and colors for clean parsing