catime
AI 生成的每小時貓咪圖片,每小時誕生一隻新貓! 🐱
每小時,GitHub Actions 會透過 Google Gemini 自動生成一張獨特的貓咪圖片,上傳到 GitHub Release,並發佈到月度 issue。103+ 種藝術風格——從浮世繪到賽博龐克到刺繡微縮模型。每隻貓都有自己的故事。
🌐 圖庫: yazelin.github.io/catime
📲 Telegram: @catime_yaze — 每小時自動發圖
📦 PyPI: catime
🧩 OpenClaw 技能: clawhub install catime
贊助
如果你喜歡 catime,歡迎透過 Buy Me a Coffee 贊助本專案 ☕
所有贊助收入將用於 API 費用、運算資源與專案維護。詳見 SPONSORS.md。
安裝與使用
pip install catime
catime # 顯示貓咪總數
catime latest # 查看最新的貓
catime 42 # 查看第 42 號貓
catime today # 列出今天的貓
catime yesterday # 列出昨天的貓
catime 2026-01-30 # 列出某天的所有貓
catime 2026-01-30T05 # 查看某小時的貓
catime --list # 列出所有貓
catime view # 在瀏覽器開啟貓咪圖庫(localhost:8000)
catime view --port 3000 # 自訂連接埠
不安裝直接執行:
uvx catime latest
運作原理
| 元件 | 說明 |
|---|---|
| 圖片生成 | 可切換。預設:nanobanana-py 搭配 gemini-3-pro-image-preview(備用:gemini-2.5-flash-image)。選用:自架的 codex-image-service(OpenAI Codex CLI 後端 + FastAPI),把 repo variable CAT_IMAGE_GENERATOR 設成 codex 就會切換。 |
| 圖片存放 | GitHub Release assets |
| 貓咪圖庫 | 每月 GitHub issue(自動建立) |
| 元資料 | repo 中的 catlist.json |
| 網頁圖庫 | GitHub Pages 瀑布流排版 |
| 排程 | GitHub Actions cron,每小時執行 |
角色
catime 有固定出場的貓咪角色,各有獨特的外型與個性:
- 墨墨(Momo) — 優雅的純黑短毛貓,金琥珀色眼睛,左耳戴小金耳環
- Captain — 身經百戰的橘色虎斑冒險家,左耳有缺口
- 麻糬(Mochi) — 圓滾滾的奶油白波斯貓,永遠一臉想睡
- 鈴鈴(Lingling) — 活潑好動的銀色虎斑幼貓,寶石藍眼睛
自行架設
- Fork 或 clone 這個 repo
- 進 GitHub
Settings → Secrets and variables → Actions,依你要用的後端加入對應的值
預設(Gemini / nanobanana)必要
| 種類 | 名稱 | 值 |
|---|---|---|
| Secret | GEMINI_API_KEY |
Google AI Studio 的 key |
| Secret | GEMINI_WEB_BASE_URL |
(選填) 自架的 gemini-web 代理,例如 https://ching-tech.ddns.net/gemini-web |
| Secret | TELEGRAM_BOT_TOKEN |
(選填) 同步發到 Telegram 頻道 |
設好之後 workflow 會自動建立月度 issue 與 cats release。
選用:把「最後一步產圖」改走 codex-image-service
跳過 nanobanana / Gemini 那步的產圖,改用自架的
codex-image-service(OpenAI Codex CLI 包在
FastAPI 後面)。前面的 Gemini 鏈(新聞 → 構圖 → 寫 prompt)完全不動,只換最後「把
prompt 變成像素」這一步。
| 種類 | 名稱 | 值 |
|---|---|---|
| Secret | CODEX_IMAGE_KEY |
從 codex-image-service admin 後台發出來的 cimg_* |
| Secret | CODEX_IMAGE_BASE_URL |
https://ching-tech.ddns.net/codex-image(或你自己的部署) |
| Variable | CAT_IMAGE_GENERATOR |
設成 codex 才會切過去;留空或 nanobanana 保持 Gemini |
| Variable | CODEX_IMAGE_MODEL_LABEL |
(選填) gallery 紀錄裡的 model 欄要顯示什麼。預設 gpt-image-2 (codex-image-service / $imagegen)。 |
底層其實是 Codex CLI 的 $imagegen skill 在跑內建的 image_gen 工具,預設模型是
gpt-image-2,吃的是主機 ChatGPT 訂閱的配額而不是 OpenAI Images API。要是
你改了底層或想換個標籤,設 CODEX_IMAGE_MODEL_LABEL 之後新的貓記錄就會用新名字。
切換後端只要在 GitHub UI 改 CAT_IMAGE_GENERATOR 這個 repository variable,不用
commit。
CAT_IMAGE_GENERATOR=codex 時若 codex backend 掛掉(key 吊銷、服務下線、超時、網
路問題等等),腳本會自動退回 nanobanana / Gemini,那個整點還是出得了貓。退回的記錄
會把 gallery entry 的 model 欄寫成 <gemini 模型> (fallback from codex: <錯誤原因>),讓
你之後追得到當時為什麼退;只有當兩條路都掛時,那一筆才會標 failed、workflow 紅燈。
吊銷的 key 回 403、沒帶 key 回 401;隨時可以從 codex-image-service 後台 Disable 或 Delete。
授權
MIT
Metadata
Release files for catime 0.4.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| catime-0.4.10.tar.gz | 5.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| catime-0.4.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 MB
Release files / catime-0.4.10.tar.gz
| Download URL | catime-0.4.10.tar.gz |
|---|---|
| Size | 5.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
757c51d88421c425be7afaedd06cdf1e924f4ef3c4c0ff669c60f211d110f9db
|
|
BLAKE2b-256 checksum How to use checksums |
d78aad31e38e84f9fe6e940d92b99f540dbe61f03cb9dfb176f802f8db64affe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / catime-0.4.10-py3-none-any.whl
| Download URL | catime-0.4.10-py3-none-any.whl |
|---|---|
| Size | 3.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4888d52b7a721551f51d867244c2b6c59667167ecb723926f42d347a6e63118a
|
|
BLAKE2b-256 checksum How to use checksums |
cae8328f26804d6ea22df1b5ae7f9928dc0824f244f2da253a4dd79dbe4c1b24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|