HeadlinesBriefing favicon HeadlinesBriefing.com

Ghost CLI: AI-Powered Git Commits That Capture Intent

Hacker News •
×

Ghost is a CLI tool that fundamentally reimagines the git workflow by committing prompts instead of code. Rather than tracking byte-level changes, Ghost records the human intent behind each commit, with AI agents generating the actual implementation. The tool supports multiple AI providers including Claude, Gemini, Codex, and OpenCode, allowing developers to swap agents per-commit or set defaults.

Each Ghost commit captures both the prompt and its output, creating a reproducible chain of intent in your git history. A commit like 'add JWT authentication middleware' becomes a permanent record of what you wanted to accomplish, not just what changed. The system works by generating code from your prompt, staging only modified files, and committing with enriched metadata including the agent, model, session ID, and affected files.

The enriched commit format preserves critical context: the exact prompt, which AI agent was used, the specific model version, and a unique session identifier. This transforms your git log from a diff summary into a design document that reads like a narrative of architectural decisions. Ghost also supports dry-run mode for previewing changes without committing and can bypass AI entirely when needed.