DINO RUNNER: 一款可以让 AI 玩的终端游戏
安装
推荐用 pipx 安装,这样会把命令行工具放在独立环境里:
pipx install ai-dino-in-terminal
dino
也可以用 pip 安装:
pip install ai-dino-in-terminal
dino
快速开玩
手动玩
dino # 或者 `dino play`
AI 玩
1.AI 模式,不指定 provider。
# 1. 完成安装
# 2. 判断执行模式:
# 2.1. Codex 安装 + 本地已经配置 ak:询问使用哪种模式。
# 2.2. Codex 安装,本地未配置 ak:使用 CODEX 模式。
# 2.3. Codex 未安装,本地已经配置 ak:使用 API 模式。
# 2.4. Codex 未安装,本地未配置 ak:进入 setup 流程。
dino play --llm
- AI 模式,指定 provider 为本地 Codex。
# 1. 安装完成
# 2. 判断本地 Codex 是否安装(符合版本要求)
# 2.1. Codex 安装,进入游戏。
# 2.2. Codex 未安装,提示安装,终止游戏。
dino play --llm codex
- AI 模式,指定 provider 为 API (OpenAI Response)。
# 1. 安装完成,开始玩
# 2. 判断本地配置文件:
# 2.1. 已经配置 ak,进入游戏。
# 2.2. 未配置 ak,进入 setup 配置流程。
dino play --llm api
其他玩法
保存游戏记录
结束一局游戏后,可以选择保存本局记录。后续可以回放或者在竞技模式中使用。
观看回放
通过 dino replay 选择一局游戏记录回放。
竞技模式
通过 dino compete 选择一局游戏记录,可以一边看回放一边跟玩。
查看游戏数据
使用 dino dashboard 命令查看得分和 token 消耗情况。
完整指令说明
| 命令 | 说明 | 依赖 |
|---|---|---|
dino / dino play |
手动操作恐龙 | 无 |
dino play --llm |
自动选择 API 或 CODEX 模式 | API 配置或 Codex CLI |
dino play --llm api |
使用 OpenAI Responses API 决策 | ~/.config/ai-dino-in-terminal/config.json 或启动时交互输入 |
dino play --llm codex |
使用本地 Codex CLI 决策 | Codex CLI,且版本满足要求 |
dino play --llm --debug |
使用 LLM 决策并写 JSONL 调试日志 | logs/*.jsonl |
dino dashboard |
查看带动画 banner 的累计得分和 token dashboard | ~/.config/ai-dino-in-terminal/game_records.jsonl |
dino replay |
从历史运行记录列表选择并重放 | ~/.config/ai-dino-in-terminal/replays/*.json |
dino replay +list |
浏览所有 replay 文件,回车查看元信息 | ~/.config/ai-dino-in-terminal/replays/*.json |
dino replay +clear |
清除所有 replay 记录文件 | ~/.config/ai-dino-in-terminal/replays/*.json |
dino compete |
从历史运行记录列表选择一局并进入双赛道竞技 | ~/.config/ai-dino-in-terminal/replays/*.json |
dino config |
查看本地 LLM 配置(API key 脱敏显示) | 无 |
dino config +setup |
交互式写入本地 API LLM 配置 | API key / base_url / model |
dino setup |
交互式写入本地 API LLM 配置 | API key / base_url / model |
dino config +reset |
重置本地 LLM 配置 | 无 |
dino help |
查看可用命令和公共参数 | 无 |
运行要求
- Python 3.11+
- 支持
curses的终端环境 - 游戏本身无第三方运行时依赖
本地文件写入
| 数据类型 | 存放目录 |
|---|---|
| 配置数据 | ~/.config/ai-dino-in-terminal/config.json |
| 游戏数据 (累计得分、token用量) | ~/.config/ai-dino-in-terminal/game_records.jsonl |
| 最高分记录 | ~/.config/ai-dino-in-terminal/scores.json |
| 回放数据 | ~/.config/ai-dino-in-terminal/replays/*.json |
运行日志(--debug 时打印) |
当前工作目录下的 logs/*.jsonl |
Metadata
Release files for ai-dino-in-terminal 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_dino_in_terminal-0.1.1.tar.gz | 70.5 kB | Without provenance | Details for ai_dino_in_terminal-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_dino_in_terminal-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for ai_dino_in_terminal-0.1.1-py3-none-any.whl |
Total release size: 122.1 kB
Release files / ai_dino_in_terminal-0.1.1.tar.gz
| Download URL | ai_dino_in_terminal-0.1.1.tar.gz |
|---|---|
| Size | 70.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f2ab3cb9d367272f5a840ab1dce9d8bb6c656b8b8f46677c398f9513feddbac
|
|
BLAKE2b-256 checksum How to use checksums |
47408d46e2de1d4c38db019be48b0d80ec1cfea967c33fce0c5427f142d561c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / ai_dino_in_terminal-0.1.1-py3-none-any.whl
| Download URL | ai_dino_in_terminal-0.1.1-py3-none-any.whl |
|---|---|
| Size | 51.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f62c8309bb023482eb1556df183298e3edd00256c6404f2cda2a6a22d9f0876a
|
|
BLAKE2b-256 checksum How to use checksums |
bc74f9cf3d3b762679e2de9f844bb6e3846ce76ca239d36079598f50a017efa4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for ai-dino-in-terminal 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.