"Until death, all defeat is psychological"

I built coolcode to give developers an autonomous, terminal-native AI coding partner that lives directly in their command line. Inspired by tools like OpenCode, I wanted an agent that seamlessly integrates into real-world developer workflows without heavy web wrappers.
To prevent destructive hallucinations, I architected a dual-mode engine: PLAN and BUILD. PLAN mode strictly enforces read-only codebase exploration, letting developers review and approve the technical approach before BUILD mode modifies any local files or executes bash scripts.
Under the hood, I structured the platform as a Bun monorepo. A centralized Hono API manages Clerk authentication, Prisma-backed PostgreSQL session persistence, and Polar usage-based credit metering, routing model queries through OpenRouter for seamless multi-model flexibility.
For the terminal UI, I utilized OpenTUI with React to create a smooth, keyboard-driven interface. It streams assistant tokens, displays live tool execution steps, and synchronizes conversation state seamlessly with the remote server.
The result is a production-grade developer tool combining cloud-backed intelligence and persistence with native local execution speed and security.