> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/unhappychoice/gittype) · [上游 README](https://github.com/unhappychoice/gittype/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
把你自己的源代码变成打字挑战。
让 AI 知道谁才是老大——只有你、你的键盘,还有你写过的那些「罪证」代码。
## 功能特性 ✨
- 🦀🐍⚡🐹💎🍎🎯☕🐘#️⃣🔧➕🎭🎯⚡💧📡 **多语言支持**:Rust、TypeScript、JavaScript、Python、Go、Ruby、Swift、Kotlin、Java、PHP、C#、C、C++、Haskell、Dart、Scala、Clojure、Elixir、Erlang、Zig(更多语言即将加入!)
- 📊 **实时指标**:打字时实时追踪 WPM(每分钟字数)、准确率和稳定性
- 🏆 **排名系统**:从「Hello World 新手」到「量子计算机」,解锁开发者称号并附带 ASCII 艺术
- 🎮 **多种游戏模式**:普通、限时挑战,以及自定义难度等级(从简单到禅意)
- ⏸️ **暂停/继续**:随时休息,不会毁掉你的统计数据
- 🎯 **你自己的代码**:练习你真实项目中的函数,而不是无聊示例
- 🔥 **热门仓库**:用每日更新的 GitHub 热门仓库来练习
- 🎨 **15+ 主题**:内置深色/浅色主题,并支持自定义主题
## 安装 📦
### 快速安装(推荐)
#### 一行命令安装(Linux/macOS/Windows)
```bash
curl -sSL https://raw.githubusercontent.com/unhappychoice/gittype/main/install.sh | bash
```
#### 或指定版本安装
```bash
curl -sSL https://raw.githubusercontent.com/unhappychoice/gittype/main/install.sh | bash -s -- --version v0.5.0
```
### Homebrew(macOS/Linux)
```bash
brew install gittype
```
### Cargo(通用)
```bash
cargo install gittype
```
### Nix(NixOS/Nix)
如果你已安装 [Nix](https://nixos.org/)),可以直接运行 GitType:
```bash
# Stable version (recommended)
nix run github:unhappychoice/gittype
# Development version (latest from main branch)
nix run github:unhappychoice/gittype#unstable
```
### 二进制下载
从我们的 [发布页](https://github.com/unhappychoice/gittype/releases/latest).) 获取适用于你平台的预编译二进制文件。
可用平台:
- `x86_64-apple-darwin`(Intel Mac)
- `aarch64-apple-darwin`(Apple Silicon Mac)
- `x86_64-unknown-linux-gnu`(Linux x64)
- `aarch64-unknown-linux-gnu`(Linux ARM64)
- `x86_64-pc-windows-msvc`(Windows)
## 快速开始 🚀
```bash
# cd into your messy codebase
cd ~/that-project-you-never-finished
# Start typing your own spaghetti code (uses current directory by default)
gittype
# Or specify a specific repository path
gittype /path/to/another/repo
# Clone and play with any GitHub repository
gittype --repo clap-rs/clap
gittype --repo https://github.com/ratatui-org/ratatui
gittype --repo git@github.com:dtolnay/anyhow.git
# Discover and practice with trending GitHub repositories
gittype trending # Browse trending repos interactively
gittype trending rust # Filter by language (Rust)
# Play with cached repositories interactively
gittype repo play
```
## 为什么选择 GitType?🤔
- **上班看起来很忙** → 「我在研究代码库」(技术上也没错!)
- **击败 AI 霸主** → 打得比 ChatGPT 生成还快
- **别再打无聊内容** → 你自己的 bug 比 lorem ipsum 有趣多了
- **发现被遗忘的宝藏** → 去年凌晨 3 点写下的那个优雅函数
- **专业级拖延** → 这是代码审查,但做成了游戏!
- **直面你的遗留代码** → 终于敢面对那些让你不好意思的变量名
- **调试你的打字技能** → 因为 `pubic static void main` 再也不是手误了
- **疗愈式代码重温** → 一路打回你的编程历程,眼泪也算在内
- **攀登开发者阶梯** → 从「Code Monkey」到「Quantum Computer」——每个等级都配有精美 ASCII 艺术
*「说白了,你需要一个逃避真正工作的借口,而这个借口相当不错。」*
## 文档 📚
当游戏变得过于上瘾时,这些文档正好派上用场:
- **[安装](docs/installation.md)** - `cargo install` 然后放松
- **[用法](docs/usage.md)** - 满足你一切心愿的 CLI 参数
- **[游玩指南](docs/playing-guide.md)** - 游戏模式、计分与等级
- **[主题](docs/themes.md)** - 15+ 内置主题与自定义主题创建
- **[语言](docs/supported-languages.md)** - 我们提取什么以及怎么提取
- **[贡献](docs/CONTRIBUTING.md)** - 加入键盘战士行列
- **[架构](docs/ARCHITECTURE.md)** - 给好奇的人
## 截图 📸











## 相关项目 🎨
更喜欢看代码而不是打字?看看 [**Gitlogue**](https://github.com/unhappychoice/gitlogue))——一款终端屏保,用逼真的打字效果动画呈现你的 Git 提交历史。
## 许可证 📄
[MIT](LICENSE) - 因为分享就是关爱(也是法律要求)
---
*由一群厌倦打「hello world」的开发者,用 ❤️ 和过量咖啡因打造*
## 作者
[@unhappychoice](https://unhappychoice.com))
## 支持
如果你觉得这个项目有用,请考虑:
- ⭐️ [在 GitHub 上 Star](https://github.com/unhappychoice/gittype))
- 🐦 [分享到 X](https://x.com/intent/post?text=gittype%3A%20a%20CLI%20typing%20game%20that%20uses%20your%20own%20source%20code%20as%20practice%20text%20%F0%9F%8E%AE&url=https%3A//github.com/unhappychoice/gittype&hashtags=gittype,CLI,Rust,typing))
- 🦋 [分享到 Bluesky](https://bsky.app/intent/compose?text=gittype%3A%20a%20CLI%20typing%20game%20that%20uses%20your%20own%20source%20code%20as%20practice%20text%20%F0%9F%8E%AE%20%23gittype%20%23CLI%20%23Rust%20%23typing%20https%3A//github.com/unhappychoice/gittype))
- 🧵 [分享到 Threads](https://www.threads.net/intent/post?text=gittype%3A%20a%20CLI%20typing%20game%20that%20uses%20your%20own%20source%20code%20as%20practice%20text%20%F0%9F%8E%AE%20%23gittype%20%23CLI%20%23Rust%20%23typing%20https%3A//github.com/unhappychoice/gittype))
- 💼 [分享到 LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A//github.com/unhappychoice/gittype))
- 📘 [分享到 Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A//github.com/unhappychoice/gittype))
- 🟧 [提交到 Hacker News](https://news.ycombinator.com/submitlink?u=https%3A//github.com/unhappychoice/gittype&t=gittype%3A%20a%20CLI%20typing%20game%20that%20uses%20your%20own%20source%20code%20as%20practice%20text%20%F0%9F%8E%AE))
- 💬 发到你所在的 Discord 服务器或开发者群聊
- ✍️ 写在你的博客或 newsletter 里
每一份支持都有帮助。谢谢!