An open API service indexing awesome lists of open source software.

https://github.com/emanuel2718/termitype

TUI typing game, inspired by a certain typing test you might know.
https://github.com/emanuel2718/termitype

rust terminal tui typing typing-game typing-practice typing-test typingtest

Last synced: 2 months ago
JSON representation

TUI typing game, inspired by a certain typing test you might know.

Awesome Lists containing this project

README

          

# 🦀 termitype

[![Crates.io](https://img.shields.io/crates/v/termitype.svg)](https://crates.io/crates/termitype)
[![Build Status](https://github.com/emanuel2718/termitype/workflows/CI/badge.svg)](https://github.com/emanuel2718/termitype/actions)
[![License: GPL-3](https://img.shields.io/badge/License-GPL3-blue.svg)](https://opensource.org/license/GPL-3.0)

**Feature-rich terminal typing test**


Heavily inspired by a certain typing test you might know.


Installation
·
Usage
·
Mappings
·
Options
·
Development
·
Contributing
·
Roadmap
·
Acknowledgments




Termitype demo

## Installation

### Quick Install

Install the latest pre-built binary for your platform (recommended):

```sh
curl -sSL https://raw.githubusercontent.com/emanuel2718/termitype/main/scripts/install.sh | bash
```

Binaries are available on the [GitHub releases page](https://github.com/emanuel2718/termitype/releases).

### Homebrew

```sh
brew tap emanuel2718/termitype
brew install termitype
```

### Arch Linux (AUR)

```sh
yay -S termitype
```

### From Crates.io

```sh
cargo install termitype
```

### From Source

```sh
cargo install --git https://github.com/emanuel2718/termitype.git termitype
```

## Usage

### Basic Usage

```sh
# Start typing
termitype

# See available CLI arg options (all options can also be configured via the in-game menu)
termitype --help
```

## Mappings

| Mapping | Mode | Action |
| -------------- | --------- | ----------------------------------- |
| `` | `Global` | Toggle Menu |
| `` | `Global` | Quit Application |
| `` | `Global` | Quit Application |
| `` | `Global` | Toggle Command Palette |
| `` | `Global` | Toggle Leaderboard Screen |
| `` | `Global` | Randomize Theme |
| `` | `Global` | Toggle Menu |
| `` | `Results` | Restart |
| `` | `Results` | Redo last test |
| `q` | `Results` | Quit Application |
| `m` | `Results` | Switch to `Minimal` Variant |
| `n` | `Results` | Switch to `Neofetch` Variant |
| `g` | `Results` | Switch to `Graph` Variant |
| `` | `Results` | Cycle to next ASCII Art |
| `` | `Results` | Cycle to previous ASCII Art |
| `` | `Menu` | Go back |
| `/` | `Menu` | Start Search |
| `/` | `Menu` | Confirm selection |
| `` | `Menu` | Toggle selection (if toggable item) |
| `/` | `Menu` | Next item |
| `/` | `Menu` | Previous item |
| `j/k` | `Menu` | Next/previous (in normal mode) |

## Options

| Option | Description |
| :--------------------------- | :---------------------------------------------------------------------------------------------- |
| `-t`, `--time ` | Test duration in seconds. Enforces Time mode |
| `-w`, `--words <"WORD1 ..">` | Custom words for the test. Enforces Word mode |
| `-c`, `--count ` | Number (count) of words to type |
| `-n`, `--use-numbers` | Include numbers in the test word pool |
| `-s`, `--use-symbols` | Include symbols in the test word pool |
| `-p`, `--use-punctuation` | Include punctuation in the test word pool |
| `-l`, `--language ` | Language dictionary the test will use |
| `--theme ` | The theme of the application |
| `--ascii ` | The ASCII art used in the `Neofetch` results |
| `--cursor ` | Cursor style variant: beam, block, underline, blinking-beam, blinking-block, blinking-underline |
| `--results <STYLE>` | Results style variant: minimal, neofetch, graph |
| `--lines <COUNT>` | Number of visible text lines [default: 3] |
| `--hide-live-wpm` | Hide live WPM counter |
| `--hide-notifications` | Hide notifications |
| `--no-save` | Do not save tests results |
| `--reset` | Resets everything back to default state |

### Examples

```sh
# All of the options below can also be changed at runtime via the menu.
termitype -t 60 # Run a 60-second typing test
termitype -c 100 # Test will contain exactly 100 random words
termitype --theme "catppuccin-mocha" # Use catppuccin-mocha theme
termitype -l spanish # Use Spanish test words
termitype -spn # Enable symbols, punctuation, and numbers
termitype --results neofetch # Use neofetch inspired results
termitype --no-save # Do not save tests results
termitype --hide-notifications # Do not show notifications
```

## Development

### Prerequisites

- Rust 1.88+
- Cargo

### Quick Start

1. **Clone the repository**:

```sh
git clone https://github.com/emanuel2718/termitype.git
cd termitype
```

2. **Run the application**:

```sh
# Development build
cargo run

# Release build
cargo run --release
```

## Themes

Termitype includes a curated collection of themes sourced from the [iTerm2 Ghostty Color Schemes Repo](https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/ghostty) repository. Themes can be previewed and changed in real-time.

## Contributing

> [!Warning]
> TODO: write out the contribution guideline just in the case there's one person interested in this.

## Roadmap

### Upcoming Features

- [ ] **Package Distribution**: Release on Homebrew, AUR, nixpkgs, etc.
- [ ] **User config file**: Have a user editable config file in `$XDG_CONFIG_HOME/termitype/config.toml`
- [ ] **Configurable Mappings**: Custom mappings
- [ ] **Custom ASCII arts**: Allow usage of custom ASCII arts
- [ ] **Custom theme**: Allow setting custom themes with names
- [ ] **Wordlist Improvements**: Improve the quality and distribution of words
- [ ] **Multiplayer**: Race other people in realtime with private rooms of sort (will use websockets for this)
- [x] **Local Results Tracking**: Track test results over time (best use case is to track highest WPM on specific modes) with opt-out option

## License

This project is licensed under the GPL-3.0 license - see [LICENSE](LICENSE) for details.

## Acknowledgments

- [Monkeytype](https://github.com/monkeytypegame/monkeytype) for the inspiration.
- [Ratatui](https://github.com/ratatui-org/ratatui) for the amazing TUI framework.
- [iTerm2 Ghostty Color Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/ghostty) for the themes.