Getting Started

Cocxy Terminal is a native macOS terminal built for AI agent workflows. Zero telemetry, GPU-accelerated rendering, an inline agent code review panel, a full native Markdown workspace, and bundled local profiles for common coding-agent CLIs.

System Requirements

Install via Homebrew (recommended)

brew tap salp2403/tap && brew install --cask cocxy

To update later:

brew update && brew upgrade --cask cocxy

Install via DMG

  1. Download the latest DMG from GitHub Releases
  2. Open the DMG and drag Cocxy Terminal to /Applications
  3. Launch from Spotlight or Launchpad

Note: The app is signed and notarized by Apple. If macOS still shows a warning on first launch, right-click the app and select "Open".

First Launch

On first launch, Cocxy creates its configuration directory at ~/.config/cocxy/ with sensible defaults. A welcome overlay introduces the key features. You can dismiss it with Esc and bring it back from the Help menu.

Visual Tour

These screenshots were captured from Cocxy running against a local demo workspace, with the Aurora sidebar, split panes, dashboard, browser, command palette, and Preferences visible in real app state.

Cocxy Aurora workspace sidebar showing project sessions and tab status
Aurora sidebar Workspaces group sessions by project and show tab state, pane count, and close controls without leaving the terminal.
Cocxy command palette listing searchable actions and keyboard shortcuts
Command palette Search actions, see shortcuts, and jump to browser, split, theme, and dashboard controls from the keyboard.
Cocxy agent dashboard tracking an active agent session and touched file
Agent dashboard Live hook events summarize active agents, touched files, tool calls, errors, and the current window scope.
Cocxy split panes showing two terminal sessions in one tab
Split panes Run multiple shells or panels side by side inside the same tab, then navigate between focused panes.
Cocxy browser panel open next to terminal panes with a local demo server
Browser panel Preview local development servers next to your terminal and keep port chips visible in the status bar.
Cocxy Preferences window with shell path, working directory, and sidebar categories
Preferences Configure shell, appearance, keybindings, notifications, terminal behavior, and agent detection from the native settings window.

Concepts

Workspaces

The vertical sidebar on the left is your workspace. Each entry is a tab with its own terminal session. Tabs show the current directory, git branch, and agent state in real time.

Agent Detection

Cocxy automatically detects AI agents running in your terminal. When a configured local agent profile matches a launch command, hook event, OSC marker, or output pattern, the tab indicator changes to show the agent's state: launching, working, waiting for input, finished, or error.

Splits

Any tab can be split horizontally or vertically to show multiple terminal sessions or panels (browser, markdown preview) side by side.

Zero Telemetry

Cocxy has no telemetry pipeline, no analytics SDK, no automatic crash upload, and no tracking. Network use exists for signed updates and explicit user actions such as browser sessions, remotes, GitHub CLI operations, plugins, or tools you run yourself. Terminal activity is not uploaded to a Cocxy backend.

Local Input Classification

The input classifier runs on this Mac before execution. It distinguishes shell-command, natural-language, dangerous-command, empty input, and unknown text so Cocxy can warn on destructive commands and offer agent routing without changing the default shell flow.

Configuration

Cocxy is configured via TOML files in ~/.config/cocxy/. Changes are detected automatically within one second.

config.toml

# ~/.config/cocxy/config.toml

[general]
shell = "/bin/zsh"
working-directory = "~"
confirm-close-process = true

[appearance]
theme = "catppuccin-mocha"
font-family = "JetBrainsMono Nerd Font"
font-size = 14.0
tab-position = "left"            # "left", "top", "hidden"
window-padding = 8.0
background-opacity = 1.0         # 0.1 - 1.0
background-blur-radius = 0.0     # 0 - 100

[terminal]
scrollback-lines = 10000
cursor-style = "bar"             # "block", "bar", "underline"
cursor-blink = true
copy-on-select = true
clipboard-paste-protection = true

[agent-detection]
enabled = true
osc-notifications = true
pattern-matching = true
timing-heuristics = true
idle-timeout-seconds = 5

[input-classifier]
enabled = true
dangerous-command-warning = true
auto-route-natural-language = false
locale-detection = true
foundation-models-fallback = true

[notifications]
macos-notifications = true
sound = true
badge-on-tab = true
show-dock-badge = true

[quick-terminal]
enabled = true
hotkey = "cmd+grave"
position = "top"                 # "top", "bottom", "left", "right"
height-percentage = 40
hide-on-deactivate = true

[keybindings]
new-tab = "cmd+t"
close-tab = "cmd+w"
next-tab = "cmd+shift+]"
prev-tab = "cmd+shift+["
split-vertical = "cmd+shift+d"
split-horizontal = "cmd+d"
goto-attention = "cmd+shift+u"

[sessions]
auto-save = true
auto-save-interval = 30
restore-on-launch = true

Tip: Invalid values are clamped to valid ranges instead of causing errors. For example, font-size = 200 is clamped to 72.

Input Classifier

Cocxy classifies short prompt input locally before it is sent to a shell or routed to an agent workflow. The classifier detects shell commands such as git status, natural-language prompts such as what is the weather, and dangerous commands such as rm -rf /. Dangerous matches return dangerous-command, a confidence score, severity, and shouldWarnBeforeExecution.

Use cocxy classify "git status" or cocxy classify "what is the weather" to inspect the local JSON decision. The command prints fields such as category, confidence, languageCode, routingHint, and shouldWarnBeforeExecution without contacting a Cocxy service.

[input-classifier]
enabled = true
dangerous-command-warning = true
auto-route-natural-language = false
locale-detection = true
foundation-models-fallback = true

auto-route-natural-language defaults to false, so natural-language detection remains an explicit user choice instead of changing existing terminal behavior.

Command Signatures

Cocxy can sign and verify shared templates, macros, plugins, notebooks, and files with local Ed25519 keys. The key material stays in the macOS Keychain, trusted public keys stay in the local trusted author registry, and verification runs on this Mac before install or playback decisions.

Unsigned templates, macros, and plugins keep working by default. If a signature is present and cannot be verified, Cocxy reports an invalid signature instead of silently trusting the artifact. Verified items can show verified, unsigned items can show unsigned, and broken sidecars are treated as invalid signature.

[security]
require-signed-templates = false
require-signed-macros = false
require-signed-plugins = false
warn-on-unsigned = true
trust-on-first-use = false
cocxy keys generate --author "Your Name"
cocxy keys export-public <key-id> --output author.cocxykey
cocxy keys import author.cocxykey
cocxy sign template ./my-template
cocxy verify template ./my-template

Strict signature requirements are opt-in through [security]. Leave trust-on-first-use disabled when sharing artifacts across teams so every trusted author key is imported deliberately.

Sandbox Controls

Cocxy isolates local extension surfaces with component-level sandbox profiles instead of putting the whole terminal inside the macOS app sandbox. Plugins, Agent Mode command tools, and local MCP stdio servers get their own filesystem and process rules while the terminal keeps normal workspace access.

The Sandbox Inspector in Preferences shows active plugin capability grants and the local audit log. Revoke a grant from the inspector or use the CLI when you want a scriptable local check.

[security.sandbox]
plugins-strict = true
agents-isolated = true
mcp-isolated = true
audit-log-enabled = true
warn-on-grant = true
cocxy sandbox list-grants <plugin-id>
cocxy sandbox revoke <plugin-id> <capability>

Plugin write grants stay scoped to the plugin state directory. Agent command tools run with workspace-scoped read/write access, and MCP stdio servers inherit only the configured working directory and explicit file arguments.

Command Corrections

Cocxy can suggest local fixes after a failed shell command. It checks common typos such as gti status, aliases such as sl, command-name edit distance, shell hint text, and nearby filesystem paths such as a mistyped cd target. The instant heuristic path is local and designed for interactive latency.

Use cocxy correct "gti status" or cocxy correct "pyhton -m venv ." to inspect the JSON suggestions without opening the app socket. When the terminal overlay appears after a failed command, press Tab to accept the suggestion or Esc to dismiss it.

[command-corrections]
enabled = true
edit-distance-threshold = 2
foundation-models-enabled = true
agent-fallback = false
auto-show-on-failure = true
show-confidence-badge = true
max-suggestions-shown = 3

agent-fallback defaults to false. Turn it on only if you want the active, user-configured agent to participate in harder correction cases.

Keyboard Shortcuts

Tabs

