SOBERGATE: a CLI that makes you pass a sobriety test before AI can code for you

SOBERGATE is a command-line tool that blocks AI coding assistants like Claude Code until you pass a simple mental check — and the AI cannot take the test for you. It was built by a developer tired of waking up to confusing commits left by their past, impaired self. It's a humorous but pointed take on the risks of letting AI tools run while you're not thinking clearly.

As AI coding tools get more powerful, it's become easier than ever to ship code even when you're exhausted or under the influence — the AI does the heavy lifting regardless of your state. The problem is the aftermath: commits filled with 'TODO: what was I thinking?' comments and logic that made sense at 2am but not in the morning.

SOBERGATE sits in front of Claude Code and other AI agents as a gatekeeper. Before any AI session starts, you must solve a short cognitive check (like a simple math problem or word prompt) directly in the CLI. It's designed so the AI cannot auto-complete or bypass it — a human must respond. The project leans more toward a clever joke than a serious productivity tool, but it surfaces a real question: should there be guardrails on when and how we let AI agents act on our behalf?

Key points

  • Blocks Claude Code and other AI coding agents until a human passes a quick sobriety check
  • The test is designed so AI cannot solve it automatically — you must answer yourself
  • Aims to prevent low-quality 'drunk commits' or confused late-night code sessions
  • Works with multiple AI coding agents including Claude Code and Cursor
  • More of a humorous experiment than a production-ready tool

Quick term guide

command-line tool
A program you interact with by typing text commands rather than clicking buttons.
command-line
A way to control a computer by typing commands instead of clicking buttons.
AI coding tool
Software that uses AI to help write, edit, or explain code.
AI coding agents
AI tools that can help write, edit, or organize software code.
AI coding agent
An AI tool that can write, edit, and run code from your instructions.
coding agents
AI programs designed to autonomously perform tasks like writing or fixing code.
coding agent
An AI tool that writes or edits code from a person’s instructions.
production-ready
Stable enough to be used by real users in a live service.

Sources covering this story (2)

Read original