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

@todoforai/chatwoot-api

v1.0.0

Published

JSON-first CLI for the Chatwoot Application API (conversations, messages, contacts, inboxes, teams, reports) — cloud or self-hosted

Readme

Chatwoot CLI

Independent CLI over the official Chatwoot Application API. It is not an official Chatwoot product. It works with Chatwoot Cloud and with self-hosted instances. The commands are generated from Chatwoot's official swagger (124 endpoints), and field names are unchanged.

Run locally

cd api-apps/chatwoot-api
npm install --workspaces=false
bun run build
node dist/index.js --help

Authentication

You need a user access token from Profile settings → Access Token. The CLI sends it as the api_access_token header.

<secret-manager-command> | chatwoot-api auth --token-stdin                                   # Chatwoot Cloud
<secret-manager-command> | chatwoot-api auth --token-stdin --base-url https://chat.example.com  # self-hosted

You can also use environment variables: CHATWOOT_API_ACCESS_TOKEN, CHATWOOT_BASE_URL (default https://app.chatwoot.com) and CHATWOOT_ACCOUNT_ID. If your user belongs to exactly one account, the CLI reads the account id from your profile. Credentials are saved to ~/.config/chatwoot-api/credentials.json (mode 0600).

Plan caveats:

  • On Chatwoot Cloud, user API access tokens are a paid-plan feature. The free plan shows "API access tokens are available on paid plans" and returns an empty token.
  • Self-hosted Chatwoot always provides the token.
  • Agent-bot tokens only reach the conversation and message endpoints. Contacts, inboxes and agents return 401 for bots.

Coverage

These are the groups, generated from swagger/tag_groups/application_swagger.json by scripts/generate.py:

account, agents, agent-bots, audit-logs, automation-rules, campaigns, canned-responses, contacts, conversations, custom-attributes, custom-filters, inboxes, integrations, labels, messages, portals, profile, reports, teams, webhooks.

Path arguments follow the URL order, and {account_id} is filled in automatically.

The Platform API (super-admin) and the public Client API are not wrapped. Call them with api.

Examples

chatwoot-api conversations list --status open --assignee_type all --all
chatwoot-api messages create 42 --data '{"content":"Thanks, fixed!","message_type":"outgoing"}' --yes
chatwoot-api messages create 42 --data '{"content":"internal note","private":true}' --yes
chatwoot-api conversations toggle-status 42 --data '{"status":"resolved"}' --yes
chatwoot-api conversations assign 42 --data '{"assignee_id":3}' --yes
chatwoot-api contacts search --q [email protected]
chatwoot-api contacts filter --data '{"payload":[{"attribute_key":"email","filter_operator":"contains","values":["@acme.com"]}]}' --all
chatwoot-api api GET /api/v1/accounts/{account_id}/inboxes

Development

python3 scripts/generate.py   # refresh src/endpoints.json from the official swagger
bun test
bun run test:node