Skip to content

kalpthakkar/AutoTyper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

233 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ AutoTyper
A Typing That Feels Alive

Human-like, State-aware Auto-typing System built for live coding, tutorial recording, technical interviews, demos, workflow automation, and distraction-free automation - without sounding like a robot.


Sender UI


AutoTyper separates control from execution.
A browser-based sender issues commands, while a lightweight receiver performs realistic typing directly into any focused application (IDE, editor, browser, terminal).

πŸ’‘ Overview

AutoTyper is an automated typing tool designed to simulate natural typing behavior, useful for testing, automation, or productivity applications. It consists of two main components: the Sender (client-side) and the Receiver (server-side). The Sender sends messages to the Receiver to simulate typing actions, while the Receiver manages these commands and processes them.

The Sender provides a web interface where users can input messages or code, configure typing speed, and control the typing process (start, stop, pause, resume, etc.). The Receiver listens for incoming commands from the Sender, processes them, and simulates typing in a terminal or browser environment.

This project is built using WebSockets for real-time communication between the Sender and Receiver.


πŸ“ Repository Structure

AutoType/
β”œβ”€β”€ sender_web/
β”‚   β”œβ”€β”€ app.py
β”‚   └── templates/
β”‚       └── index.html
β”‚
β”œβ”€β”€ static/
β”‚   └── ...
β”‚
β”œβ”€β”€ receiver.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
└── README.md

πŸš€ Installation & Setup

πŸ“¦ Installation

  1. Clone:

    git clone https://github.com/kalpthakkar/AutoTyper.git
    cd AutoTyper
  2. Install Dependencies:

    pip install -r requirements.txt

    ⚠️ Receiver requires system input access

    • On macOS: enable Accessibility permissions
    • On Linux: run inside X11 session
    • On Windows: run normally (Admin not required)

πŸ“₯ Receiver Setup

The Receiver script is a Python-based backend that listens for incoming requests and communicates with the Sender using WebSockets.

  1. Get your IPv4 Address:

    • Open Command Prompt or Terminal on your system.
    • Run ipconfig (Windows) or ifconfig (Linux/macOS) and note down your IPv4 Address.
    • Note this IP address for the Sender.
  2. Run the Receiver server:

    python receiver.py
  3. The server should now be running on port 8000.

    • You should see a message like:
      {"status":"ok","service":"AutoType Receiver","ws":"/ws/status"}
      when opening localhost:8000.

🌍 WAN Setup (Cloudflare Tunnel) - Optional

To expose the Receiver to the internet, you can use a Cloudflare Tunnel:

  1. Install cloudflared:

    • Windows: MSI installer
    • macOS: brew install cloudflare/cloudflare/cloudflared
    • Linux: tarball or package manager
      Cloudflare Docs
  2. Authenticate (if needed):

    cloudflared login
  3. Run a tunnel pointing to your local Receiver:

    cloudflared tunnel --url http://localhost:8000
    • This will generate a public URL like https://<subdomain>.trycloudflare.com.
  4. Note the generated URL for the Sender setup.

πŸ’‘ For a visual step-by-step guide, check the Cloudflare setup screenshots here.

πŸ“€ Sender Setup

The Sender is a Python script that connects to the Receiver's WebSocket server. It provides a web interface for sending and controlling typing tasks.

LAN

  1. Run the Sender with the Receiver's IP address:

    python sender_web/app.py <receiver_url>
    

    Replace <receiver_url> with the following format, where <receiver-ip> is the IP address of the Receiver:

    http://<receiver-ip>:8000

WAN

  1. Run the Sender with the public tunnel URL:

    python sender_web/app.py https://<generated-subdomain>.trycloudflare.com
  2. The Sender will run on port 5000. You can access the control panel at:

    Control Panel


🌟 Usage

  1. Focus any application where typing should occur

  2. Paste content into the Sender UI

  3. Configure typing options (speed, humanizer, code mode, normalize, etc)

  4. Click Run

  5. Pause, resume, or stop anytime

AutoTyper types only into the currently focused window.

πŸ’‘ Note: The set speed gets override when humanize is enabled and only partially contributes to the typing behavior.


✨ Core Capabilities

🧠 Human-Like Typing

Human Like Typing

β€’ Variable speed per character
β€’ Natural hesitations
β€’ Realistic typos with correction
β€’ Punctuation-aware pauses

🧾 Code-Aware Execution - Code Mode

β€’ Detects indentation style (tabs vs spaces)
β€’ Syncs indentation with active IDE
β€’ Optional normalization (strip leading whitespace)
β€’ Safe recovery if code mode toggles mid-typing

🧬 Full Typing State Machine

State Machine

idle β†’ preparing β†’ typing β†’ paused β†’ completed

β€’ Pause / resume without losing progress
β€’ Auto-pause after each line (teaching mode)
β€’ Safe stop at any time

🌍 Web-Based Control Panel

β€’ Paste text or code
β€’ Start / pause / resume / stop
β€’ Toggle features live
β€’ Visual progress tracking
β€’ WebSocket-based real-time status updates

πŸ€” Why AutoTyper Exists

🧨 Traditional auto-typers are:

  • too fast,
  • too uniform,
  • unaware of code structure,
  • impossible to control once started.

AutoTyper treats typing as a stateful, interruptible process, not a blind key spammer.

πŸ”¦ Insight
Typing is interactive. Humans pause, hesitate, align indentation, resume, and recover mid-line.

πŸ”₯ Solution
AutoTyper introduces:

  • typing state machine
  • token-aware execution
  • real-time pause/resume
  • IDE-safe code alignment

All controlled remotely - without touching the target machine.


πŸͺ„ Features

Typing Img

  • Real-time Web Interface: Interact with the Sender via a web interface.
  • Line Tracking: See percentage completion on control panel.
  • Typing Simulation: Simulate typing with configurable speed, pauses, and true human-like typing behaviour.
  • Auto Pause: Automatically pauses typing after each line for more controlled typing.
  • Normalize Whitespace: Normalize leading spaces/tabs for more predictable typing.
  • WebSocket Communication: Real-time two-way communication between Sender and Receiver via WebSockets.
  • Cross-Platform: Both Sender and Receiver can run on various platforms (Windows, Linux, macOS).

🚧 Limitations

⚠️ Intentional constraints:

  • Types into foreground window only
  • No background or headless mode
  • Requires screen focus
  • Not intended for bulk automation or bots
  • AutoTyper is optimized for human-facing interaction, not throughput.

πŸƒ Ideal Use Cases

  • πŸŽ₯ Live coding demos
  • πŸŽ“ Teaching & workshops
  • πŸ§‘β€πŸ’» Interviews
  • πŸ“Ί Screen recordings
  • ✍️ Writing with presence

🌱 Future Roadmap

  • Per-line speed profiles
  • Multi-cursor simulation
  • Typing macros / bookmarks
  • Scriptable typing sessions
  • Recorder β†’ replay mode

🀝 Contributing

Contributions are welcome - especially in:

  • Typing realism
  • State machine robustness
  • UI polish
  • Platform compatibility

Open an issue before large changes.


❀️ Acknowledgements

  • pyautogui for cross-platform input control
  • FastAPI for clean async APIs
  • Tailwind CSS for UI ergonomics

πŸ“ž Contact

For any inquiries or support, please contact:

⚑ AutoTyper β€’ Typing that feels alive. ⚑

About

A two-part system to simulate realistic human typing behavior across devices using WebSockets. The Sender provides a web interface to input text, control speed, and enable human-like typing with pauses, errors, and corrections. The Receiver runs on another machine (or the same) to simulate typing actions in real time.

Topics

Resources

Stars

Watchers

Forks

Packages