Skip to content

About

An inherently undetectable Clash Royale automation bot

Topics

Resources

Contributing

Stars

354 stars

Watchers

14 watching

Forks

Repository files navigation

py-clash-bot

An open-source automation tool for Clash Royale on Windows and macOS. Uses Android emulation and image recognition to automate battles, card upgrades, clan tasks, and other daily gameplay.

Join our Discord for support and updates.

Features

Battle Automation

  • Trophy Road, Classic 1v1, and Classic 2v2 battles
  • Randomize or cycle decks
  • Optional random card plays

Progression & Clan

  • Card mastery reward collection
  • Automatic card upgrades
  • Clan donate, card requests, and Pass gift claiming
  • Real-time win/loss tracking and session stats

Accounts & Extras

  • Rotate between linked Supercell accounts (2–3)
  • Discord Rich Presence
  • Custom UI themes

Emulator Support

  • MEmu, BlueStacks 5, Google Play Games, and ADB devices
  • OpenGL, DirectX, and Vulkan render modes (where supported)

Setup

1. Install py-clash-bot

Windows: Download for Windows and double-click the downloaded .msi.

The installer is per-user: it installs under %LocalAppData%\Programs\py-clash-bot and is designed not to ask for administrator rights. It adds a py-clash-bot shortcut to your desktop and Start Menu and starts the app when it finishes.

When the app starts, Windows will ask for administrator rights. Choose Yes — the app needs them to control the emulator.

This build isn't code-signed yet, so Windows may show a SmartScreen warning; see docs/windows-installer.md for the standard workaround and other installer troubleshooting.

macOS: Download the DMG from releases, drag to Applications. On first launch, go to System Settings > Privacy & Security and click "Allow" for py-clash-bot.

2. Install an Emulator

Choose one:

MEmu (Windows only)

BlueStacks 5 (Windows/macOS)

  • Download BlueStacks 5 (not BlueStacks X/10)
  • Run the installer

Google Play Games (Windows only)

  • Download the developer emulator (not BETA)
  • Run the installer and complete the Google sign-in when prompted

3. Configure and Run

  1. Start py-clash-bot
  2. Go to the Emulator tab and select your emulator from the dropdown
  3. Click Start — the bot creates the emulator instance automatically
  4. Install Clash Royale on the emulator via Google Play Store
  5. Open Clash Royale, complete the tutorial, set language to English
  6. Close the emulator completely
  7. Enable the jobs you want on the Jobs tab, then click Start again to begin automation

Default settings work for most users. Only enable "Show advanced settings" to change render mode if troubleshooting.

Where are my settings?

On Windows, settings, logs, and recordings live in %APPDATA%\py-clash-bot — outside the install folder — so upgrading or moving the app keeps them.

If you upgraded from an older release, you don't need to do anything first: releases since at least 3.1.5 also install per-user under %LocalAppData%\Programs\py-clash-bot, so upgrading from 3.1.5 or 3.3.2 is in-place and keeps a single Add or Remove Programs entry along with your settings. Only if Add or Remove Programs shows an old py-clash-bot under C:\Program Files (or C:\Program Files (x86)) should you uninstall that first — it may ask for administrator rights. See docs/windows-installer.md for details and troubleshooting.

Headless Linux

The bot core runs without a GUI or X display. Install the optional backend and point it at an already-running device:

pip install -e .[headless]
python -m pyclashbot.headless --adb-serial <ip:port> --adb-path <adb>

--emulator adb selects the built-in ADB controller. --adb-path / --adb-server-port (or $ADB_PATH / $ADB_SERVER_PORT) select the adb binary/server. The game must be installed, signed in, past onboarding, and on the main menu with a full deck.

Demo

Game DemoGUI Demo

Troubleshooting

MEmu

  • Requires UEFI and Hyper-V enabled in BIOS (enable UEFI, enable Hyper-V)
  • Hardware intensive — try Google Play Games on low-end machines
  • Black screen or boot issues: switch render mode in bot settings (OpenGL/DirectX/Vulkan)
  • Corrupt VMs from old versions: delete existing MEmu VMs or reinstall MEmu

BlueStacks 5

  • Must use BlueStacks 5, not BlueStacks X/10
  • Expected install path: C:\Program Files\BlueStacks_nxt
  • Startup fails: open Multi-Instance Manager, create a fresh "Android 13 (Tiramisu 64-bit)" instance without signing into any Google account, leave other settings as default, then start the bot again
  • Black screen: switch render mode in bot settings

Google Play Games

  • Must use the DEVELOPER version, not BETA
  • Hanging on boot: check for Google sign-in popup in a minimized browser window
  • Rendering issues: adjust settings via System tray > Google Play Games > Graphics settings
  • Installer won't download: open Task Manager > File > Run new task, paste installer path, check "Run as admin"
  • Set emulator system language to English (in addition to game language)

Contributing

See CONTRIBUTING.md | Discord | Issues

License

Source: NC-CL-1.0 | Assets: CC BY-NC-SA 4.0 | Commercial inquiries

About

An inherently undetectable Clash Royale automation bot

Topics

Resources

Contributing

Stars

354 stars

Watchers

14 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages