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

cli-discord-all

v0.1.1

Published

CLI wrapper for Discord Bot API workflows

Readme

cli-discord-all

A Node.js CLI for exploring and calling Discord Bot API endpoints from the terminal.

Unlike many Discord CLIs that focus on bot scaffolding, project workflows, or a narrow feature set, cli-discord-all is built around a broad endpoint reference so you can discover, inspect, and call a wide range of Discord Bot API routes from one CLI.

discord-cli is designed for a simple workflow:

  1. Find an endpoint with list
  2. Inspect it with show
  3. Execute it with call

Install

npm install -g cli-discord-all

Requires Node.js 18 or later.

Quick Start

discord-cli --help
discord-cli list message
discord-cli show message-get-channels-channel-id-messages

Before making authenticated API calls, set your bot token:

export DISCORD_BOT_TOKEN=your_bot_token

Example:

discord-cli call message-get-channels-channel-id-messages \
  --param channel.id=123456789012345678 \
  --query limit=10

Send a message:

discord-cli call message-post-channels-channel-id-messages \
  --param channel.id=123456789012345678 \
  --body content="hello from cli-discord-all"

Commands

discord-cli list [query]

List endpoints, optionally filtered by a search term.

discord-cli list
discord-cli list thread
discord-cli list permissions

discord-cli show <endpoint-id>

Print metadata for a specific endpoint as JSON.

discord-cli show message-get-channels-channel-id-messages

The output typically includes:

  • endpoint id
  • category
  • method
  • path
  • description
  • permissions
  • triggers
  • matching discord.js method

discord-cli call <endpoint-id> [options]

Execute a Discord API endpoint.

Supported options:

  • --param key=value: replace path parameters
  • --query key=value: add query string values
  • --body key=value: add JSON body fields
  • --body-json '<json>': provide the full request body as JSON
  • --token <token>: override DISCORD_BOT_TOKEN
  • --reason <text>: set the X-Audit-Log-Reason header
  • --raw: print the response body without formatting

Examples:

discord-cli call message-get-channels-channel-id-messages \
  --param channel.id=123456789012345678 \
  --query limit=5
discord-cli call message-post-channels-channel-id-messages \
  --param channel.id=123456789012345678 \
  --body content="hello"
discord-cli call message-post-channels-channel-id-messages \
  --param channel.id=123456789012345678 \
  --body-json '{"content":"hello","tts":false}'

Argument Rules

  • true, false, and null are coerced to boolean/null values
  • integer and float strings are coerced to numbers
  • values shaped like {...} or [...] are parsed as JSON when possible
  • nested fields use dotted notation

Example:

discord-cli call message-post-channels-channel-id-messages \
  --param channel.id=123456789012345678 \
  --body-json '{"embeds":[{"title":"hello"}]}'

For complex payloads, --body-json is recommended.

Output

  • list: plain text
  • show: pretty JSON
  • call: pretty JSON
  • call --raw: raw response body

Example call output:

{
  "ok": true,
  "status": 200,
  "statusText": "OK",
  "endpoint": {
    "id": "message-get-channels-channel-id-messages",
    "method": "GET",
    "path": "/channels/{channel.id}/messages"
  },
  "request": {
    "url": "https://discord.com/api/v10/channels/123/messages?limit=10"
  },
  "response": []
}

Agent-Friendly Metadata

This package includes discord_cli_schema.json, a machine-readable description of the CLI structure.

It is intended for agents and tooling that want to understand:

  • available commands
  • positional arguments and options
  • output formats
  • authentication rules
  • argument parsing behavior

Package Contents

The published package includes:

  • bin/discord-cli.js
  • discord_bot_api_reference.json
  • discord_cli_schema.json

discord_bot_api_reference.json is the data source used for endpoint discovery and execution. discord_cli_schema.json describes the CLI itself.

Development

Run locally:

node ./bin/discord-cli.js --help
node ./bin/discord-cli.js list message

If you use nvm:

source ~/.nvm/nvm.sh
node ./bin/discord-cli.js --help

Check the package contents:

npm pack --dry-run

Notes

  • Discord API rate limits still apply
  • bot tokens should be stored securely
  • use --reason for operations that should include an audit log reason

License

MIT