I Built a Tamagotchi for Developers — It Lives in VS Code and Judges Your Work Ethic

I Built a Tamagotchi for Developers — It Lives in VS Code and Judges Your Work Ethic

我为开发者打造了一款电子宠物——它住在 VS Code 里,还会评判你的工作态度

I have a problem: I will happily grind 40 hours in a game for a meaningless achievement, but ask me to stay focused through one afternoon of debugging and my brain files for divorce. So I did the obvious thing. I put the game inside the work. 我有一个毛病:为了游戏里一个毫无意义的成就,我可以心甘情愿地肝上 40 个小时;但如果让我专注一下午去调试代码,我的大脑就会直接“闹离婚”。于是,我做了一件显而易见的事:把游戏塞进工作里。

DevGotchi is a free VS Code extension that turns your editor into a cyberpunk RPG. A little developer avatar lives in your side panel. It has stats — Focus, Motivation, Energy, Health — and they decay in real time while you code. Save files, push commits, fix bugs, and you earn XP and Coffee Beans. Let your stats rot and your dev hits burnout: the UI glitches red, your actions lock, and the only way out is taking a break or drinking a coffee. Yes, it’s a Tamagotchi. Yes, it works on me. That’s the part that bothers me. DevGotchi 是一款免费的 VS Code 插件,它能将你的编辑器变成一款赛博朋克风格的 RPG 游戏。你的侧边栏里会住着一个小小的开发者化身。它拥有“专注度”、“动力”、“精力”和“健康值”等属性,这些属性会在你写代码时实时衰减。保存文件、推送提交、修复 Bug,你就能获得经验值(XP)和咖啡豆。如果你任由属性下降,你的化身就会陷入“职业倦怠”:界面会闪烁红光,操作会被锁定,唯一的解法就是休息或者喝杯咖啡。没错,这就是个电子宠物。没错,它对我确实有效。而这正是我感到困扰的地方。

The loop: Install it, run DevGotchi: Open Panel, and you’re playing. There’s a tutorial, but the whole game is: Code normally. Everything you already do earns XP. Watch four stats decay. Keep them fed with actual productive behavior. Hit zero health and you’re in burnout — a real mechanic with consequences, not a number going down. The avatar’s mood shifts as you work: 🚀 Productive → 😰 Stressed → 😴 Tired → 💀 Burnt Out. Recovering from full burnout earns you the “Back from the Edge” achievement, which I maintain is the most honest badge in software. 游戏循环很简单:安装它,运行 DevGotchi:打开面板,你就开始游戏了。虽然有教程,但整个游戏的核心就是:像往常一样写代码。你所做的每一件事都能获得经验值。观察四项属性的衰减,通过实际的生产行为来维持它们。一旦健康值归零,你就会陷入“职业倦怠”——这是一种带有实际后果的机制,而不仅仅是数字的下降。化身的情绪会随着你的工作状态而改变:🚀 高效 → 😰 压力大 → 😴 疲惫 → 💀 倦怠。从完全倦怠中恢复过来,你将获得“死里逃生”(Back from the Edge)成就,我坚持认为这是软件开发领域最诚实的勋章。

The parts I’m proudest of: 我最引以为傲的部分:

Focus Sprints — a real Pomodoro timer with stakes. 15, 25, or 50 minutes. You get 1.5× XP on everything while it runs, and finishing pays a completion bonus. Cancel early and you forfeit it. It’s the same incentive structure as a real Pomodoro, except now there’s a little guy depending on you. 专注冲刺(Focus Sprints)——一个带有赌注的真实番茄钟。你可以选择 15、25 或 50 分钟。在计时期间,你获得的所有经验值都是 1.5 倍,完成任务还有额外奖励。如果中途取消,奖励就会作废。它的激励机制和普通的番茄钟一样,只不过现在有一个小家伙在指望着你。

The Bug Boss — this one’s my favorite. When you have active lint or build errors, the boss card becomes a real boss with HP tied 1:1 to your error count. Ten errors? That’s an Overwhelmulus with 10 HP. Every error you fix deals damage. Clear them all and the boss is defeated. I have never wanted to fix lint errors this badly in my life, and I’ve been programming for years. Bug Boss(Bug 大魔王)——这是我最喜欢的功能。当你存在活跃的 Lint 错误或构建错误时,Boss 卡片就会变成一个真正的 Boss,其生命值与你的错误数量 1:1 挂钩。有十个错误?那就是一个拥有 10 点生命值的“压力怪”。你修复的每一个错误都会对它造成伤害。全部清除,Boss 就会被击败。我写了这么多年代码,从来没有像现在这样渴望修复 Lint 错误。

Team Mode — no server, no accounts, no telemetry (nothing in DevGotchi ever phones home). Team progress syncs entirely through git: your save lives in .devgotchi/team/.json and you commit it yourself. Once there’s more than one teammate, you get a Team Raid Boss: a shared HP bar of the team’s combined error count. Clear it together. First person to check after the win gets a bonus. 团队模式——无需服务器、无需账号、无需遥测(DevGotchi 绝不会向外发送任何数据)。团队进度完全通过 Git 同步:你的存档保存在 .devgotchi/team/.json 中,由你自己提交。当团队成员超过一人时,就会出现“团队副本 Boss”:一个基于团队总错误数量的共享生命值条。大家一起清除错误吧。获胜后第一个检查的人还能获得额外奖励。

There’s also a skill tree, a shop with 8 skins (my dev is currently a Debug Ninja 🥷), daily quests, mini-games, 13 achievements, a GitHub-style activity heatmap, procedurally synthesized cyberpunk music (Web Audio API, zero audio files), weekly recaps, vacation mode so a holiday doesn’t nuke your streak, and a shareable stats card you can export as a PNG or paste into your GitHub README. 此外,还有技能树、拥有 8 款皮肤的商店(我的开发者目前是“调试忍者”🥷)、每日任务、小游戏、13 个成就、GitHub 风格的活动热力图、程序合成的赛博朋克音乐(使用 Web Audio API,无需任何音频文件)、每周回顾、防止假期中断连胜的“度假模式”,以及可以导出为 PNG 或粘贴到 GitHub README 中的可分享状态卡片。

Why free, why no telemetry? Because the whole point is trust. A productivity tool that watches you work has to earn that. Everything runs locally. Your progress is a JSON file you can export. There is no account to create and no server that wants your data. 为什么免费?为什么没有遥测?因为核心在于信任。一个监视你工作的生产力工具必须赢得这种信任。一切都在本地运行。你的进度就是一个可以导出的 JSON 文件。无需创建账号,也没有服务器会觊觎你的数据。

Try it: It’s on the VS Code Marketplace — free, obviously. The repo is on GitHub and I read every issue. 试试看:它已经在 VS Code 市场上线了——当然是免费的。代码仓库在 GitHub 上,我会阅读每一个 Issue。

https://marketplace.visualstudio.com/items?itemName=JohnFacey.vscode-devgotchi

Keep your developer alive, your streak unbroken, and your coffee cup full. ☕ 保持你的开发者存活,保持你的连胜不断,并让你的咖啡杯永远满着。☕