|
| 1 | +--- |
| 2 | +order: 3 |
| 3 | +description: Control BetterDiscord from the command line. |
| 4 | +--- |
| 5 | + |
| 6 | + |
| 7 | +# BetterDiscord CLI |
| 8 | + |
| 9 | +A cross-platform command-line interface for installing, updating, and managing [BetterDiscord](https://betterdiscord.app/). |
| 10 | + |
| 11 | +## Features |
| 12 | + |
| 13 | +- 🚀 Easy installation and uninstallation of BetterDiscord |
| 14 | +- 🔄 Support for multiple Discord channels (Stable, PTB, Canary) |
| 15 | +- 🖥️ Cross-platform support (Windows, macOS, Linux) |
| 16 | +- 📦 Available via npm for easy distribution |
| 17 | +- ⚡ Fast and lightweight Go binary |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +### Via npm |
| 22 | + |
| 23 | +```bash |
| 24 | +npm install -g @betterdiscord/cli |
| 25 | +``` |
| 26 | + |
| 27 | +### Via Homebrew/Linuxbrew |
| 28 | + |
| 29 | +```bash |
| 30 | +brew install betterdiscord/tap/bdcli |
| 31 | +``` |
| 32 | + |
| 33 | +### Via winget (Windows) |
| 34 | + |
| 35 | +```bash |
| 36 | +winget install betterdiscord.cli |
| 37 | +``` |
| 38 | + |
| 39 | +### Via Go |
| 40 | + |
| 41 | +```bash |
| 42 | +go install github.com/betterdiscord/cli@latest |
| 43 | +``` |
| 44 | + |
| 45 | +### Download Binary |
| 46 | + |
| 47 | +Download the latest release for your platform from the [releases page](https://github.com/BetterDiscord/cli/releases). |
| 48 | + |
| 49 | +## Commands |
| 50 | + |
| 51 | +### Install |
| 52 | + |
| 53 | +Install BetterDiscord to your Discord installation. |
| 54 | + |
| 55 | +#### By Channel |
| 56 | + |
| 57 | +Auto-detect Discord installation based on the release channel: |
| 58 | + |
| 59 | +```bash |
| 60 | +bdcli install --channel stable # Install to Discord Stable (default) |
| 61 | +bdcli install --channel ptb # Install to Discord PTB |
| 62 | +bdcli install --channel canary # Install to Discord Canary |
| 63 | +``` |
| 64 | + |
| 65 | +#### By Custom Path |
| 66 | + |
| 67 | +Specify a custom path to any Discord installation: |
| 68 | + |
| 69 | +```bash |
| 70 | +bdcli install --path /path/to/Discord |
| 71 | +# Or using short flag: |
| 72 | +bdcli install -p /path/to/Discord |
| 73 | +``` |
| 74 | + |
| 75 | +#### Notes |
| 76 | + |
| 77 | +- If neither `--path` nor `--channel` is specified, it defaults to the Stable channel |
| 78 | +- The `--path` and `--channel` flags are mutually exclusive |
| 79 | + |
| 80 | +### Uninstall |
| 81 | + |
| 82 | +Remove BetterDiscord from your Discord installation. |
| 83 | + |
| 84 | +#### By Channel |
| 85 | + |
| 86 | +```bash |
| 87 | +bdcli uninstall --channel stable # Uninstall from Discord Stable (default) |
| 88 | +bdcli uninstall --channel ptb # Uninstall from Discord PTB |
| 89 | +bdcli uninstall --channel canary # Uninstall from Discord Canary |
| 90 | +``` |
| 91 | + |
| 92 | +#### By Custom Path |
| 93 | + |
| 94 | +Specify a custom path to any Discord installation: |
| 95 | + |
| 96 | +```bash |
| 97 | +bdcli uninstall --path /path/to/Discord |
| 98 | +# Or using short flag: |
| 99 | +bdcli uninstall -p /path/to/Discord |
| 100 | +``` |
| 101 | + |
| 102 | +#### Notes |
| 103 | + |
| 104 | +- If neither `--path` nor `--channel` is specified, it defaults to the Stable channel |
| 105 | +- The `--path` and `--channel` flags are mutually exclusive |
| 106 | + |
| 107 | +### Version |
| 108 | + |
| 109 | +Display version information about the CLI: |
| 110 | + |
| 111 | +```bash |
| 112 | +bdcli version |
| 113 | +``` |
| 114 | + |
| 115 | +Output example: |
| 116 | +``` |
| 117 | +BetterDiscord CLI v1.0.0 |
| 118 | +Commit: abc123def456 |
| 119 | +Built: 2025-02-15T10:30:00Z |
| 120 | +``` |
| 121 | + |
| 122 | +### Completion |
| 123 | + |
| 124 | +Generate shell completion scripts for bash, zsh, or fish: |
| 125 | + |
| 126 | +```bash |
| 127 | +bdcli completion bash # Generate bash completion |
| 128 | +bdcli completion zsh # Generate zsh completion |
| 129 | +bdcli completion fish # Generate fish completion |
| 130 | +``` |
| 131 | + |
| 132 | +To enable completions, source the output in your shell configuration file. |
| 133 | + |
| 134 | +## Help |
| 135 | + |
| 136 | +Get help information about the CLI or any command: |
| 137 | + |
| 138 | +```bash |
| 139 | +bdcli --help # Show general help |
| 140 | +bdcli [command] --help # Show help for a specific command |
| 141 | +``` |
| 142 | + |
| 143 | +### Available Commands |
| 144 | + |
| 145 | +``` |
| 146 | +A cross-platform CLI for installing, updating, and managing BetterDiscord. |
| 147 | +
|
| 148 | +Usage: |
| 149 | + bdcli [flags] |
| 150 | + bdcli [command] |
| 151 | +
|
| 152 | +Available Commands: |
| 153 | + completion Generate shell completions |
| 154 | + help Help about any command |
| 155 | + install Installs BetterDiscord to your Discord |
| 156 | + uninstall Uninstalls BetterDiscord from your Discord |
| 157 | + version Print the version number |
| 158 | +
|
| 159 | +Flags: |
| 160 | + -h, --help help for bdcli |
| 161 | +
|
| 162 | +Use "bdcli [command] --help" for more information about a command. |
| 163 | +``` |
| 164 | + |
| 165 | +## Supported Platforms |
| 166 | + |
| 167 | +The CLI is available for multiple platforms and architectures: |
| 168 | + |
| 169 | +- **Windows** (x64, ARM64, x86) |
| 170 | +- **macOS** (x64, ARM64/M1/M2) |
| 171 | +- **Linux** (x64, ARM64, ARM) |
| 172 | + |
| 173 | +## Common Use Cases |
| 174 | + |
| 175 | +### First Time Installation |
| 176 | + |
| 177 | +1. **Install from stable channel (recommended):** |
| 178 | + ```bash |
| 179 | + bdcli install |
| 180 | + ``` |
| 181 | + |
| 182 | +2. **Or install to a specific channel:** |
| 183 | + ```bash |
| 184 | + bdcli install --channel ptb |
| 185 | + ``` |
| 186 | + |
| 187 | +### Using Multiple Discord Installations |
| 188 | + |
| 189 | +You can manage multiple Discord installations by specifying custom paths: |
| 190 | + |
| 191 | +```bash |
| 192 | +# Install to your custom Discord location |
| 193 | +bdcli install --path /opt/discord-custom |
| 194 | + |
| 195 | +# Later, uninstall from the same location |
| 196 | +bdcli uninstall --path /opt/discord-custom |
| 197 | +``` |
| 198 | + |
| 199 | +### Verify Installation |
| 200 | + |
| 201 | +After installing, you can verify the version of the CLI: |
| 202 | + |
| 203 | +```bash |
| 204 | +bdcli version |
| 205 | +``` |
| 206 | + |
| 207 | +## Troubleshooting |
| 208 | + |
| 209 | +### Discord Installation Not Found |
| 210 | + |
| 211 | +If you get an error like "could not find a valid Discord installation": |
| 212 | + |
| 213 | +1. **Check if Discord is installed** at the default location for your platform |
| 214 | +2. **Use custom path** if Discord is installed elsewhere: |
| 215 | + ```bash |
| 216 | + bdcli install --path /your/custom/discord/path |
| 217 | + ``` |
| 218 | + |
| 219 | +### Mutually Exclusive Flags |
| 220 | + |
| 221 | +You cannot use both `--path` and `--channel` in the same command. Choose one: |
| 222 | + |
| 223 | +```bash |
| 224 | +# ✅ Correct |
| 225 | +bdcli install --channel stable |
| 226 | + |
| 227 | +# ✅ Correct |
| 228 | +bdcli install --path /custom/path |
| 229 | + |
| 230 | +# ❌ Not allowed |
| 231 | +bdcli install --channel stable --path /custom/path |
| 232 | +``` |
| 233 | + |
| 234 | +## Additional Resources |
| 235 | + |
| 236 | +- [GitHub Repository](https://github.com/BetterDiscord/cli) |
| 237 | +- [Releases Page](https://github.com/BetterDiscord/cli/releases) |
0 commit comments