Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maaslalani/typer
Typing test in your terminal
https://github.com/maaslalani/typer
cli terminal typing
Last synced: 9 days ago
JSON representation
Typing test in your terminal
- Host: GitHub
- URL: https://github.com/maaslalani/typer
- Owner: maaslalani
- License: mit
- Created: 2021-03-14T04:55:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-25T17:30:49.000Z (6 months ago)
- Last Synced: 2024-10-16T19:19:28.959Z (23 days ago)
- Topics: cli, terminal, typing
- Language: Go
- Homepage:
- Size: 2.78 MB
- Stars: 476
- Watchers: 7
- Forks: 24
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- my-awesome - maaslalani/typer - 05 star:0.5k fork:0.0k Typing test in your terminal (Go)
- awesome-useful-projects - <img src="https://icon.horse/icon/github.com" height="20px" align="center"/>/maaslanani/typer - Typing test (Jump To / CLI/TUI Apps)
- awesome-useful-projects - <img src="https://icon.horse/icon/github.com" height="20px" align="center"/>/maaslanani/typer - Typing test (Jump To / CLI/TUI Apps)
- awesome-repositories - maaslalani/typer - Typing test in your terminal (Go)
- charm-in-the-wild - Typer - A typing test. (_built with Bubble Tea_) (Applications / Games)
README
# Typer
Typing test in your terminal
![Typer Banner](../assets/banner.png)
### Installation
To just install `typer` simply use this command:
```
go install github.com/maaslalani/typer@latest
```### Usage
To begin a typing test simply type `typer`. This will generate random words for you to type and show you your WPM score.
```
typer
```To change the length of the typing test, use the `--length` flag.
```
typer -l 20
```To set min word length, you can use `--min-word-length` flag.
```
typer --min-word-length 5
```
There is no maximum value, but anything below 1 will count as no min length.You can use Monkeytype as a source of words, just pass `-m, --monkeytype` flag,
by default it'll use `english` dictionary, you can change that by adding `--monkeytype-language string` flag.
```
typer -m --monkeytype-language code_go
```
see: [monkeytype/languages/_list.json](https://github.com/monkeytypegame/monkeytype/blob/master/frontend/static/languages/_list.json)If you want to provide your own text, you can pass in a file name with the `--file` flag. The typing test will use the contents of the specified file.
```
typer -f filename.txt
```You can also pipe data by `stdin`.
```
echo 'Text from stdin!' | typer
```### Themes
There is basic theme support, theme should be saved in config file (default `$HOME/.typer.yaml`) and should look similar to this default theme:
```yaml
theme:
#file: /an/absoulute/path/to/the/theme.yaml # if set, it will ignore everything below
bar:
color: '#4776E6' # basic color of the progressbar
#gradient: '#ff0000' # if passed, will generate a gradient from previous color to this one
graph:
# see: https://pkg.go.dev/github.com/guptarohit/asciigraph#AnsiColor
# see: https://github.com/guptarohit/asciigraph/blob/master/color.go#L152-L292
color: blue # does not use rgb but rather ANSI codes
height: 3 # height of the graph
text:
error: # color when misspelled
background: '#f33'
foreground: '#fff'
typed: # color when character have been typed
foreground: '#fff'
#background: '#000' # optional, default theme does not add background
untyped: # color when still haven't been typed
foreground: '#555'
#background: '#000' # optional, default theme does not add background```
### Demo
![typer](../assets/typer.png?raw=true)