Skip to main content

Human-like mouse and keyboard automation with an optional packaged RL mouse policy.

Project description

🐝 Bumblebee

PyPI Python

Human-like mouse and keyboard automation for Python, with an optional packaged SAC mouse policy for RL-generated cursor paths.

Bumblebee v2 focuses on:

  • a lightweight runtime API for mouse and keyboard automation
  • configurable movement/typing profiles
  • custom and RL mouse path providers
  • a packaged default SAC mouse model
  • local tooling for preparing data, training, and visualizing mouse policies

Detailed usage lives in docs/. This README is only the quick start.


Installation

Runtime only:

uv add the-bumblebee

Runtime plus packaged RL model loading:

uv add "the-bumblebee[rl]"

Local development:

git clone https://github.com/arpan404/bumblebee.git
cd bumblebee
uv sync --group dev

Local RL training tools:

uv sync --group train

Quick examples

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)

More: Mouse API

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

More: Keyboard API

Packaged RL mouse model

Install with the-bumblebee[rl], then:

from bumblebee import Mouse
from bumblebee.rl.policy import SB3MousePolicyPathProvider

provider = SB3MousePolicyPathProvider.from_packaged(deterministic=False)
mouse = Mouse(path_provider=provider)
mouse.move(700, 450)

More: Packaged model and release assets


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/release assets docs/models-and-releases.md
Publishing PUBLISHING.md
Security SECURITY.md

Model and dataset policy

The wheel includes the default model:

bumblebee/models/sac_mouse_v2.zip

The dataset is not included in the wheel. Large datasets/checkpoints/logs should be distributed through GitHub Releases or another artifact host.


Development checks

uv run black --check .
uv run isort --check-only .
uv run python -m compileall scripts src
uv build
uv run twine check dist/*

CI runs these checks and verifies that the packaged model is present in the wheel.


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.

Contributing

See 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

the_bumblebee-2.0.0.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

the_bumblebee-2.0.0-py3-none-any.whl (6.0 MB view details)

Uploaded Python 3

File details

Details for the file the_bumblebee-2.0.0.tar.gz.

File metadata

  • Download URL: the_bumblebee-2.0.0.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

Hashes for the_bumblebee-2.0.0.tar.gz
Algorithm Hash digest
SHA256 4cdf4043ea3a9c2f210f23e569aa85e6979fcd759b73e3370076cd0757ec7446
MD5 f0d7d2e95900431d696d19b32826e3f6
BLAKE2b-256 341acf3fda5bcfd3a1600c144340b651e00bf40e0776afbf53cf7f3f8c2f20f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for the_bumblebee-2.0.0.tar.gz:

Publisher: release.yml on arpan404/bumblebee

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file the_bumblebee-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: the_bumblebee-2.0.0-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

Hashes for the_bumblebee-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f729c1eb0dc3a6d93f3d840d0950abe7c008302d1ed80cd70f9483d986810d12
MD5 0b1534c42e8078aac35b9e8521addb60
BLAKE2b-256 784ac5c7cea02adde32a0c295e2170e323a2491159dad387b27201bea2f69310

See more details on using hashes here.

Provenance

The following attestation bundles were made for the_bumblebee-2.0.0-py3-none-any.whl:

Publisher: release.yml on arpan404/bumblebee

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page