Skip to content
zehongye-gagaPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

EasyCodeX

EasyCodeX is a lightweight macOS desktop panel for navigating active Codex CLI sessions. It maps Codex session IDs to their live terminal TTYs, displays project and activity information, and focuses the corresponding Terminal.app tab when clicked.

The interface is built with native SwiftUI and AppKit. Session discovery, event processing, persistence, terminal focusing, and optional AI title generation live in a small Rust core.

Features

  • Shows active Codex CLI sessions only—ordinary terminal shells are ignored.
  • Uses the Codex session ID as the stable identity and the TTY as a live focus target.
  • 点击会话时,根据 TTY 的进程归属切换到对应的 Terminal.app 或 iTerm2 window、tab 和 session。
  • Reuses Codex-maintained thread titles when available.
  • Uses the first prompt as the initial title for a brand-new session.
  • Refreshes the local title and summary after context compaction.
  • 支持在会话行右键菜单中编辑标题;手动标题会锁定,不再被自动标题覆盖。
  • 监听 Codex update_plan Hook,在会话行显示紧凑进度,并通过鼠标悬停预览 完整步骤和当前执行项。
  • Marks running sessions in blue and completed sessions in green.
  • Removes a row when its Codex process exits, even if the end hook is missed.
  • Provides a resizable, opaque native macOS panel.
  • Supports show/hide from the menu bar, the panel button, or ⌘⇧K.
  • Optionally enriches titles through the OpenAI Responses API.
  • Stores only a small, versioned JSON snapshot—no SQLite database is required.

How it works

Codex CLI
  ├─ lifecycle + update_plan hooks ─┐
  ├─ ~/.codex/session_index.jsonl   │
  └─ active Codex process + TTY     │
                                    ▼
                         Rust core daemon
                         ├─ Codex adapter
                         ├─ session engine
                         ├─ title providers
                         ├─ versioned JSON store
                         └─ Terminal.app focus adapter
                                    │
                           Unix socket / JSONL
                                    ▼
                         SwiftUI + AppKit NSPanel

The zsh adapter only exports the current TTY before Codex starts. It does not create a separate terminal row, so a terminal and the Codex process inside it cannot appear as duplicate sessions.

Requirements

  • macOS 14 or later
  • Terminal.app or iTerm2
  • Xcode Command Line Tools
  • Rust stable
  • Codex CLI with lifecycle Hooks support

Build

./scripts/build-app.sh
open build/CLIList.app

The packaged application contains both the native UI and the Rust daemon:

build/CLIList.app/
└── Contents/
    ├── MacOS/CLIList
    └── Resources/bin/cli-list

Install

Copy the app into /Applications:

ditto build/CLIList.app /Applications/CLIList.app

Install the Codex Hook configuration:

./scripts/install-integrations.sh

Then add the zsh adapter to ~/.zshrc:

export CLI_LIST_BIN="/Applications/CLIList.app/Contents/Resources/bin/cli-list"
source "/path/to/EasyCodeX/integrations/zsh/cli-list.plugin.zsh"

Start a new shell, launch Codex CLI, and use /hooks to review and trust the installed hooks. Existing Codex processes do not hot-load newly installed Hook configuration.

OpenAI title enrichment

OpenAI support is optional. Save an API key from the app's Settings window or provide OPENAI_API_KEY to the daemon environment. Keys saved by the app are stored in macOS Keychain and are never written to the session snapshot.

Without an API key, EasyCodeX uses its deterministic local title provider and all navigation and completion features continue to work.

Local data

EasyCodeX stores a versioned JSON document under:

~/Library/Application Support/CLIList/sessions.json

Codex remains the source of truth for resumable session history. EasyCodeX only keeps the metadata needed for the live panel, compact-title updates, and the latest structured plan for each live session. Plans are removed with the live row and are never written back to Codex history.

Development

Run the Rust checks:

cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings

Build the native UI:

swift run CLIListSwiftTests
swift build -c release --product CLIList

Documentation

Security

  • Hook delivery is local and best-effort over a Unix socket.
  • Terminal output and environment variables are not persisted as session context.
  • OpenAI failures never block terminal navigation.
  • API keys are stored in Keychain, not the JSON store.

License

No license has been selected yet.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages