Skip to content

ypatel2022/ttt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Typing Test (TTT)

A typing test that runs in your terminal. Practice typing in different languages and programming syntax without opening a browser.

Main Menu

Features

  • Support for 200+ languages including English, Spanish, French, German, Russian, Chinese, Japanese, and more
  • Programming language word sets (Go, Python, JavaScript, Rust, C++, Java, TypeScript, etc.)
  • Configurable word count and display options
  • Live WPM and accuracy tracking
  • Terminal UI built with Bubble Tea
  • Keyboard shortcuts for quick navigation and restart

Getting Started

Prerequisites

  • Go 1.21 or higher
  • Terminal with ANSI color support

Installation

  1. Clone the repository:

    git clone https://github.com/ypatel2022/ttt.git
    cd ttt
  2. Install dependencies:

    go mod tidy
  3. Run the application:

    go run ./ttt

Quick Start

  1. Run go run ./ttt
  2. Navigate with arrow keys
  3. Press Enter to start a typing test
  4. Start typing the words shown
  5. Press Tab to restart or Escape to go back

Usage

Typing Test

Main Menu

  • Arrow keys or k/j: Navigate options
  • Enter or Space: Select
  • Ctrl+C: Quit

During Test

  • Just start typing the displayed words
  • Tab: Restart test
  • Escape: Back to menu
  • Ctrl+C: Quit

Configuration

  • Arrow keys: Navigate settings
  • Enter: Change setting
  • Escape: Back to menu

Configuration

Configuration Menu

Settings are stored in config.yaml:

language: english.json # Language/word set to use
num_words: 10 # Number of words per test
show_accuracy: true # Display accuracy percentage
show_wpm: true # Display words per minute

Available Languages

The languages/ directory has 200+ language files:

  • Natural languages: English, Spanish, French, German, Russian, Chinese, Japanese, Arabic, Hindi, etc.
  • Programming languages: Python, JavaScript, Go, Rust, C++, Java, TypeScript, etc.
  • Specialized sets: Medical terms, commonly misspelled words, contractions
  • Fun stuff: Lorem Ipsum, Pig Latin, Klingon, Toki Pona

Language files sourced from MonkeyType

Language File Format

{
  "name": "english",
  "noLazyMode": true,
  "orderedByFrequency": true,
  "words": ["the", "be", "of", "and", ...]
}

Building

# Build for current platform
go build -o ttt ./ttt

# Cross-compile for other platforms
GOOS=linux GOARCH=amd64 go build -o ttt-linux ./ttt
GOOS=windows GOARCH=amd64 go build -o ttt-windows.exe ./ttt
GOOS=darwin GOARCH=amd64 go build -o ttt-macos ./ttt

Dependencies

Contributing

Want to add a language or fix something? Cool!

  1. Fork the repo
  2. Make your changes
  3. Test it out
  4. Submit a pull request

To add a language, just create a JSON file in the languages/ directory following the existing format.

License

MIT License - see LICENSE file.

Credits

Happy typing!

About

A typing test that runs in your terminal

Topics

Resources

License

Stars

Watchers

Forks

Languages