sepandhaghighi/typio

Typio: Make Your Terminal Type Like a Human

Python

44

74 commits

updated Sep 21, 2026

See the code
cli
cli-tool
cli-utilities
cli-utility
console
effects
python
python3
terminal
typewriter
typing
ux

See what people are saying (1)

SourceMessageScoreDate

Typio v1.3: Make Your Terminal Type Like a Human

1

Sep 21, 2026

README

Typio: Make Your Terminal Type Like a Human


built with Python3 GitHub repo size PyPI version

Overview

Typio is a lightweight Python library that prints text to the terminal as if it were being typed by a human. It supports multiple typing modes (character, word, line, sentence, typewriter, and adaptive), configurable delays and jitter for natural variation, and seamless integration with existing code via a simple function or a decorator. Typio is designed to be minimal, extensible, and safe, making it ideal for demos, CLIs, tutorials, and storytelling in the terminal.

PyPI Counter
Github Stars
Branchmaindev
CI
Code QualityCodeFactor

Installation

Source Code

PyPI

Usage

Function

Use type_print function to print text with human-like typing effects. You can control the typing speed, randomness, mode, output stream, and output flushing behavior.

Example

from typio import type_print
from typio import TypeMode

type_print("Hello, world!")

type_print(
    "Typing with style and personality.",
    delay=0.06,
    jitter=0.02,
	end="\n",
    mode=TypeMode.ADAPTIVE,
    flush=False,
)

You can also redirect the output to any file-like object:

with open("output.txt", "w") as file:
    type_print("Saved with typing effects.", file=file)

Parameters

NameTypeDescriptionDefault
textstrText to be printed--
delayfloatBase delay (seconds) between emitted units0.04
jitterfloatRandom delay variation (seconds)0
endstrEnding character(s)\n
modeTypeMode | CallableTyping mode (built-in or custom)TypeMode.CHAR
seedintRandom seed for reproducible outputNone
fileTextIOBaseOutput streamsys.stdout
flushboolAutomatically flush output after each emitted unitTrue

Built-in Modes

ModeDescription
TypeMode.CHAREmit text character by character
TypeMode.WORDEmit text word by word, preserving whitespace
TypeMode.LINEEmit text line by line
TypeMode.SENTENCEEmit text character by character with longer pauses after ., !, ?
TypeMode.TYPEWRITEREmit text character by character with longer pauses after newlines
TypeMode.ADAPTIVEEmit text with adaptive delays based on character type (spaces, punctuation, alphanumeric)
TypeMode.ACCELERATEEmit text character by character with progressively decreasing delay (gradually speeds up over time)
TypeMode.DECELERATEEmit text character by character with progressively increasing delay (gradually slows down over time)
TypeMode.BURSTEmit text in bursts of characters followed by short pauses
TypeMode.FAT_FINGEREmit text mimicking human typos and corrections
TypeMode.THOUGHTFULEmit text while pause slightly before long words to simulate thinking
TypeMode.HEARTBEATEmit text with alternating short and long pauses to simulate a heartbeat-like rhythm
TypeMode.REWINDEmit text while occasionally deleting and retyping words to simulate reconsideration
TypeMode.GLITCHEmit text with occasional random glitches that are quickly corrected
TypeMode.RANDOM_CASEEmit text with randomly varying character casing
TypeMode.WAVEEmit text with sinusoidal delay variation
TypeMode.STUTTEREmit text with stuttering effect on some words
TypeMode.NERVOUSEmit text erratically typing with inconsistent pauses
TypeMode.HESITATIONEmit text with occasional pauses within words to simulate human hesitation
TypeMode.OVERTHINKEmit text while occasionally deleting and retyping a chunk of text to simulate overthinking
TypeMode.CONFIDENTEmit text quickly with brief pauses, adding longer delays after punctuation to simulate confident typing
TypeMode.ECHOEmit text with occasional repetition of characters faintly, like a glitchy terminal echo
TypeMode.DRUNKEmit text with erratic timing and occasional character duplication or skipping
TypeMode.GLIDEEmit text with smooth deceleration then acceleration
TypeMode.FOCUS_DRIFTEmit text with occasional attention drift, causing slowdowns and pauses mid-word
TypeMode.RUBBER_DUCKEmit text while occasionally repeating fragments as if explaining thoughts aloud to a rubber duck
TypeMode.PANICEmits text with an increasing rate of typos and slower typing speed to simulate panicking

Decorator

Use the @typestyle decorator to apply typing effects to all print calls inside a function, without changing the function's implementation.

Example

from typio import typestyle
from typio import TypeMode

@typestyle(delay=0.05, mode=TypeMode.TYPEWRITER, flush=True)
def intro():
    print("Welcome to Typio.")
    print("Every print is typed.")

intro()

Parameters

