@betterdiscord/cli
v0.3.1
Published
A cross-platform CLI for managing BetterDiscord
Downloads
553
Readme
BetterDiscord CLI
A cross-platform command-line interface for installing, updating, and managing BetterDiscord.
Features
- 🚀 Easy installation and uninstallation of BetterDiscord
- 🔄 Support for multiple Discord channels (Stable, PTB, Canary)
- 🧭 Discover Discord installs and suggested paths
- 🧩 Manage plugins and themes (list, install, update, remove)
- 🛒 Browse and search the BetterDiscord store
- 🖥️ Cross-platform support (Windows, macOS, Linux)
- 📦 Available via npm for easy distribution
- ⚡ Fast and lightweight Go binary
Installation
Via npm (Recommended)
npm install -g @betterdiscord/cliVia Go
go install github.com/betterdiscord/cli@latestVia winget (Windows)
winget install betterdiscord.cliVia Homebrew/Linuxbrew
brew install betterdiscord/tap/bdcliDownload Binary
Download the latest release for your platform from the releases page.
Usage
Global Options
bdcli --silent <command> # Suppress non-error outputYou can also set BDCLI_SILENT=1 to silence output in automation.
Install BetterDiscord
Install BetterDiscord to a specific Discord channel:
bdcli install --channel stable # Install to Discord Stable
bdcli install --channel ptb # Install to Discord PTB
bdcli install --channel canary # Install to Discord CanaryInstall BetterDiscord by providing a Discord install path:
bdcli install --path /path/to/DiscordUninstall BetterDiscord
Uninstall BetterDiscord from a specific Discord channel:
bdcli uninstall --channel stable # Uninstall from Discord Stable
bdcli uninstall --channel ptb # Uninstall from Discord PTB
bdcli uninstall --channel canary # Uninstall from Discord CanaryUninstall BetterDiscord by providing a Discord install path:
bdcli uninstall --path /path/to/DiscordUninject BetterDiscord from all detected Discord installations (without deleting data):
bdcli uninstall --allFully uninstall BetterDiscord from all Discord installations and remove all BetterDiscord folders:
bdcli uninstall --fullCheck Version
bdcli versionUpdate BetterDiscord
bdcli update
bdcli update --checkShow BetterDiscord Info
bdcli infoDiscover Discord Installs
bdcli discover installs
bdcli discover paths
bdcli discover addonsManage Plugins
bdcli plugins list
bdcli plugins info <name>
bdcli plugins install <name|id|url>
bdcli plugins update <name|id|url>
bdcli plugins update <name|id> --check # Check for updates without installing
bdcli plugins remove <name|id>Manage Themes
bdcli themes list
bdcli themes info <name>
bdcli themes install <name|id|url>
bdcli themes update <name|id|url>
bdcli themes update <name|id> --check # Check for updates without installing
bdcli themes remove <name|id>Browse the Store
bdcli store search <query>
bdcli store show <id|name>
bdcli store plugins search <query>
bdcli store plugins show <id|name>
bdcli store themes search <query>
bdcli store themes show <id|name>Shell Completions
bdcli completion bash
bdcli completion zsh
bdcli completion fishHelp
bdcli --help
bdcli [command] --helpAutomation
For scripts and CI jobs, you can suppress non-error output:
# One-off command
bdcli --silent install --channel stable
# Environment variable (applies to all commands)
BDCLI_SILENT=1 bdcli updateCLI Help Output
A cross-platform CLI for installing, updating, and managing BetterDiscord.
Usage:
bdcli [flags]
bdcli [command]
Available Commands:
completion Generate shell completions
discover Discover Discord installations and related data
help Help about any command
info Displays information about BetterDiscord installation
install Installs BetterDiscord to your Discord
plugins Manage BetterDiscord plugins
store Browse and search the BetterDiscord store
themes Manage BetterDiscord themes
uninstall Uninstalls BetterDiscord from your Discord
update Update BetterDiscord to the latest version
version Print the version number
Flags:
--silent Suppress non-error output
-h, --help help for bdcli
Use "bdcli [command] --help" for more information about a command.Supported Platforms
- Windows (x64, ARM64, x86)
- macOS (x64, ARM64/M1/M2)
- Linux (x64, ARM64, ARM)
Development
Prerequisites
- Go 1.26 or higher
- Task (optional, for task automation)
- GoReleaser (for releases)
Setup
Clone the repository and install dependencies:
git clone https://github.com/BetterDiscord/cli.git
cd cli
task setup # Or: go mod downloadAvailable Tasks
Run task --list-all to see all available tasks:
# Development
task run # Run the CLI (pass args with: task run -- install stable)
# Building
task build # Build for current platform
task build:all # Build for all platforms (GoReleaser)
# Testing
task test # Run tests
task test:verbose # Run tests with verbose output
task coverage # Run tests with coverage summary
task coverage:html # Generate HTML coverage report
# Code Quality
task fmt # Format Go files
task vet # Run go vet
task lint # Run golangci-lint
task check # Run fix, fmt, vet, lint, test
# Release
task release:snapshot # Test release build
task release # Create release (requires tag)
# Cleaning
task clean # Remove build and debug artifactsRunning Locally
# Run directly
go run main.go install stable
# Or use Task
task run -- install stableBuilding
# Build for current platform
task build
# Build for all platforms
task build:all
# Output will be in ./dist/Testing
# Run all tests
task test
# Run with coverage
task coverageReleasing
Create and push a new tag:
git tag -a v0.2.0 -m "Release v0.2.0" git push origin v0.2.0GitHub Actions will automatically build and create a draft release
Edit the release notes and publish
Publish to npm:
npm publish
Project Structure
.
├── cmd/ # Cobra commands
│ ├── install.go # Install command
│ ├── update.go # Update command
│ ├── info.go # Info command
│ ├── discover.go # Discover command
│ ├── plugins.go # Plugins commands
│ ├── themes.go # Themes commands
│ ├── store.go # Store commands
│ ├── uninstall.go # Uninstall command
│ ├── version.go # Version command
│ └── root.go # Root command
├── internal/ # Internal packages
│ ├── betterdiscord/ # BetterDiscord installation logic
│ ├── discord/ # Discord path resolution and injection
│ ├── models/ # Data models
│ └── utils/ # Utility functions
├── main.go # Entry point
├── Taskfile.yml # Task automation
└── .goreleaser.yaml # Release configurationContributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Links
Acknowledgments
Built with:
- Cobra - CLI framework
- GoReleaser - Release automation
- Task - Task runner
Made with ❤️ by the BetterDiscord Team
