![Header](./assets/github-header-banner.png)

> The above mascot is Squibbles (Scribbles) - He is generated by ChatGPT. If
> anyone wants to create a proper mascot, feel free to submit an issue 😄

<div align="center">

[![Built With Ratatui](https://img.shields.io/badge/Built_With_Ratatui-000?logo=ratatui&logoColor=fff)](https://ratatui.rs/)
[![Crate Badge]][Crate]
[![Discord Badge]][Discord]

</div>

OctoType is a TUI typing trainer made with [Ratatui], and powered by [Gladius] -
Heavily inspired by [Monkeytype], with a focus on customizability

![Demo](./assets/demo.gif)

> [!WARNING]
>
> This is still a **work in progress**. Breaking changes to Modes, Sources and
> the configuration might occur.

## 💡 Features

- 🎭 Custom [Modes](https://mahlquistj.github.io/octotype/docs/configuration/modes)
- 🖊️ Custom [Sources](https://mahlquistj.github.io/octotype/docs/configuration/sources)
- 🎨 Custom theming
- 📈 Pretty graphs
- 🪶 Lightweight (~2MB)
- 🔥 Blazingly fast (Sorry, i had to.. 🦀)
- .. And more to come!

## 🔽 Installation

Installing octotype can be done with the following methods:

### Cargo

`cargo install octotype`

### Nix

You can add OctoType as a Flake:

```nix
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    octotype.url = "github:mahlquistj/octotype/main";
  };
  
  outputs = { self, nixpkgs, rio }: {
    nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
      modules = [
        ({ pkgs, ... }: {
          environment.systemPackages = [
            octotype.packages.${pkgs.system}.octotype
          ];
        })
      ];
    };
  };
}
```

> [!NOTE]
> No package exists in nixpkgs _yet_.

## 🔖 Arguments

| Short       | Long               | Description                                    |
| ----------- | ------------------ | ---------------------------------------------- |
|             | `--print-config`   | Prints the current settings, modes, and source |
| `-p`        | `--print-settings` | Prints the current settings                    |
| `-c <path>` | `--config <path>`  | Overrides the default config location          |
| `-h`        | `--help`           | Shows a help page with the list of arguments   |

## ⚙️ Configuration

Check out the [Docs] for configuration options.

## 💻 Development

A nix [flake dev-shell](https://mahlquistj.github.io/octotype/docs/contributing/development/environment#nix-devshell) is provided to run with `nix develop`.

## ⭐ Contributing

If you have an idea, bug-report or alike, feel free to open an issue or a PR -
It's more than welcome!

> [!NOTE]
> I'm only developing this in my spare time, so don't expect immidiate replies 😄

## ❓ Why another typing-trainer?

It all started as a fun side-project to learn typing on my new [ZSA Moonlander]
keyboard. I was inspired by using [Monkeytype] a lot, but found that i was
missing more customizability when it came to what modes and words i could get.

## 🌠 Star History

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=mahlquistj/octotype&type=Date&theme=dark" />
  <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=mahlquistj/octotype&type=Date" />
  <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=mahlquistj/octotype&type=Date" />
</picture>

<!-- LINKS -->

[Monkeytype]: https://monkeytype.com/
[Ratatui]: https://ratatui.rs/
[Docs]: https://mahlquistj.github.io/octotype/
[ZSA Moonlander]: https://www.zsa.io/moonlander
[Gladius]: https://github.com/mahlquistj/gladius
[Crate]: https://crates.io/crates/octotype
[Crate Badge]: https://img.shields.io/crates/v/octotype
[Discord]: https://discord.gg/zk4SXvdUxj
[Discord Badge]: https://img.shields.io/discord/1416561228561776724?logo=discord&label=Discord