ShortcutAction
Cmd+TNew tab
Cmd+WClose tab
Cmd+Shift+]Next tab
Cmd+Shift+[Previous tab
Cmd+1 ... 9Switch to tab 1-9

Splits

ShortcutAction
Cmd+DSplit horizontal
Cmd+Shift+DSplit vertical
Cmd+Shift+WClose split
Cmd+Opt+ArrowNavigate between splits
Cmd+Shift+EEqualize split sizes
Cmd+Shift+FZoom/unzoom focused split

Panels & Overlays

ShortcutAction
Cmd+Shift+PCommand Palette
Cmd+Opt+RAgent Code Review Panel
Cmd+Opt+GGitHub Pane (PRs, issues, checks via gh)
Cmd+Opt+AAgent Dashboard
Cmd+Shift+TAgent Timeline
Cmd+Shift+USmart Routing (Quick Switch)
Cmd+Shift+INotifications panel
Cmd+Shift+BBrowser panel
Cmd+Shift+RRemote Workspaces
Cmd+Shift+OMarkdown outline sidebar (when active)
Cmd+1 / 2 / 3Markdown source / preview / split mode
Cmd+FSearch terminal / Find in browser / Find in Markdown
EscDismiss overlay

Terminal

ShortcutAction
Cmd+CCopy selection
Cmd+VPaste
Cmd+KClear screen
Cmd++Zoom in
Cmd+-Zoom out
Cmd+0Reset zoom
Cmd+ClickOpen URL / file path
Cmd+`Quick Terminal (dropdown)

Agent Detection

Cocxy uses a multi-layer detection engine to identify AI agents running in your terminal. Each layer cross-validates with the others for high-confidence results:

  1. Hook Events (highest priority) — Multi-agent hook integration streams local events in real time: tool calls, responses, session lifecycle, subagent spawn, and error signals. Run cocxy setup-hooks to auto-configure hooks for compatible installed agents.
  2. OSC Sequences — Shell integration markers (OSC 133, OSC 7) for working directory and command boundary detection.
  3. Pattern Matching — Regex patterns matched against terminal output to detect agent launch commands, waiting prompts, completion markers, and errors.
  4. Timing Heuristics (fallback) — Detects idle timeouts and sustained output patterns when the other layers don't match.

Agent States

StateIndicatorMeaning
IdleGray dotNo agent running
LaunchedBlue pulse (hollow)Agent detected, initializing
WorkingBlue pulse (filled)Agent generating output
WaitingYellow dot with ?Agent waiting for your input
FinishedGreen dot with Task completed
ErrorRed dot with !Error occurred

Bundled Agent Profiles

Cocxy ships bundled local profiles for hook-capable, OSC-aware, pattern-only, and timing-fallback coding-agent CLIs. Hook-capable profiles provide the richest state because Cocxy receives local events for session start/end, tool use, subagent spawn, errors, and prompt handoff. Profiles without hooks still use OSC markers, output patterns, and timing heuristics.

Detection patterns stay local and are evaluated with NSRegularExpression against terminal output already rendered in Cocxy. You can inspect or override profile behavior from ~/.config/cocxy/agents.toml.

Custom Agents

Add your own agents by editing ~/.config/cocxy/agents.toml:

[my-agent]
display-name = "My Agent"
osc-supported = false
launch-patterns = ['^my-agent\b']
waiting-patterns = ['^> ']
error-patterns = ['Error:']
finished-indicators = ['^\$\s*$']
idle-timeout-override = 8

Agent Code Review Panel

A native panel to review every change an AI coding agent made during a session. Comment inline, submit feedback back to the agent, and accept or reject individual hunks — all without leaving Cocxy.

Opening the Panel

Reviewing Changes

Feedback Loop

Click Submit N Comments (or press Cmd+Enter) and the formatted feedback is sent through the agent's PTY. The agent picks up the corrections and re-runs the task. The panel refreshes automatically as the agent produces new changes.

Accept or Reject Hunks

Keyboard Navigation

KeyAction
j / kNext / previous hunk
n / pNext / previous file
cStart a comment on the current line
a / rAccept / reject the current hunk
dToggle between session-diff mode and working-tree mode
Cmd+EnterSubmit all pending comments
EscClose the panel

CLI Commands

cocxy review                     # Toggle the panel
cocxy review --refresh           # Force refresh diffs
cocxy review --submit            # Submit all pending comments to the agent
cocxy review --stats             # Print stats for the active session

Markdown Workspace

A first-class native Markdown panel that renders in a split pane next to your terminal. Written from scratch in pure Swift — no external parser dependency, no network calls.

Opening Markdown

View Modes

Editor

Rendering

Sidebar and Search

Git Integration

Export and Copy

Interactive Preview

QuickLook Preview Extension

A system-integrated QuickLook extension that renders .md files directly in macOS Finder. Select a Markdown file in Finder and press Space.

Browser

Cocxy includes a built-in browser panel for viewing dev servers, documentation, and web apps alongside your terminal.

Opening the Browser

By default, the browser opens http://localhost:3000. The URL bar supports full navigation with back, forward, and reload controls.

Profiles

Browser profiles isolate cookies, storage, and history. Create profiles for different projects or environments. Each profile gets its own WebKit data store.

Bookmarks

Organize bookmarks in folders with nested hierarchy support. Access via Cmd+Opt+Shift+B.

History

Full-text search across all visited URLs and page titles. History is stored locally in SQLite with FTS5 indexing. Access via Cmd+Opt+B.

DevTools

Cocxy includes a lightweight DevTools panel with three tabs:

Remote Workspaces

Connect to remote servers via SSH with persistent connections, port forwarding, SFTP file browsing, and key management. Open with Cmd+Shift+R.

Connection Profiles

Create reusable profiles with host, user, port, identity file, and port forwarding rules. Profiles are stored as JSON in ~/.config/cocxy/remotes/.

SSH Multiplexing

Cocxy uses OpenSSH ControlMaster for connection multiplexing. A single persistent TCP connection is shared across all sessions to the same host, eliminating re-authentication overhead.

Port Forwarding

Three forwarding modes are supported:

SFTP Browser

Browse remote filesystems, download files, upload files, and create directories — all from the Remote Workspaces panel.

Key Management

Discover, generate, and manage SSH keys. Supports ED25519, RSA, ECDSA, and DSA key types. Keys can be loaded into the SSH agent directly from the UI.

Auto-Reconnect

When enabled on a profile, Cocxy automatically reconnects with exponential backoff (1s, 2s, 4s, 8s, up to 30s) for up to 5 attempts.

Persistent Sessions (tmux)

Remote sessions backed by tmux survive SSH disconnects. When you reconnect, your sessions are waiting exactly where you left them. Zero installation required on the server — Cocxy uses the tmux that's already there.

SOCKS5 + HTTP CONNECT Proxy

A native proxy that tunnels traffic through a connected SSH host. System-wide macOS integration, PAC generation, per-host exclusion lists, and health monitoring with auto-failover to a backup host.

Agent Relay

Multi-channel reverse tunnels with HMAC-SHA256 authentication, per-channel ACLs, audit logs (JSON lines), token rotation, and Keychain persistence. Useful for exposing a local agent to a remote tool chain securely.

Remote Daemon

A POSIX shell daemon (no compilation required on the server) with three-level session fallback (tmux / screen / native PTY), persistent port forwards managed from the daemon, file sync watching, and 24-hour auto-cleanup for orphan sessions.

Web Terminal Embed

Expose any local Cocxy terminal over HTTP with a zero-dependency frontend. Useful for peer programming, remote assistance, or embedding a live terminal into an internal dashboard.

cocxy web-start --port 8080         # Expose the active terminal on http://localhost:8080
cocxy web-stop                       # Stop the web server
cocxy web-status                     # Show active connections and frame rate

Shell Integration

Native shell integration for zsh, bash, and fish. Installed automatically — no setup required. Designed to coexist safely with Prezto, Oh My Zsh, YADR, starship, and any custom prompt.

What It Provides

Per-Shell Behavior

Per-Project Configuration

Create a .cocxy.toml file in any project directory to override global settings. Cocxy detects it automatically when you cd into the directory and applies the overrides to the active tab.

Supported Overrides

Example .cocxy.toml

# Project-specific overrides
font-size = 13
background-opacity = 0.95

[agent-detection]
extra-launch-patterns = ["^python manage.py", "^cargo run"]

[keybindings]
"cmd+shift+t" = "split-vertical"

Hot Reload

Changes to .cocxy.toml are detected and applied in real time — no restart needed. Use cocxy config-project to view the active overrides for the current tab.

AppleScript Automation

Cocxy exposes a full AppleScript vocabulary for automation and integration with Shortcuts, Automator, Raycast, and other macOS tools.

Vocabulary

ObjectProperties
tabid, name (read/write), working directory, agent state, is active, process name
CommandDescription
make new tabCreate a tab with optional command and directory
run commandSend a command to the active terminal
split terminalSplit the active pane (horizontal or vertical)
focus tabFocus a tab by index
closeClose a tab
count tabsGet the number of open tabs

Examples

-- Create a new tab and run a command
tell application "Cocxy Terminal"
    make new tab with properties {command:"ssh deploy@prod"}
    set name of tab 1 to "Production"
end tell

-- Count tabs
tell application "Cocxy Terminal" to count tabs

-- From the command line
osascript -e 'tell application "Cocxy Terminal" to make new tab'

Plugin System

Extend Cocxy with custom plugins that respond to terminal events. Plugins are stored in ~/.config/cocxy/plugins/ and managed via the CLI.

Plugin Structure

~/.config/cocxy/plugins/
  my-plugin/
    manifest.toml          # Required: plugin metadata
    on-session-start.sh    # Optional: runs when a session starts
    on-agent-detected.sh   # Optional: runs when an agent is detected
    on-command-complete.sh  # Optional: runs when a command finishes
    README.md              # Optional: documentation

manifest.toml

name = "My Plugin"
version = "1.0.0"
author = "Your Name"
description = "What this plugin does"
events = ["session-start", "agent-detected", "command-complete"]

Available Events

EventScriptWhen
session-starton-session-start.shA new terminal session begins
session-endon-session-end.shA terminal session ends
agent-detectedon-agent-detected.shA coding agent is detected
agent-state-changedon-agent-state-changed.shAgent state changes (working, waiting, etc.)
command-completeon-command-complete.shA shell command finishes executing
tab-createdon-tab-created.shA new tab is opened
tab-closedon-tab-closed.shA tab is closed
directory-changedon-directory-changed.shWorking directory changes

Security

Plugin scripts run in a sandboxed environment with a clean PATH, a 10-second timeout, and no access to Cocxy internals beyond the environment variables passed to them. Scripts execute as the current user — no privilege escalation.

CLI Commands

cocxy plugin-list               # List installed plugins
cocxy plugin-enable my-plugin   # Enable a plugin
cocxy plugin-disable my-plugin  # Disable a plugin

Splits

Split any tab into multiple panes. Each split runs its own terminal session or panel (browser, markdown preview).

Quick Terminal

A dropdown terminal panel accessible from anywhere on your Mac via a global hotkey.

[quick-terminal]
enabled = true
hotkey = "cmd+grave"        # Cmd+` (backtick)
position = "top"            # top, bottom, left, right
height-percentage = 40
hide-on-deactivate = true

Press Cmd+` to toggle the Quick Terminal. It slides in from the configured edge and stays on top of other windows.

Notifications

Cocxy notifies you when agents need attention:

Command Palette

Press Cmd+Shift+P to open the Command Palette. Fuzzy search through all available actions, then press Enter to execute.

Actions include: new tab, close tab, toggle browser, toggle remote workspaces, switch theme, open dashboard, and more.

Sessions

Cocxy saves your workspace state (tabs, working directories, active tab) and restores it on next launch.

[sessions]
auto-save = true
auto-save-interval = 30     # seconds
restore-on-launch = true

Sessions are saved to ~/Library/Application Support/dev.cocxy.terminal/sessions/.

Local Backups

Cocxy writes local backup snapshots to your Mac by default. They cover settings, notebooks, workflows, custom skills, notes, snippets, themes, and encrypted SSH host metadata when those sources exist. Nothing is uploaded.

[backup]
enabled = true
storage-directory = "~/Library/Backups/Cocxy"
daily-retention-count = 30
monthly-retention-count = 12

Before restoring: save or discard pending preference edits. Cocxy blocks manual restore while Preferences has unsaved changes so a restore cannot be overwritten by an old settings form.

CLI Companion

The cocxy CLI provides more than 100 commands for scripting and automation via a local Unix Domain Socket with per-UID authentication.

# Tab management
cocxy new-tab --dir ~/projects/my-app
cocxy list-tabs
cocxy tab-duplicate
cocxy tab-pin

# Agent hooks (one command sets up every installed agent)
cocxy setup-hooks
cocxy hooks install

# Agent code review
cocxy review                     # Toggle the panel
cocxy review --refresh           # Force diff refresh
cocxy review --submit            # Send pending comments to the agent
cocxy review --stats             # Print review stats

# Window and session management
cocxy window-list
cocxy session-save my-workspace
cocxy session-restore my-workspace

# Panels and dashboards
cocxy dashboard-toggle
cocxy timeline-export --format json > events.json

# Remote workspaces
cocxy remote-list
cocxy remote-connect prod-web
cocxy remote-status

# Web terminal embed
cocxy web-start --port 8080
cocxy web-status
cocxy web-stop

# Plugins
cocxy plugin-list
cocxy plugin-enable my-plugin

# Configuration and themes
cocxy theme-set catppuccin-mocha
cocxy config-list
cocxy config-reload

# Terminal diagnostics
cocxy core-modes                 # Dump alt-screen, cursor, semantic state
cocxy capture-pane
cocxy send --stdin               # Read multiline / escape-safe input from stdin

# Run cocxy help for the full command reference

The CLI is automatically installed at /opt/homebrew/bin/cocxy when you install via Homebrew, or symlinked from the app bundle at ~/.local/bin/cocxy.

Themes

Cocxy ships with a curated set of themes and supports custom themes via Cocxy-compatible TOML files. Drop a .toml theme into ~/.config/cocxy/themes/ and it appears immediately in the theme picker.

Built-in Themes

Set your theme in config.toml:

[theme]
name = "catppuccin-mocha"
light-theme = "catppuccin-latte"

Cocxy automatically switches between the name (dark) and light-theme pair based on macOS appearance settings. Live hot-reload applies theme changes without recreating terminal surfaces.

agents.toml Reference

Agent detection patterns are configured in ~/.config/cocxy/agents.toml. The file is auto-generated on first launch with built-in agent definitions.

FieldTypeDescription
display-namestringName shown in the UI
osc-supportedbooleanWhether the agent emits OSC sequences
launch-patternsstring[]Regex patterns for detecting the launch command
waiting-patternsstring[]Regex patterns for input prompts
error-patternsstring[]Regex patterns for error output
finished-indicatorsstring[]Regex patterns for completion signals
idle-timeout-overrideintegerCustom idle timeout in seconds (optional)

Patterns use NSRegularExpression syntax. Use single-quoted TOML strings so backslashes are literal: '^my-agent\b'.

Migration from v0.x

Before upgrading across v0.x releases, review the Releases page and keep a local copy of ~/.config/cocxy/ if you rely on SSH profiles, snippets, custom themes, plugins, browser data, or saved workspaces.

Cocxy migrations are conservative: valid TOML is preserved, unknown user-defined plugin and theme files stay in place, and local-only stores remain on your Mac. New defaults are added only when the app needs a missing key to keep an existing workflow working.

cp -R ~/.config/cocxy ~/Desktop/cocxy-config-backup
brew update && brew upgrade --cask cocxy

Tip: If a custom config stops applying after an upgrade, keep the backup, launch Cocxy once to regenerate missing defaults, then copy your custom sections back into the new file.

Troubleshooting

Backspace doesn't work

Cocxy sets TERM=xterm-256color by default. If your shell or SSH server expects a different terminal type, add to your shell config:

export TERM=xterm-256color

Agent detection not working

Verify detection is enabled in config.toml:

[agent-detection]
enabled = true

Check that agents.toml exists at ~/.config/cocxy/agents.toml. Delete it and restart Cocxy to regenerate defaults.

Font not rendering correctly

Ensure the font is installed system-wide. Cocxy recommends Nerd Fonts for icon support:

brew install --cask font-jetbrains-mono-nerd-font

brew upgrade not finding new version

Run brew update first to sync the tap, then upgrade:

brew update && brew upgrade --cask cocxy

Reset to defaults

Delete the config directory to reset all settings:

rm -rf ~/.config/cocxy
# Restart Cocxy — defaults will be regenerated

Warning: This also removes SSH connection profiles, bookmarks, and browser history stored under ~/.config/cocxy/.