Skip to content

prime-run/go-typer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Go Typer

The sleek, fast terminal typing game inspired by MonkeyType!

Go Typer brings the popular web-based typing experience of MonkeyType to your terminal with a beautiful, customizable interface. Master your typing skills right in your terminal (where it actually matters ๐Ÿ˜‰) without a browser. (online multiplayer type racer, coming soon)

๐Ÿ› ๏ธ Built With

Go Cobra Bubble Tea Lip Gloss

๐Ÿ“ท Screenshots

Go Typer Main Screen
Go Typer Theme Selection Go Typer Typing Session Go Typer Settings

โœจ Features

  • โšก Standard-Style Gameplay: Space bar to advance between words, just like the web favorite!
  • ๐Ÿ“Š WPM & Accuracy Tracking: Watch your stats update when you done typing
  • ๐ŸŽฎ Multiple Game Modes: Choose between normal mode (with punctuation) or simple mode for beginners
  • ๐ŸŽจ Gorgeous Themes: Customize your experience with beautiful color schemes
  • ๐Ÿ“ Flexible Text Lengths: Practice with short, medium, long, or very long passages
  • โš™๏ธ Performance Tuning: Adjust refresh rates from 1-60 FPS for any terminals (or modify it in code for any value)
  • ๐Ÿ“ Cursor Options: Choose your preferred cursor style (block or underline)
  • ๐Ÿ’ป 100% Terminal-Based: No browser needed - perfect for developers and terminal enthusiasts.

Demo video

ffmpeg_output_1080p.mp4

๐Ÿ–ฅ๏ธ Terminal Requirements

Go Typer works best in terminals that support "TrueColor" (24-bit color). It's been tested extensively on Linux but runs great on macOS and Windows too! (if you see inconsistency with colors, animations or functionality with different terminal emulators please open an issue in this repo)

Verify your terminal supports TrueColor by running:

printf "\x1b[38;2;255;0;0mTRUECOLOR\x1b[0m\n"

If you see "TRUECOLOR" in red, you're good to go! If not, check out this compatibility guide.

Caution

Please avoid launching the game through tmux as it might cause unexpected behavior.

Tip

I recommend using terminal emulators like alacritty or kitty, as they are GPU accelerated and generally offer better performance.

๐Ÿš€ Installation

Choose the installation method that suits you best:

โฌ‡๏ธ Download Binaries (Quickest Start)

Download the latest pre-built binaries for your operating system from the Releases page. Here's a simplified way to download and install (rootless):

Linux (x86_64):

wget https://github.com/prime-run/go-typer/releases/download/v1.0.2/go-typer_1.0.2_linux_x86_64.tar.gz
mkdir -p ~/.local/bin
tar -xzf go-typer_*.tar.gz -C ~/.local/bin go-typer

macOS (Intel x86_64):

wget https://github.com/prime-run/go-typer/releases/download/v1.0.2/go-typer_1.0.2_macOS_intel.tar.gz
mkdir -p ~/.local/bin
tar -xzf go-typer_*.tar.gz -C ~/.local/bin go-typer

macOS (Apple Silicon arm64):

wget https://github.com/prime-run/go-typer/releases/download/v1.0.2/go-typer_1.0.2_macOS_apple-silicon.tar.gz
mkdir -p ~/.local/bin
tar -xzf go-typer_*.tar.gz -C ~/.local/bin go-typer

After downloading and extracting, ensure that ~/.local/bin is in your system's PATH environment variable. You can usually do this by adding the following line to your shell's configuration file (e.g., .bashrc, .zshrc):

export PATH="$HOME/.local/bin:$PATH"

Then, reload your shell configuration:

source ~/.bashrc  # For Bash
# or
source ~/.zshrc  # For Zsh

Now you should be able to run Go Typer by simply typing go-typer in your terminal.

โš™๏ธ Go Install (For Go Users)

[!NOTE]
go version > v1.24 is required

