Installation
discli runs on Python 3.10+ and works on macOS, Linux, and Windows. Pick the installation method that suits your workflow.
Requirements
Before installing, make sure you have:
- Python 3.10 or later — check with
python --versionorpython3 --version - A Discord bot token — you will need this to authenticate. See Your First Bot if you do not have one yet.
Install discli
The fastest way to install discli is from PyPI:
pip install discord-cli-agentThis installs the discli command globally along with its dependencies (discord.py and click).
If you use virtual environments (recommended for project isolation), activate your environment first:
python -m venv .venvsource .venv/bin/activate # macOS/Linux.venv\Scripts\activate # Windowspip install discord-cli-agentUse the one-line installer to download and set up discli automatically:
curl -fsSL https://raw.githubusercontent.com/DevRohit06/discli/main/installers/install.sh | bashThis script will:
- Check that Python 3.10+ is available
- Install
discord-cli-agentvia pip - Verify the installation
If you prefer not to pipe to bash, you can download the script first and inspect it:
curl -fsSL https://raw.githubusercontent.com/DevRohit06/discli/main/installers/install.sh -o install.shless install.shbash install.shOpen PowerShell and run:
irm https://raw.githubusercontent.com/DevRohit06/discli/main/installers/install.ps1 | iexThis script handles Python detection and installs discord-cli-agent via pip.
You may need to adjust your PowerShell execution policy first:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserClone the repository and install in development mode:
git clone https://github.com/DevRohit06/discli.gitcd disclipip install -e ".[dev]"This installs discli in editable mode with development dependencies (pytest, pytest-asyncio), so you can modify the source and see changes immediately.
Verify the installation
After installing, confirm that discli is available:
discli --helpYou should see output like:
Usage: discli [OPTIONS] COMMAND [ARGS]...
discli — Discord CLI for AI agents.
Options: --token TEXT Discord bot token. --json Output as JSON. -y, --yes Skip confirmation prompts for destructive actions. --profile [full|chat|readonly|moderation] Override permission profile for this invocation. --help Show this message and exit.
Commands: audit View the audit log. channel Manage channels. config Manage discli configuration. dm Send and read direct messages. listen Listen to real-time Discord events. member Manage server members. message Send, read, and manage messages. permission Manage permission profiles for command access control. poll Create and manage polls. reaction Manage message reactions. role Manage server roles. serve Start a persistent agent session (JSONL protocol). server List and inspect servers. thread Manage threads. typing Show typing indicator in a channel.If you see command not found: discli, make sure the Python scripts directory is on your PATH. For pip installs, this is typically ~/.local/bin on Linux/macOS or %APPDATA%\Python\Scripts on Windows.
Upgrading
To upgrade to the latest version:
pip install --upgrade discord-cli-agentUninstalling
pip uninstall discord-cli-agentThis removes the discli command but leaves your configuration at ~/.discli/ intact. Delete that directory manually if you want a clean removal.