Human-like mouse and keyboard automation with an optional packaged RL mouse policy.
Project description
Bumblebee
Human-like mouse and keyboard automation for Python.
Bumblebee gives you a small runtime API for moving the mouse, clicking, dragging, scrolling, typing, shortcuts, clipboard actions, and optional RL-generated cursor paths. The base install stays lightweight; Torch and Stable-Baselines3 are only installed when you ask for RL support.
Install
pip install the-bumblebee
or with uv:
uv add the-bumblebee
To use the packaged RL mouse policy:
pip install "the-bumblebee[rl]"
# or
uv add "the-bumblebee[rl]"
Quick start
Mouse
from bumblebee import Mouse, MouseBounds
mouse = Mouse(fail_safe=True)
mouse.set_profile("natural")
mouse.set_speed(1200)
mouse.move(500, 300)
mouse.click()
mouse.drag_to(700, 450)
mouse.scroll(-3)
# Click a random safe point inside a UI rectangle.
mouse.click_in_bounds(MouseBounds(100, 200, 260, 240), padding=6)
Keyboard
from bumblebee import Keyboard
keyboard = Keyboard()
keyboard.set_profile("careful")
keyboard.type("Hello from Bumblebee.", wpm=70, typo_rate=1)
keyboard.hotkey("cmd", "a") # use "ctrl" on Windows/Linux
Packaged RL mouse policy
from bumblebee import Mouse
from bumblebee.rl.policy import SB3MousePolicyPathProvider
provider = SB3MousePolicyPathProvider.from_packaged(deterministic=False)
mouse = Mouse(path_provider=provider, fail_safe=True)
mouse.move(700, 450)
What is included
- Mouse movement, clicking, dragging, scrolling, and bounded clicks
- Keyboard typing, hotkeys, copy/paste, undo/redo, and multi-line helpers
- Configurable movement and typing profiles
- Custom mouse path providers
- Optional packaged SAC mouse policy for RL-generated paths
- Local tooling for preparing data, training, and visualizing mouse policies
Documentation
| Topic | Link |
|---|---|
| Installation | docs/installation.md |
| Mouse API | docs/mouse.md |
| Keyboard API | docs/keyboard.md |
| Examples | docs/examples.md |
| RL workflow | docs/rl-workflow.md |
| Architecture | docs/architecture.md |
| Model and release assets | docs/models-and-releases.md |
| Publishing | PUBLISHING.md |
| Security | SECURITY.md |
Development
git clone https://github.com/arpan404/bumblebee.git
cd bumblebee
uv sync --group dev
uv run black --check .
uv run isort --check-only .
uv run python -m compileall scripts src
uv build
uv run twine check dist/*
For RL training tools:
uv sync --group train
Model and dataset policy
The wheel includes the default model:
bumblebee/models/sac_mouse_v2.zip
Datasets, checkpoints, replay buffers, TensorBoard logs, and other large training artifacts are not included in the wheel. Release artifacts live on GitHub Releases.
Safety
Mouse(fail_safe=True)is the default.- Move the cursor to a screen corner to trigger PyAutoGUI's fail-safe.
- Only automate systems and applications you are allowed to control.
- Be careful with real clicks, typing, and clipboard operations.
On macOS, you may need to grant Accessibility permission to your terminal, Python, or IDE.
Contributing
Contributions are welcome. Start with CONTRIBUTING.md.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file the_bumblebee-2.0.1.tar.gz.
File metadata
- Download URL: the_bumblebee-2.0.1.tar.gz
- Upload date:
- Size: 6.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b78090574bb91408d66239ea5f97df3290b04a0c911276d4b534fd0a0b1f44b
|
|
| MD5 |
4586ee13bacf7e6ad8e5f42a60862147
|
|
| BLAKE2b-256 |
ec08792b824c20d5bb1e44079e02d58186fdc971dbd9f2e2868343ec8a1c9b6f
|
Provenance
The following attestation bundles were made for the_bumblebee-2.0.1.tar.gz:
Publisher:
release.yml on arpan404/bumblebee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
the_bumblebee-2.0.1.tar.gz -
Subject digest:
5b78090574bb91408d66239ea5f97df3290b04a0c911276d4b534fd0a0b1f44b - Sigstore transparency entry: 1934290900
- Sigstore integration time:
-
Permalink:
arpan404/bumblebee@a6a505c44becb9e0364d0f429c688778db763dae -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/arpan404
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a6a505c44becb9e0364d0f429c688778db763dae -
Trigger Event:
release
-
Statement type:
File details
Details for the file the_bumblebee-2.0.1-py3-none-any.whl.
File metadata
- Download URL: the_bumblebee-2.0.1-py3-none-any.whl
- Upload date:
- Size: 6.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d7a11027db3f238bd1ee05d0ace81f5527a1f1ee446c1cac1853c5593fc205
|
|
| MD5 |
9c34580ae6897a11f79e8f0321889e54
|
|
| BLAKE2b-256 |
fe104bbbc73a5420223a663c97485f42dd62b254f3c229974d7acbdeb6d682f9
|
Provenance
The following attestation bundles were made for the_bumblebee-2.0.1-py3-none-any.whl:
Publisher:
release.yml on arpan404/bumblebee
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
the_bumblebee-2.0.1-py3-none-any.whl -
Subject digest:
f6d7a11027db3f238bd1ee05d0ace81f5527a1f1ee446c1cac1853c5593fc205 - Sigstore transparency entry: 1934290922
- Sigstore integration time:
-
Permalink:
arpan404/bumblebee@a6a505c44becb9e0364d0f429c688778db763dae -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/arpan404
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a6a505c44becb9e0364d0f429c688778db763dae -
Trigger Event:
release
-
Statement type: