Skip to content

pc-style/typesim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Realistic Typing Simulator

A Python tool that simulates realistic human typing behavior — complete with typos, corrections, thinking pauses, and mid-sentence edits. Designed to bypass typing analysis systems like GPTZero by mimicking authentic human typing patterns.

Key Use Case: typesim is specifically designed to avoid detection systems that analyze the typing process (e.g., GPTZero typing analysis). It achieves this by varying per-character delays, inserting natural pauses, and performing human-like edits and corrections. Please use responsibly and comply with the rules of the apps and platforms where you type.

Python 3.12+ License: MIT

Features

  • Bypass Typing Analysis Systems: Specifically designed to evade typing-process detectors like GPTZero typing analysis by simulating authentic human timing patterns, natural edits, and realistic corrections
  • Realistic typos: Randomly hits neighboring keys on QWERTY keyboard
  • Automatic corrections: Backspaces and fixes typos naturally
  • Variable typing speed: Randomized delays between keystrokes with human-like rhythm
  • Thinking pauses: Longer pauses at sentence boundaries, commas, and paragraphs
  • Mid-sentence edits: Goes back to change words, insert phrases, or improve text
  • Sentence rephrasing: Types rephrased versions then changes back (AI-powered)
  • Keyboard shortcuts: Pause, speed control, stop
  • TUI Settings Menu: Configure all behaviors through a beautiful interface
  • File loading: Read text from files
  • AI integration: Optional Gemini API for smarter word suggestions and rephrasing
  • Emergency stop: Press Esc anytime to stop typing

Installation

Quick Install (from GitHub)

# Install directly from GitHub using uv
uv tool install git+https://github.com/pc-style/typesim.git

Development Installation

This project uses UV for dependency management.

# Clone the repository
git clone https://github.com/pc-style/typesim.git
cd typesim

# Install dependencies
uv sync

# Or install in development mode
uv pip install -e .

Setup

  1. Get a Gemini API key from Google AI Studio (optional, for AI features)
  2. Set it as an environment variable:
    export GEMINI_API_KEY="your-api-key-here"
  3. Install dependencies:
    uv sync

Usage

Run the simulator:

# If installed via uv tool install
typesim

# If running from source
uv run typesim

Main Menu

The TUI provides a main menu with options:

  1. Start Typing - Enter text and start typing simulation
  2. Settings - Configure all typing behaviors
  3. Load from File - Load text from a file
  4. Reset to Defaults - Reset all settings

Keyboard Shortcuts (During Typing)

  • Space - Pause/Resume typing
  • + - Increase typing speed
  • - - Decrease typing speed
  • Esc - Stop typing completely

Workflow

  1. Run the command
  2. Choose option from main menu
  3. Enter text (or load from file)
  4. Press Enter to start the countdown
  5. Switch to your target app (text editor, chat, etc.)
  6. Watch the realistic typing happen!
  7. Use keyboard shortcuts to control typing

Configuration

All settings can be configured through the TUI Settings Menu (option 2):

Behavior Probabilities

  • Typo Probability: Chance of making a typo per character (0-50%)
  • Edit Probability: Chance to go back and edit something (0-100%)
  • Rephrase Probability: Chance to rephrase entire sentences (0-100%)

Timing Settings

  • Base Delay: Normal typing speed range (min/max in milliseconds)
  • Thinking Pause: Pause duration for thinking (min/max in milliseconds)
  • Sentence Pause: Pause at sentence ends (min/max in milliseconds)
  • Comma Pause: Pause at commas (min/max in milliseconds)

Other Settings

  • Use AI: Toggle Gemini API features (synonyms, rephrasing)
  • Countdown Seconds: Countdown duration before typing starts
  • Speed Multiplier: Base typing speed multiplier (0.1x to 5.0x)

Configuration File

Settings are saved to ~/.typesim/config.yaml and persist between sessions.

Requirements

  • Python 3.12+
  • pynput (for keyboard control)
  • google-genai (for Gemini API integration, optional)
  • rich (for TUI)
  • pyyaml (for config persistence)

Notes

  • Make sure you have time to switch to your target app during the countdown
  • The simulator types into whatever window is active after the countdown
  • On macOS, you may need to grant accessibility permissions for keyboard control
  • If Gemini API is unavailable or disabled, the app falls back to hardcoded alternatives
  • Configuration is saved automatically when you exit the settings menu

Examples

Basic Usage

typesim
# Choose option 1
# Paste your text
# Press Enter
# Switch to target app

Load from File

typesim
# Choose option 3
# Enter file path: /path/to/text.txt
# Press Enter
# Switch to target app

Adjust Settings

typesim
# Choose option 2
# Edit any setting
# Press 'b' to go back (saves automatically)

About

Realistic human typing simulator with AI-powered rephrasing, typos, corrections, and natural pauses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •