@ibbybuilds/discli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +250 -0
- package/dist/cli.js +867 -0
- package/dist/cli.js.map +1 -0
- package/package.json +46 -0
- package/skills/SKILL.md +76 -0
package/README.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/banner.png" alt="discli - Discord Server Management CLI" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Discord server management CLI for AI agents and humans.</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<br>
|
|
10
|
+
|
|
11
|
+
Create channels, manage roles, set permissions, and control your Discord servers from the terminal.
|
|
12
|
+
|
|
13
|
+
No bot server needed. No dashboard clicking. Just commands.
|
|
14
|
+
|
|
15
|
+
> Your AI agent (Claude Code, Cursor, Windsurf, Codex) can use discli to manage your Discord server. Create channels, assign roles, rename everything, in seconds.
|
|
16
|
+
|
|
17
|
+
<br>
|
|
18
|
+
|
|
19
|
+
## Why discli?
|
|
20
|
+
|
|
21
|
+
Setting up a Discord server manually is slow. Using bots for management is limited. MCP tools eat your token budget.
|
|
22
|
+
|
|
23
|
+
discli gives you direct control over Discord through simple CLI commands:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
discli channel create "💬・general" --category "Community"
|
|
27
|
+
discli role create "Moderator" --color "#ff5733"
|
|
28
|
+
discli perm lock "📜・rules"
|
|
29
|
+
discli channel rename "old-name" "🎯・new-name"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
One command = one API call. No bot server. No token overhead.
|
|
33
|
+
|
|
34
|
+
<br>
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install
|
|
40
|
+
npm install -g discli
|
|
41
|
+
|
|
42
|
+
# Setup (paste your bot token)
|
|
43
|
+
discli init --token YOUR_BOT_TOKEN
|
|
44
|
+
|
|
45
|
+
# Start managing
|
|
46
|
+
discli channel list
|
|
47
|
+
discli server info
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
<details>
|
|
51
|
+
<summary><strong>How to get a bot token</strong></summary>
|
|
52
|
+
|
|
53
|
+
<br>
|
|
54
|
+
|
|
55
|
+
1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
|
|
56
|
+
2. Create a new application
|
|
57
|
+
3. Go to **Bot** > **Reset Token** > copy it
|
|
58
|
+
4. Go to **Installation** > set **Guild Install** scopes: `bot`, `applications.commands` with **Administrator** permission
|
|
59
|
+
5. Use the install link to add the bot to your server
|
|
60
|
+
6. Run `discli init --token YOUR_TOKEN`
|
|
61
|
+
|
|
62
|
+
</details>
|
|
63
|
+
|
|
64
|
+
<br>
|
|
65
|
+
|
|
66
|
+
## Commands
|
|
67
|
+
|
|
68
|
+
### Server
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
discli server list # List servers the bot is in
|
|
72
|
+
discli server select <id> # Set default server
|
|
73
|
+
discli server info # Server overview
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Channels
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
discli channel list # List all channels by category
|
|
80
|
+
discli channel create <name> # Create text channel
|
|
81
|
+
discli channel create <name> --type voice # Create voice channel
|
|
82
|
+
discli channel create <name> --category Dev # Create under a category
|
|
83
|
+
discli channel create "Dev" --type category # Create a category
|
|
84
|
+
discli channel rename <channel> <new-name> # Rename channel
|
|
85
|
+
discli channel topic <channel> "topic text" # Set channel topic
|
|
86
|
+
discli channel move <channel> --category X # Move to a category
|
|
87
|
+
discli channel delete <channel> --confirm # Delete (requires --confirm)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Roles
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
discli role list # List all roles
|
|
94
|
+
discli role create <name> # Create role
|
|
95
|
+
discli role create <name> --color "#e74c3c" # Create with color
|
|
96
|
+
discli role assign <role> <user> # Give role to member
|
|
97
|
+
discli role remove <role> <user> # Remove role from member
|
|
98
|
+
discli role delete <name> --confirm # Delete (requires --confirm)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Members
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
discli member list # List members
|
|
105
|
+
discli member info <user> # Member details
|
|
106
|
+
discli member nick <user> <nick> # Change nickname
|
|
107
|
+
discli member kick <user> --confirm --reason "spam" # Kick
|
|
108
|
+
discli member ban <user> --confirm # Ban
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Permissions
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
discli perm view <channel> # View channel permissions
|
|
115
|
+
discli perm lock <channel> # Make read-only
|
|
116
|
+
discli perm unlock <channel> # Remove read-only
|
|
117
|
+
discli perm set <channel> <role> --deny send_messages # Fine-grained control
|
|
118
|
+
discli perm list # List permission names
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
<br>
|
|
122
|
+
|
|
123
|
+
## For AI Agents
|
|
124
|
+
|
|
125
|
+
discli is designed for AI coding agents like Claude Code, Cursor, Codex, and others.
|
|
126
|
+
|
|
127
|
+
### How agents use it
|
|
128
|
+
|
|
129
|
+
1. Install the skill: copy `skills/SKILL.md` to your agent's skill directory
|
|
130
|
+
2. Agent reads the skill and learns all available commands
|
|
131
|
+
3. Agent runs commands and manages your server through the terminal
|
|
132
|
+
|
|
133
|
+
### Agent-friendly features
|
|
134
|
+
|
|
135
|
+
| Feature | Details |
|
|
136
|
+
|---------|---------|
|
|
137
|
+
| YAML output by default | 5x fewer tokens than JSON when piped |
|
|
138
|
+
| `-n` flag | Limit results to save tokens |
|
|
139
|
+
| `--dry-run` | Preview changes before applying |
|
|
140
|
+
| `--confirm` required | Destructive commands never auto-execute |
|
|
141
|
+
| Structured exit codes | `0` success, `1` error, `2` usage, `3` not found, `4` forbidden |
|
|
142
|
+
| SCHEMA.md | Documents output shapes for predictable parsing |
|
|
143
|
+
| No MCP overhead | Zero token cost at session start |
|
|
144
|
+
|
|
145
|
+
### Setup for Claude Code / Cursor
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Install discli globally
|
|
149
|
+
npm install -g discli
|
|
150
|
+
|
|
151
|
+
# Copy the skill file
|
|
152
|
+
cp node_modules/discli/skills/SKILL.md ~/.claude/skills/discli/SKILL.md
|
|
153
|
+
|
|
154
|
+
# Done. Your agent can now use discli.
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Example: agent sets up an entire server
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
You: "Set up my Discord like a dev community with channels for
|
|
161
|
+
general chat, code help, AI tools, and read-only announcements"
|
|
162
|
+
|
|
163
|
+
Agent runs:
|
|
164
|
+
discli channel create "Community" --type category
|
|
165
|
+
discli channel create "💬・general" --category Community
|
|
166
|
+
discli channel create "💻・code-help" --category Community
|
|
167
|
+
discli channel create "🤖・ai-tools" --category Community
|
|
168
|
+
discli channel create "📢・announcements" --category Info
|
|
169
|
+
discli perm lock "📢・announcements"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
<br>
|
|
173
|
+
|
|
174
|
+
## Global Flags
|
|
175
|
+
|
|
176
|
+
| Flag | Description |
|
|
177
|
+
|------|-------------|
|
|
178
|
+
| `--format <yaml\|json\|table\|auto>` | Output format. Default: auto (YAML when piped, table in terminal) |
|
|
179
|
+
| `--server <id>` | Target a specific server instead of default |
|
|
180
|
+
| `-n <count>` | Limit results on list commands |
|
|
181
|
+
| `--dry-run` | Preview changes without applying |
|
|
182
|
+
| `--confirm` | Required for destructive actions (delete, kick, ban) |
|
|
183
|
+
|
|
184
|
+
<br>
|
|
185
|
+
|
|
186
|
+
## How It Works
|
|
187
|
+
|
|
188
|
+
discli is not a bot. It's a thin CLI wrapper around the [Discord REST API](https://discord.com/developers/docs/reference).
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
discli channel create "test"
|
|
192
|
+
↓
|
|
193
|
+
POST https://discord.com/api/v10/guilds/{id}/channels
|
|
194
|
+
Authorization: Bot {your_token}
|
|
195
|
+
Body: {"name": "test", "type": 0}
|
|
196
|
+
↓
|
|
197
|
+
Channel created. Done.
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
No WebSocket connection. No bot process. No server hosting. Your bot can be offline and commands still work.
|
|
201
|
+
|
|
202
|
+
<br>
|
|
203
|
+
|
|
204
|
+
## Bring Your Own Bot
|
|
205
|
+
|
|
206
|
+
discli uses your bot token. You create the bot, you control the permissions, you own the data. Nothing is sent to us.
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
~/.discli/
|
|
210
|
+
├── config.json # default server
|
|
211
|
+
└── .env # your bot token (never leaves your machine)
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
<br>
|
|
215
|
+
|
|
216
|
+
## Comparison
|
|
217
|
+
|
|
218
|
+
| | discli | Discord MCP | discord-cli | Manual UI |
|
|
219
|
+
|---|---|---|---|---|
|
|
220
|
+
| **Purpose** | Server management | Server management | Read-only (fetch/search) | Everything |
|
|
221
|
+
| **Used by** | Agents + humans | Agents only | Agents + humans | Humans only |
|
|
222
|
+
| **Token cost** | Zero upfront | 20-40k on load | Zero upfront | N/A |
|
|
223
|
+
| **Create channels** | ✅ | ✅ | ❌ | ✅ |
|
|
224
|
+
| **Manage roles** | ✅ | ✅ | ❌ | ✅ |
|
|
225
|
+
| **Set permissions** | ✅ | ✅ | ❌ | ✅ |
|
|
226
|
+
| **Read messages** | Coming soon | ✅ | ✅ | ✅ |
|
|
227
|
+
| **Self-hosted** | ✅ | ✅ | ✅ | N/A |
|
|
228
|
+
|
|
229
|
+
<br>
|
|
230
|
+
|
|
231
|
+
## Roadmap
|
|
232
|
+
|
|
233
|
+
- [ ] Message management (send, pin, delete)
|
|
234
|
+
- [ ] Webhook management
|
|
235
|
+
- [ ] Scheduled events
|
|
236
|
+
- [ ] Automod rules
|
|
237
|
+
- [ ] Server templates (export/import structure)
|
|
238
|
+
- [ ] `discli setup` interactive guided server setup
|
|
239
|
+
|
|
240
|
+
<br>
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
MIT
|
|
245
|
+
|
|
246
|
+
<br>
|
|
247
|
+
|
|
248
|
+
<p align="center">
|
|
249
|
+
Built by <a href="https://github.com/ibbybuilds">@ibbybuilds</a>
|
|
250
|
+
</p>
|