
How It Started
Web automation has become a cat-and-mouse game. Modern bot detection systems have learned to identify automated browsers through predictable patterns: bots click exactly 500ms after page load, mouse travels in straight lines to targets, every keystroke at identical intervals, mechanical scrolling, and zero mistakes or hesitation. This made legitimate automation tasks increasingly difficult. Testing tools got blocked on production sites. Web scraping for research hit endless CAPTCHAs. QA automation failed due to bot detection. Monitoring tools got IP banned. Data collection became unreliable.Building the Solution
I builtdefinitely-not-a-robot
, a Puppeteer wrapper that embraces human imperfection as a feature. By introducing deliberate randomness and natural movement patterns, it makes automated browsers virtually indistinguishable from human users.
The package leverages puppeteer-extra with StealthPlugin and adds layers of human-like behaviors: Bezier curve mouse movements that arc naturally like a human hand, variable typing speeds based on ASCII key distances, random micro-movements during idle time, natural hesitation before important clicks, and debug visualization to see exactly how the “human” moves.
The Technical Build
Core Architecture
Language: TypeScript for type safety Bundler: ESBuild for fast compilation Base: Puppeteer-extra with StealthPlugin Output: CommonJS for broad compatibilityKey Implementations
Bezier Mouse Movement Algorithm
ASCII-Based Typing Delays
Jitter Movement System
- 3-95 pixel random movements
- Returns to original position
- Simulates idle hand tremor
- Configurable intensity and count
API Design
What We Built
The package includes Bezier curve paths instead of straight lines, 50-150ms random click delays for natural hesitation, WPM-based typing with variable speeds (default 40 WPM), debug mode showing red path visualization, and zero dependencies beyond the Puppeteer ecosystem.The Results
The package is now used for QA testing - running tests on production without triggering bot detection. Web scraping teams use it for collecting public data for research and analysis. Automation developers build reliable workflows that don’t break. Monitoring tools track competitor sites without getting banned. It’s published on npm asdefinitely-not-a-robot
with a GitHub repository containing working examples, a demo automation of shadcn/ui interface, and clear documentation with TypeScript types.
What We Learned
Randomness is the key. The difference between bot and human is unpredictability. Humans don’t move in straight lines. Typing speed varies based on key distance. Everyone has idle hand movements. Mistakes and corrections are natural. Debug visualization matters. The red path tracing was crucial for development. We could see exactly how the mouse moves, verify Bezier curves look natural, spot mechanical patterns instantly, and tune parameters visually. Simplicity wins. Rather than complex ML models, simple randomization worked better. Bezier curves for natural arcs, normal distribution for delays, ASCII distance for typing variance, basic jitter for idle movement. What made it work was mathematical foundations (Bezier curves and easing functions), observation of how humans actually move and type, debug-first development with visual feedback, modular design with separate utilities for each behavior, and TypeScript catching edge cases during development. The project proved simple randomization can defeat bot detection, showed legitimate use cases need human-like automation, demonstrated the importance of imperfection in automation, and set a template for ethical automation tools.Open Source
definitely-not-a-robot on GitHub
View source code and contribute
Technologies Used
TypeScript
Type-safe development
Puppeteer
Browser automation
ESBuild
Fast bundling
Stealth Plugin
Bot evasion
Bezier Curves
Natural movement
Canvas API
Debug visualization
Code Example
Here’s how the package handles a typical automation flow:Ethical Note
While this tool can bypass bot detection, it’s designed for legitimate use cases: testing, research, monitoring, and accessibility. The project includes clear disclaimers about responsible use and explicitly discourages malicious applications. As we note in the README: “Beep Boop. We don’t condone this behaviour.” — But sometimes you need to test your production site without getting blocked.Frequently Asked Questions
How does this package make automation look human?
How does this package make automation look human?
It introduces deliberate imperfection through Bezier curve mouse movements, variable typing speeds based on key distances, random micro-movements during idle time, natural hesitation before clicks, and randomized delays. This contrasts with typical automation that moves in straight lines and acts with mechanical precision.
What makes the Bezier curve mouse movement effective?
What makes the Bezier curve mouse movement effective?
Instead of straight-line robot movements, the package calculates curved paths that arc naturally like a human hand would move. The algorithm splits long movements into segments with jitter, applies natural acceleration and deceleration, and uses control points to create realistic curved paths that vary each time.
How does the typing simulation work?
How does the typing simulation work?
Typing delays are calculated based on ASCII character distances - larger key distances result in longer delays, just like real typing. The system adds natural pauses after punctuation marks and allows you to set WPM (words per minute) rates that match human typing speeds, typically 40 WPM by default.
What is the debug mode and why is it important?
What is the debug mode and why is it important?
Debug mode shows red path visualization so you can see exactly how the mouse moves across the screen. This was crucial during development to verify that Bezier curves look natural, spot mechanical patterns instantly, and tune parameters visually. It helps developers optimize their automation to look truly human.
What are legitimate use cases for this tool?
What are legitimate use cases for this tool?
The package is designed for QA testing on production sites without triggering bot detection, web scraping for research and data collection, building reliable automation workflows, monitoring competitor sites, and accessibility testing. It’s built for legitimate automation needs that get blocked by overzealous bot detection.
How does it compare to regular Puppeteer automation?
How does it compare to regular Puppeteer automation?
Regular Puppeteer automation moves in straight lines, clicks at exact intervals, types at consistent speeds, and acts with mechanical precision. This package adds human unpredictability - curved mouse paths, variable delays, natural hesitation, idle movements, and typing patterns based on key distances.
What technical foundation makes the human simulation work?
What technical foundation makes the human simulation work?
The package uses mathematical foundations like Bezier curves and easing functions, observation of actual human movement patterns, debug-first development with visual feedback, modular design for different behaviors, and TypeScript for catching edge cases. Simple randomization proved more effective than complex ML models.
How does the jitter movement system work?
How does the jitter movement system work?
The jitter system creates 3-95 pixel random movements that return to the original position, simulating the natural hand tremor humans have during idle time. It’s configurable for intensity and count, adding another layer of human-like behavior that bots typically lack.
What makes this approach better than existing bot detection evasion?
What makes this approach better than existing bot detection evasion?
Instead of trying to hide automation signatures, this package embraces human imperfection as a feature. It focuses on making the automation genuinely behave like a human rather than just masking bot fingerprints. The mathematical approach to movement and timing patterns creates convincing human simulation.
How can developers get started with this package?
How can developers get started with this package?
Install via npm as ‘definitely-not-a-robot’, import the HumanBrowser class, and use methods like humanMove(), humanType(), and jitterMouse(). The package includes TypeScript types, clear documentation, working examples, and a demo automation of shadcn/ui interface. The GitHub repository has complete implementation details.