An open API service indexing awesome lists of open source software.

https://github.com/xcodebuild/agent-status-cli


https://github.com/xcodebuild/agent-status-cli

Last synced: 22 days ago
JSON representation

Awesome Lists containing this project

README

          

# agent-status-cli

`agent-status-cli` 把 Claude Code 和 Codex 的当前状态同步到终端标签页标题和颜色上。

`agent-status-cli` syncs Claude Code and Codex status to terminal tab titles and colors.

---

[中文说明](README_CN.md)

## Quick Start

Install the latest release:

```bash
curl -fsSL https://gh-proxy.com/https://raw.githubusercontent.com/xcodebuild/agent-status-cli/master/install.sh | sh
```

Quick examples:

```bash
asc-codex
asc-claude
```

Preview:

Shown in iTerm2 with `Tab bar location` set to `Left`.

![agent-status-cli preview](https://img.cdn1.vip/i/69df1fd6627b6_1776230358.webp)

Shown in kitty.

![agent-status-cli preview kitty](https://img.cdn1.vip/i/69e04ac1bb0df_1776306881.webp)

## Recommended kitty config

`allow_remote_control yes` is required. `agent-status-cli` uses kitty remote control to update tab colors.

Add this to `kitty.conf`:

```conf
allow_remote_control yes
tab_bar_min_tabs 1
font_size 16.0
font_family JetBrainsMono Nerd Font, Sarasa Mono SC, Noto Sans CJK SC
adjust_line_height 125%

map cmd+t
map cmd+enter
map cmd+n

map cmd+t launch --type=tab --cwd=current
map cmd+enter launch --type=window --cwd=current
map cmd+n launch --type=os-window --cwd=current

map cmd+shift+left previous_tab
map cmd+shift+right next_tab
```

## Commands

The project ships three executables:

- `agent-status-cli`: generic wrapper, choose the tool with `--asc-tool`.
- `asc-codex`: fast path for `codex`; all following arguments are passed through.
- `asc-claude`: fast path for `claude`; all following arguments are passed through.

Examples:

```bash
agent-status-cli --asc-tool codex
agent-status-cli --asc-tool claude resume --continue

asc-codex --model gpt-5
asc-codex exec "fix the failing test"
asc-codex --asc-title-map ready=✅

asc-claude
asc-claude resume --continue
```

Wrapper options are now the arguments prefixed with `--asc-`. Everything else is passed through to `codex` or `claude` unchanged. If you want to stop wrapper parsing explicitly, use `--`:

```bash
agent-status-cli --asc-tool codex --asc-title-map ready=✅ --model gpt-5
agent-status-cli --asc-tool codex -- --help
```

## Behavior

- Status is inferred from the wrapped CLI screen output.
- Tab titles are updated through OSC title sequences.
- Tab colors are updated automatically in iTerm2 and kitty.
- iTerm2 uses OSC 6 tab color sequences and applies the active-tab color.
- kitty uses `kitten @ set-tab-color --self`; `allow_remote_control yes` is required, and when `KITTY_LISTEN_ON` is available it uses `--to` automatically. The active tab uses the state color and the inactive tab uses an automatically dimmed variant of that same color.
- If another terminal supports iTerm2-compatible OSC 6 tab colors, use `--asc-color-mode on` to force emission manually.
- `--asc-keep-alt-screen` is kept as a compatibility no-op; the wrapper currently preserves the wrapped CLI screen behavior as-is.

Default state mappings:

- `starting` -> `⏳`
- `busy` -> `⚙️`
- `ready` -> `🟢`
- `error` -> `🔴`

## Release Artifacts

GitHub Actions builds zip artifacts for:

- `x86_64-unknown-linux-gnu`
- `x86_64-apple-darwin`
- `aarch64-apple-darwin`

Pushes to `main` or `master` update a rolling `latest` GitHub Release with those zip files, which is what `install.sh` downloads by default.

Tagged pushes like `v0.1.0` also publish versioned GitHub Releases so you can install a pinned build:

```bash
curl -fsSL https://gh-proxy.com/https://raw.githubusercontent.com/xcodebuild/agent-status-cli/master/install.sh | sh -s -- v0.1.0
```

## Development

Run tests:

```bash
cargo test
```

Show help:

```bash
cargo run -- --asc-help
```