NameTypeDescriptionDefault
delayfloatBase delay (seconds) between emitted units0.04
jitterfloatRandom delay variation (seconds)0
seedintRandom seed for reproducible outputNone
modeTypeMode | CallableTyping mode (built-in or custom)TypeMode.CHAR
flushboolAutomatically flush output after each emitted unitTrue

Custom Mode

Typio also allows defining custom typing modes.

A custom mode is a callable that receives a typing context and the text being printed.

Example

This custom mode, named dramatic, adds exaggerated pauses after punctuation to create a dramatic typing effect.

from typio import TypioContext

def dramatic(ctx: TypioContext, text: str):
    for ch in text:
        ctx.emit(ch)
        if ch in ".!?":
            ctx.sleep(delay=ctx.delay * ctx.random.uniform(3, 7))

Usage with type_print function:

type_print(
    "Wait... what?!",
    mode=dramatic,
    delay=0.05,
    jitter=0.02,
    flush=True
)

Usage with @typestyle decorator:

@typestyle(delay=0.06, mode=dramatic, flush=True)
def demo():
    print("This is serious.")
    print("Very serious!")

demo()

Parameters

This table describes the TypioContext API, which is the interface exposed to custom typing modes for emitting text, controlling timing, and accessing delay settings.

NameTypeDescription
emit(text)methodEmit a text fragment using typing effects
sleep(delay=None, jitter=None)methodPause execution with optional delay and jitter override
flush()methodFlush the underlying output stream
delaypropertyBase delay in seconds
jitterpropertyJitter value in seconds
randompropertyRandom generator controlled by Typio's seed parameter

CLI

Typio provides a simple command line interface for printing text with typing effects.

Example

> typio "Hello world!" --mode=typewriter --delay=0.03

Pass --seed to make randomized modes reproducible:

> typio "Hello world!" --mode=glitch --seed=42

Screen Record

Issues & Bug Reports

Just fill an issue and describe it. We'll check it ASAP!

  • Please complete the issue template

Show Your Support

Star This Repo

Give a ⭐️ if this project helped you!

Bitcoin

1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCy

Ethereum

0xcD4Db18B6664A9662123D4307B074aE968535388

Litecoin

Ldnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZ

Doge

DDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDh

Tron

TCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7

Ripple

rN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qq

Binance Coin

bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qef

Tether

0xcD4Db18B6664A9662123D4307B074aE968535388

Dash

Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3s

Stellar

GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL

Zilliqa

zil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5

Coffeete

Contributors

sepandhaghighi

60 commits

sadrasabouri

13 commits

sepandhaghighi/typio

Typio: Make Your Terminal Type Like a Human

Python

44

74 commits

updated Sep 21, 2026

See the code
cli
cli-tool
cli-utilities
cli-utility
console
effects
python
python3
terminal
typewriter
typing
ux

See what people are saying (1)

SourceMessageScoreDate

Typio v1.3: Make Your Terminal Type Like a Human

1

Sep 21, 2026

README

Typio: Make Your Terminal Type Like a Human


built with Python3 GitHub repo size PyPI version

Overview

Typio is a lightweight Python library that prints text to the terminal as if it were being typed by a human. It supports multiple typing modes (character, word, line, sentence, typewriter, and adaptive), configurable delays and jitter for natural variation, and seamless integration with existing code via a simple function or a decorator. Typio is designed to be minimal, extensible, and safe, making it ideal for demos, CLIs, tutorials, and storytelling in the terminal.

PyPI Counter
Github Stars
Branchmaindev
CI
Code QualityCodeFactor

Installation

Source Code

PyPI

Usage

Function

Use type_print function to print text with human-like typing effects. You can control the typing speed, randomness, mode, output stream, and output flushing behavior.

Example

from typio import type_print
from typio import TypeMode

type_print("Hello, world!")

type_print(
    "Typing with style and personality.",
    delay=0.06,
    jitter=0.02,
	end="\n",
    mode=TypeMode.ADAPTIVE,
    flush=False,
)

You can also redirect the output to any file-like object:

with open("output.txt", "w") as file:
    type_print("Saved with typing effects.", file=file)

Parameters

NameTypeDescriptionDefault
textstrText to be printed--
delayfloatBase delay (seconds) between emitted units0.04
jitterfloatRandom delay variation (seconds)0
endstrEnding character(s)\n
modeTypeMode | CallableTyping mode (built-in or custom)TypeMode.CHAR
seedintRandom seed for reproducible outputNone
fileTextIOBaseOutput streamsys.stdout
flushboolAutomatically flush output after each emitted unitTrue

Built-in Modes

ModeDescription
TypeMode.CHAREmit text character by character
TypeMode.WORDEmit text word by word, preserving whitespace
TypeMode.LINEEmit text line by line
TypeMode.SENTENCEEmit text character by character with longer pauses after ., !, ?
TypeMode.TYPEWRITEREmit text character by character with longer pauses after newlines
TypeMode.ADAPTIVEEmit text with adaptive delays based on character type (spaces, punctuation, alphanumeric)
TypeMode.ACCELERATEEmit text character by character with progressively decreasing delay (gradually speeds up over time)
TypeMode.DECELERATEEmit text character by character with progressively increasing delay (gradually slows down over time)
TypeMode.BURSTEmit text in bursts of characters followed by short pauses
TypeMode.FAT_FINGEREmit text mimicking human typos and corrections
TypeMode.THOUGHTFULEmit text while pause slightly before long words to simulate thinking
TypeMode.HEARTBEATEmit text with alternating short and long pauses to simulate a heartbeat-like rhythm
TypeMode.REWINDEmit text while occasionally deleting and retyping words to simulate reconsideration
TypeMode.GLITCHEmit text with occasional random glitches that are quickly corrected
TypeMode.RANDOM_CASEEmit text with randomly varying character casing
TypeMode.WAVEEmit text with sinusoidal delay variation
TypeMode.STUTTEREmit text with stuttering effect on some words
TypeMode.NERVOUSEmit text erratically typing with inconsistent pauses
TypeMode.HESITATIONEmit text with occasional pauses within words to simulate human hesitation
TypeMode.OVERTHINKEmit text while occasionally deleting and retyping a chunk of text to simulate overthinking
TypeMode.CONFIDENTEmit text quickly with brief pauses, adding longer delays after punctuation to simulate confident typing
TypeMode.ECHOEmit text with occasional repetition of characters faintly, like a glitchy terminal echo
TypeMode.DRUNKEmit text with erratic timing and occasional character duplication or skipping
TypeMode.GLIDEEmit text with smooth deceleration then acceleration
TypeMode.FOCUS_DRIFTEmit text with occasional attention drift, causing slowdowns and pauses mid-word
TypeMode.RUBBER_DUCKEmit text while occasionally repeating fragments as if explaining thoughts aloud to a rubber duck
TypeMode.PANICEmits text with an increasing rate of typos and slower typing speed to simulate panicking

Decorator

Use the @typestyle decorator to apply typing effects to all print calls inside a function, without changing the function's implementation.

Example

from typio import typestyle
from typio import TypeMode

@typestyle(delay=0.05, mode=TypeMode.TYPEWRITER, flush=True)
def intro():
    print("Welcome to Typio.")
    print("Every print is typed.")

intro()

Parameters

NameTypeDescriptionDefault
delayfloatBase delay (seconds) between emitted units0.04
jitterfloatRandom delay variation (seconds)0
seedintRandom seed for reproducible outputNone
modeTypeMode | CallableTyping mode (built-in or custom)TypeMode.CHAR
flushboolAutomatically flush output after each emitted unitTrue

Custom Mode

Typio also allows defining custom typing modes.

A custom mode is a callable that receives a typing context and the text being printed.

Example

This custom mode, named dramatic, adds exaggerated pauses after punctuation to create a dramatic typing effect.

from typio import TypioContext

def dramatic(ctx: TypioContext, text: str):
    for ch in text:
        ctx.emit(ch)
        if ch in ".!?":
            ctx.sleep(delay=ctx.delay * ctx.random.uniform(3, 7))

Usage with type_print function:

type_print(
    "Wait... what?!",
    mode=dramatic,
    delay=0.05,
    jitter=0.02,
    flush=True
)

Usage with @typestyle decorator:

@typestyle(delay=0.06, mode=dramatic, flush=True)
def demo():
    print("This is serious.")
    print("Very serious!")

demo()

Parameters

This table describes the TypioContext API, which is the interface exposed to custom typing modes for emitting text, controlling timing, and accessing delay settings.

NameTypeDescription
emit(text)methodEmit a text fragment using typing effects
sleep(delay=None, jitter=None)methodPause execution with optional delay and jitter override
flush()methodFlush the underlying output stream
delaypropertyBase delay in seconds
jitterpropertyJitter value in seconds
randompropertyRandom generator controlled by Typio's seed parameter

CLI

Typio provides a simple command line interface for printing text with typing effects.

Example

> typio "Hello world!" --mode=typewriter --delay=0.03

Pass --seed to make randomized modes reproducible:

> typio "Hello world!" --mode=glitch --seed=42

Screen Record

Issues & Bug Reports

Just fill an issue and describe it. We'll check it ASAP!

  • Please complete the issue template

Show Your Support

Star This Repo

Give a ⭐️ if this project helped you!

Bitcoin

1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCy

Ethereum

0xcD4Db18B6664A9662123D4307B074aE968535388

Litecoin

Ldnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZ

Doge

DDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDh

Tron

TCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7

Ripple

rN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qq

Binance Coin

bnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qef

Tether

0xcD4Db18B6664A9662123D4307B074aE968535388

Dash

Xd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3s

Stellar

GALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNL

Zilliqa

zil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5

Coffeete

Contributors

sepandhaghighi

60 commits

sadrasabouri

13 commits

Languages

Python

98.3%