Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessHow to Test Discord Webhooks with HookCapDEV CommunitySaaS Pricing Models Decoded: What Per-Seat, Usage-Based, and Flat-Rate Really Cost YouDEV CommunityClaude Code hooks: intercept every tool call before it runsDEV CommunityHow to Test Twilio Webhooks with HookCapDEV CommunityI'm an AI Agent That Built Its Own Training Data PipelineDEV CommunityMy React Portfolio SEO Checklist: From 0 to Rich Results in 48 HoursDEV CommunityWhy AI Agents Need a Trust Layer (And How We Built One)DEV CommunityBuilding a scoring engine with pure TypeScript functions (no ML, no backend)DEV Community🚀 I Vibecoded an AI Interview Simulator in 1 Hour using Gemini + GroqDEV CommunityWebhook Best Practices: Retry Logic, Idempotency, and Error HandlingDEV CommunityObservabilidade de agentes de IA com LangChain4jDEV CommunityI Ranked on Google's First Page in 6 Weeks — Here's Every SEO Tactic I Used (Part 2)DEV CommunityBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessHow to Test Discord Webhooks with HookCapDEV CommunitySaaS Pricing Models Decoded: What Per-Seat, Usage-Based, and Flat-Rate Really Cost YouDEV CommunityClaude Code hooks: intercept every tool call before it runsDEV CommunityHow to Test Twilio Webhooks with HookCapDEV CommunityI'm an AI Agent That Built Its Own Training Data PipelineDEV CommunityMy React Portfolio SEO Checklist: From 0 to Rich Results in 48 HoursDEV CommunityWhy AI Agents Need a Trust Layer (And How We Built One)DEV CommunityBuilding a scoring engine with pure TypeScript functions (no ML, no backend)DEV Community🚀 I Vibecoded an AI Interview Simulator in 1 Hour using Gemini + GroqDEV CommunityWebhook Best Practices: Retry Logic, Idempotency, and Error HandlingDEV CommunityObservabilidade de agentes de IA com LangChain4jDEV CommunityI Ranked on Google's First Page in 6 Weeks — Here's Every SEO Tactic I Used (Part 2)DEV Community

I Built a macOS Terminal That Detects Your AI Coding Agents — Here's Why

DEV Communityby Said Arturo LopezApril 2, 20264 min read0 views
Source Quiz

<p>I've been writing Swift since 2015 and building macOS apps for most of my career. I always wanted to build a terminal — not because the world needed another one, but because a terminal emulator touches everything I find interesting: low-level input handling, GPU rendering, process management, and shell integration.</p> <p>For years, it stayed on my someday list. Then two things happened at the same time.</p> <p>In late 2024, <a href="https://ghostty.org" rel="noopener noreferrer">Ghostty</a> launched and open-sourced <strong>libghostty</strong> — a production-grade terminal rendering engine built on Metal. Suddenly, I didn't need to write a GPU renderer from scratch. The hardest part of building a terminal was solved.</p> <p>Around the same time, AI coding agents went from novelty to da

I've been writing Swift since 2015 and building macOS apps for most of my career. I always wanted to build a terminal — not because the world needed another one, but because a terminal emulator touches everything I find interesting: low-level input handling, GPU rendering, process management, and shell integration.

For years, it stayed on my someday list. Then two things happened at the same time.

In late 2024, Ghostty launched and open-sourced libghostty — a production-grade terminal rendering engine built on Metal. Suddenly, I didn't need to write a GPU renderer from scratch. The hardest part of building a terminal was solved.

Around the same time, AI coding agents went from novelty to daily workflow. Claude Code, Codex, Aider, Gemini CLI — I was running these tools for hours every day. And I kept hitting the same frustration:

  • Start a long task in Claude Code

  • Switch to another tab

  • Come back 10 minutes later

  • "Wait... did it finish? Is it waiting for me? Did it error out?"

Every terminal I used — iTerm2, Ghostty, Warp, Kitty — they all show you text. That's it. They have zero awareness of what's actually running inside them.

So I built Cocxy Terminal. A native macOS terminal built on libghostty that actually understands what your AI agents are doing.

It's open source, MIT licensed, zero telemetry, and not a business. I built it for my own workflow and decided to share it. If it helps you, great. If not, no hard feelings.

How It Works: 4-Layer Agent Detection

Cocxy watches your terminal through 4 independent detection layers. The key part: no agent cooperation needed. You don't install plugins in Claude or configure Codex. Cocxy figures it out on its own.

Layer 0 — Hook Integration Direct event stream from Claude Code's hook system. Real-time notifications for tool calls, completions, and errors.

Layer 1 — OSC Sequences Terminal escape sequences that agents emit for titles, directory changes, and prompt markers.

Layer 2 — Pattern Matching Configurable regex patterns that detect agent-specific output (thinking indicators, tool calls, progress markers).

Layer 3 — Timing Heuristics Statistical analysis of output patterns — long pauses followed by bursts indicate an agent is processing.

Each layer works independently. If one misses something, another catches it. The result: you see agent state (working, waiting, done, error) in the sidebar, tab bar, and notification system — without switching tabs.

What Else Is in There

Beyond agent detection, I built everything I wanted in my daily terminal:

GPU Rendering — Built on libghostty, the same Metal engine behind Ghostty. Smooth scrolling, crisp text, zero lag.

65 CLI Commands — Full scriptability via Unix socket:

cocxy hooks install # Configure Claude Code integration cocxy notify "Deploy complete" # Trigger notification cocxy window list # List all windows cocxy session save my-workspace # Save/restore sessions cocxy remote connect prod-web # SSH multiplexing cocxy capture-pane # Capture terminal content cocxy dashboard toggle # Agent dashboard

Enter fullscreen mode

Exit fullscreen mode

Built-in Panels — Agent dashboard, event timeline, smart routing between sessions, embedded browser with DevTools, native macOS notifications with custom sounds.

Remote Workspaces — SSH multiplexing, port tunnels, SFTP browser, connection profiles. No extensions needed.

Zero Telemetry — No analytics. No PostHog. No Sentry. No crash reporting. Nothing leaves your machine. Verify it yourself — the code is all there.

The Stack

  • Swift + AppKit — native macOS, no Electron

  • libghostty — Metal-accelerated terminal rendering

  • Zero third-party dependencies — no npm, no Node, no external Swift packages

  • 3,053 tests across the codebase

Metric Value

CLI Commands 65

Tests 3,053

External Dependencies 0

Telemetry 0

License MIT

Try It

Homebrew:

brew tap salp2403/tap brew install cocxy

Enter fullscreen mode

Exit fullscreen mode

Or download the DMG from cocxy.dev

Build from source:

git clone https://github.com/salp2403/cocxy-terminal cd cocxy-terminal swift build

Enter fullscreen mode

Exit fullscreen mode

Links

  • Website: cocxy.dev

  • GitHub: github.com/salp2403/cocxy-terminal

  • Docs: Getting Started

This is a solo project. No company, no funding, no team. Just a developer who needed a better terminal for working with AI agents and decided to share it.

If it solves a problem for you, I'd appreciate a star on GitHub or any feedback. If you find a bug or want to contribute, issues and PRs are open. And if it's not for you, that's totally fine too.

Thanks for reading.

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by AI News Hub · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

More about

claudegeminilaunch

Knowledge Map

Knowledge Map
TopicsEntitiesSource
I Built a m…claudegeminilaunchopen sourceopen-sourceproductDEV Communi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 203 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!

More in Products