+
Skip to content

Tom94/ttt

Repository files navigation

terminal typing test

ttt is a terminal program to test your typing speed, written in C++. Supports code (auto indentation) and unicode (all languages of the world).

How to run

Simply pipe the text you'd like to type into ttt.

screencap.mov

Or generate a random typing test:

  • Quotes: ttt -q picks a random quote from the included list (courtesy of tt)
  • Words: ttt -n 20 picks 20 random words from the included list (courtesy of tt)
  • AI: a language model generates text, e.g., via aichat.
$ aichat "Short poetic paragraph about space travel." | ttt --wrap 80
Red dust fell behind as the ship cut through Mars' orbit. Stars beckoned. The
void stretched endless and dark. We sailed on.

Time: 0:10, WPM: 143, Accuracy: 100.00% 🎉

Options

  • -q, --quote [LISTNAME] to use a random quote [optional: name of quote list (default: en)]
  • -n, --nwords N [LISTNAME] to generate N random words [optional: name of word list (default: 1000en)]
  • -t, --tab WIDTH to set the tab width (default: 4)
  • -w, --wrap WIDTH to word wrap to the given width (default: wrap to terminal width)
  • -h, --help to show help info
  • -v, --version to show version info

Shortcuts

These shortcuts are available while typing:

  • Ctrl+C or Esc to abort the test
  • Ctrl+W or Ctrl+Backspace to delete the last word
  • Ctrl+R to reset the test

How to build

This project uses CMake and has otherwise no dependencies. To download and build it, run the following commands:

$ git clone https://github.com/tom94/ttt
$ cmake -B build
$ cmake --build build

How it was made

I wanted to play around with AI-assisted coding and creating ttt seemed like a fun way to do it. Ergo: this project was in big parts written by AI (maybe 50%?), with me stepping in to fix bugs, making higher-level decisions about tooling and dependencies, etc. It's amazing how far these large language models have come!

I used neovim with the avante plugin, but if you're not already in the vim ecosystem, you can do the same in cursor.

TODO

  • Better (configurable?) colors
  • Windows support
  • Squash bugs as they appear

Shoutouts

  • aichat: the perfect companion to ttt.
  • unilib: for making unicode handling a breeze.
  • tt: another terminal typing test. ttt is inspired by tt and uses its word and quote lists.

License

GPLv3, because why not.

About

terminal typing test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载