go install github.com/prime-run/go-typer@latest

Make sure you have Go installed and your GOPATH/bin or GOBIN is in your system's PATH.

๐Ÿ› ๏ธ Clone and Build (From Source)
git clone https://github.com/prime-run/go-typer.git
cd go-typer
go build -o bin/go-typer
./bin/go-typer
๐Ÿ”จ Make (Unix/Linux)
git clone https://github.com/prime-run/go-typer.git
cd go-typer
make
./bin/go-typer
๐Ÿณ Docker (Container)
git clone https://github.com/prime-run/go-typer.git
cd go-typer
docker build -t go-typer .

# Run in container
docker run -it --rm go-typer

๐ŸŽฎ How to Play

  1. Launch Go Typer:

    go-typer
  2. Navigate through the menu using the arrow keys or j/k.

  3. Press Enter to select a menu item and start typing.

  4. Type the text as displayed. Correctly typed characters will be highlighted.

  5. Press spacebar to advance to the next word, just like on MonkeyType!

  6. Your WPM, accuracy, and time are tracked in real-time at the bottom of the screen.

  7. Complete the passage to see your final statistics.

๐ŸŽฏ Keyboard Controls

  • โ†‘/โ†“ or j/k: Navigate through menu items
  • Enter: Select menu item
  • Esc: Go back to the previous screen
  • Space: Advance to the next word while typing
  • Tab: Restart the current typing exercise
  • q or Ctrl+C: Quit the application

โš™๏ธ Configuration

Go Typer automatically saves your preferences in your user config directory:

  • Linux/BSD: ~/.config/go-typer/settings.json
  • macOS: ~/Library/Application Support/go-typer/settings.json
  • Windows: %AppData%\go-typer\settings.json

image

You can directly edit the settings.json file to customize the following options:

  • theme: Pick from eye-catching color schemes (default, dark, monochrome) or create your own.
  • cursor_style: Choose between block or underline.
  • game_mode: Select normal (with punctuation) or simple for beginners.
  • include_numbers: Set to true to include numbers in typing tests.
  • text_length: Choose from short, medium, long, or very_long.
  • refresh_rate: Fine-tune animation smoothness from 5 (battery-saving) to 60 (ultra-smooth) FPS.

๐ŸŽจ Themes

Go Typer includes beautiful themes inspired by popular coding and typing interfaces.

Built-in themes:

  • default: Clean light theme with green/blue highlights
  • dark: Sleek dark theme with purple/blue accents
  • monochrome: Minimalist black and white theme for distraction-free typing

๐Ÿ–Œ๏ธ Create Your Own Theme

Further customize your typing experience by creating a custom theme file with a toml file under colorschemes directory and select it within the game settings. Here's the structure of a theme file:

# UI Elements
help_text: "#626262" # Help text at the bottom
timer: "#FFDB58" # Timer display
border: "#7F9ABE" # Border color for containers

# Text Display
text_dim: "#555555" # Untyped text
text_preview: "#7F9ABE" # Preview text color
text_correct: "#00FF00" # Correctly typed text
text_error: "#FF0000" # Incorrectly typed characters
text_partial_error: "#FF8C00" # Correct characters in error words

# Cursor
cursor_fg: "#FFFFFF" # Cursor foreground color
cursor_bg: "#00AAFF" # Cursor background color
cursor_underline: "#00AAFF" # Underline cursor color

# Miscellaneous
padding: "#888888" # Padding elements color

๐Ÿ”„ Related Projects

togo: A terminal-based todo manager built with the same technology stack! Check out togo on GitHub

๐Ÿค Contributing

Love Go Typer? Contributions are always welcome!

  • Check out our todos for upcoming features and areas where you can help.
  • Feel free to submit pull requests for bug fixes or new features.
  • If you have any suggestions or find any issues, please open an issue on GitHub.

๐Ÿ“œ License

MIT

About

The sleek, terminal typing test inspired by MonkeyType!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages