{"_id":"@aomkoyo/discord-cli","_rev":"4-67383a3ec71b5ceb4d5bf1370f9cce1c","name":"@aomkoyo/discord-cli","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@aomkoyo/discord-cli","version":"0.1.0","_id":"@aomkoyo/discord-cli@0.1.0","maintainers":[{"name":"masurup1","email":"kittikorn@furimoe.com"}],"bin":{"discord-send":"dist/send.js"},"dist":{"shasum":"3e2c4fd87e99437312b0c441247aff10d7d78177","tarball":"https://registry.npmjs.org/@aomkoyo/discord-cli/-/discord-cli-0.1.0.tgz","fileCount":3,"integrity":"sha512-EDxLiBWsToM3ozQZhGyz6LE0rUnJDl2GMU3cx00d12qQWoM5YWvtGNGCg/3Rr7R9iAsaZU47vRK1tIINeqTtRQ==","signatures":[{"sig":"MEQCIGg2iqc4aWn7+17OePbNVqXoegLFpd+AGiZzk3V3nPbmAiAjbymcfPBtvOURzHm2R1QhVNEOO/Zyg4cAt4qUlKZL4w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10818},"type":"module","engines":{"node":">=22"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"masurup1","email":"kittikorn@furimoe.com"},"_npmVersion":"10.9.7","description":"CLI tool to send messages and files to Discord channels","directories":{},"_nodeVersion":"22.22.2","dependencies":{"discord.js":"^14.26.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.33.0","devDependencies":{"typescript":"^6.0.3","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/discord-cli_0.1.0_1778613634721_0.4826620684114109","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aomkoyo/discord-cli","version":"0.2.0","_id":"@aomkoyo/discord-cli@0.2.0","maintainers":[{"name":"masurup1","email":"kittikorn@furimoe.com"}],"bin":{"discord-send":"dist/send.js"},"dist":{"shasum":"1a0fa8b404fa43ce80c30fabe764516605d3d36a","tarball":"https://registry.npmjs.org/@aomkoyo/discord-cli/-/discord-cli-0.2.0.tgz","fileCount":3,"integrity":"sha512-dJWFsZV89eJVtZwVrpTAZXgITKtksKki+/0atWZuYEWG86ZDZBevelQB8W9qjypwV34Zf5qSwnjrQz32lmgYHQ==","signatures":[{"sig":"MEYCIQCoKt9L8whOjN342UHPeVI3GJXEoJ8iczhBzIgPNm2q/gIhAOt9bK+6SjtJlTR+aSig7LlBi+mWCLp3HVxxBrJsiF9/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11668},"type":"module","_from":"file:aomkoyo-discord-cli-0.2.0.tgz","engines":{"node":">=22"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"masurup1","email":"kittikorn@furimoe.com"},"_resolved":"/tmp/d5802c381f1b54307a759d9cb826fbd7/aomkoyo-discord-cli-0.2.0.tgz","_integrity":"sha512-dJWFsZV89eJVtZwVrpTAZXgITKtksKki+/0atWZuYEWG86ZDZBevelQB8W9qjypwV34Zf5qSwnjrQz32lmgYHQ==","_npmVersion":"10.9.7","description":"CLI tool to send messages and files to Discord channels","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/discord-cli_0.2.0_1778614112664_0.23904303872007016","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aomkoyo/discord-cli","version":"0.2.1","_id":"@aomkoyo/discord-cli@0.2.1","maintainers":[{"name":"masurup1","email":"kittikorn@furimoe.com"}],"bin":{"discord-send":"dist/send.js"},"dist":{"shasum":"e6afe569254e08113e55da3971693e9cb265a1dd","tarball":"https://registry.npmjs.org/@aomkoyo/discord-cli/-/discord-cli-0.2.1.tgz","fileCount":4,"integrity":"sha512-v62YqgIkiDzZ5WUgECDC6J0mwvW1eK36V+KCtD3iUDbgtaSG770c+AiEMlXlM+ttQAmUtD3O/Ov1juufNE26TA==","signatures":[{"sig":"MEUCIApsdfL2cn51dWZa+vbz/Ayx2Va+VI+9bGuEIo3jjp1GAiEApCRYMkiiYPhTseFhTSpGeTCm7A6NJ2khwt2FQzqC2ps=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16216},"type":"module","engines":{"node":">=22"},"gitHead":"a54a5b3971eb4c3b05fe99641db3f08068506694","scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"masurup1","email":"kittikorn@furimoe.com"},"_npmVersion":"10.9.7","description":"CLI tool to send messages and files to Discord channels","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.33.0","devDependencies":{"typescript":"^6.0.3","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/discord-cli_0.2.1_1778666806931_0.49049182059637664","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@aomkoyo/discord-cli","version":"0.2.2","description":"CLI tool to send messages and files to Discord channels","type":"module","bin":{"discord-send":"dist/send.js"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"repository":{"type":"git","url":"git+https://github.com/aomkoyo/claude-tmux-discord.git","directory":"cli"},"homepage":"https://github.com/aomkoyo/claude-tmux-discord/tree/main/cli#readme","bugs":{"url":"https://github.com/aomkoyo/claude-tmux-discord/issues"},"keywords":["discord","cli","discord-bot","send-message","discord-api","claude","ai-agent","tmux"],"license":"MIT","publishConfig":{"access":"public"},"engines":{"node":">=22"},"packageManager":"pnpm@10.33.0","devDependencies":{"@types/node":"^22.10.5","typescript":"^6.0.3"},"_id":"@aomkoyo/discord-cli@0.2.2","gitHead":"32d222d183d307a4449788c7b7a62cd7810b5bcd","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-XogkPIvxzOMja6jHi6ezWYbw4tWL8CvGUXxxIjssnACpV/xqOfqP/EuNBt8mIZgOi8/eU6A8Pr/CS+dFxJgMDg==","shasum":"326f192f0ca85eed37d01feea3cb770339eca42b","tarball":"https://registry.npmjs.org/@aomkoyo/discord-cli/-/discord-cli-0.2.2.tgz","fileCount":4,"unpackedSize":17368,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBhdi0imd6vPlEuAUCZx+VJArJ7yoH9hJOdKwjs3MtFTAiEAqLT/+6vd6i98kbQt/OqLVZGua/kaQj74nvfhSGLLHxw="}]},"_npmUser":{"name":"masurup1","email":"kittikorn@furimoe.com"},"directories":{},"maintainers":[{"name":"masurup1","email":"kittikorn@furimoe.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/discord-cli_0.2.2_1778666956257_0.2158778806426267"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-12T19:20:34.629Z","modified":"2026-05-13T10:09:16.529Z","0.1.0":"2026-05-12T19:20:34.867Z","0.2.0":"2026-05-12T19:28:32.817Z","0.2.1":"2026-05-13T10:06:47.081Z","0.2.2":"2026-05-13T10:09:16.412Z"},"description":"CLI tool to send messages and files to Discord channels","maintainers":[{"name":"masurup1","email":"kittikorn@furimoe.com"}],"readme":"# @aomkoyo/discord-cli\n\n[![npm](https://img.shields.io/npm/v/@aomkoyo/discord-cli)](https://www.npmjs.com/package/@aomkoyo/discord-cli)\n[![GitHub](https://img.shields.io/github/license/aomkoyo/claude-tmux-discord)](https://github.com/aomkoyo/claude-tmux-discord/blob/main/LICENSE)\n\nZero-dependency CLI for sending messages and files to Discord channels. Uses Node.js built-in `fetch` against the Discord REST API v10 directly.\n\nPart of [**claude-tmux-discord**](https://github.com/aomkoyo/claude-tmux-discord) — AI coding agents running in tmux use this to send replies back to Discord.\n\n**[GitHub](https://github.com/aomkoyo/claude-tmux-discord/tree/main/cli)** | **[Issues](https://github.com/aomkoyo/claude-tmux-discord/issues)** | **[Wiki](https://github.com/aomkoyo/claude-tmux-discord/wiki/Discord-Send-CLI)**\n\n## Install\n\n```bash\nnpm install -g @aomkoyo/discord-cli\n# or\npnpm add -g @aomkoyo/discord-cli\n```\n\n## Usage\n\n```bash\n# Send a text message\ndiscord-send \"Hello from the CLI!\"\n\n# Send to a specific channel\ndiscord-send \"Hello\" -c 1234567890123456789\n\n# Reply to a message\ndiscord-send \"Got it!\" -r 1234567890123456789\n\n# Attach a local file\ndiscord-send \"Here's the file\" -f ./report.pdf\n\n# Attach multiple files\ndiscord-send \"Screenshots\" -f ./before.png -f ./after.png\n\n# Attach from URL\ndiscord-send \"Check this out\" -f https://example.com/image.png\n\n# Send only files (no text)\ndiscord-send -f ./output.zip\n\n# Use a specific bot token\ndiscord-send \"Hello\" -t \"Bot_TOKEN_HERE\" -c 1234567890123456789\n```\n\n## Options\n\n```\ndiscord-send <message> [options]\n\nOptions:\n  -c, --channel <id>      Target channel ID\n  -r, --reply <id>        Message ID to reply to\n  -t, --token <token>     Discord bot token\n  -f, --file <path|url>   Attach a file (repeat for multiple)\n  -h, --help              Show help\n```\n\n## Authentication\n\nThe token is resolved in this order:\n\n1. `-t` flag (highest priority)\n2. `DISCORD_TOKEN` environment variable\n3. `DISCORD_TOKEN` in `.env` file (searches cwd, then parent directories)\n\n## Channel ID\n\nThe target channel is resolved in this order:\n\n1. `-c` flag (highest priority)\n2. `DEFAULT_CHANNEL_ID` environment variable\n3. `DEFAULT_CHANNEL_ID` in `.env` file\n\n## Environment Variables\n\n```env\nDISCORD_TOKEN=your-bot-token\nDEFAULT_CHANNEL_ID=your-default-channel-id\n```\n\nOr create a `.env` file in your project root with the above variables.\n\n## Features\n\n- Zero runtime dependencies — uses Node.js 22+ built-in `fetch`\n- Send text messages with optional file attachments\n- Attach local files or remote URLs (fetched and re-uploaded)\n- Reply to specific messages\n- Multiple file attachments in a single message\n- Automatic `.env` file discovery (cwd and parent directories)\n- Suppresses @mentions by default (`allowed_mentions: { parse: [] }`)\n\n## Use with AI Agents\n\nThis CLI is designed to be called by AI coding agents (Claude Code, Codex, Gemini, etc.) running inside tmux sessions. The agent's system prompt instructs it to use `discord-send` for all communication back to the Discord user.\n\n```bash\n# Agent sends a response\ndiscord-send \"I've fixed the bug in auth.ts. The issue was...\"\n\n# Agent sends a file it created\ndiscord-send \"Here's the generated report\" -f ./output/report.pdf\n\n# Agent replies to the user's message\ndiscord-send \"Working on it...\" -r 1234567890123456789\n```\n\n## Requirements\n\n- **Node.js** >= 22\n\n## Contributing\n\nContributions are welcome! Please open an issue or PR on [GitHub](https://github.com/aomkoyo/claude-tmux-discord).\n\n## License\n\nMIT - see [LICENSE](https://github.com/aomkoyo/claude-tmux-discord/blob/main/LICENSE)\n","readmeFilename":"README.md","homepage":"https://github.com/aomkoyo/claude-tmux-discord/tree/main/cli#readme","keywords":["discord","cli","discord-bot","send-message","discord-api","claude","ai-agent","tmux"],"repository":{"type":"git","url":"git+https://github.com/aomkoyo/claude-tmux-discord.git","directory":"cli"},"bugs":{"url":"https://github.com/aomkoyo/claude-tmux-discord/issues"},"license":"MIT"}