Metadata-Version: 2.4
Name: jinjinxia-client
Version: 1.0.1
Summary: Zero-intrusion adapter for JinJinXia — uploads chat messages to server for analysis
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# jinjinxia-client

Zero-intrusion adapter for JinJinXia — installs native hooks
into AI coding agents to automatically upload chat messages to the server
for analysis.

**No dependencies.** Pure Python stdlib.

## Install

```bash
pip install jinjinxia-client           # from PyPI (when published)
pip install .                          # from source (this directory)
pipx install .                         # isolated install
```

## Usage

```bash
# Install adapter for any supported platform
jinjinxia-client install claude-code --url http://jinjinxia.company.com:8080
jinjinxia-client install copilot     --url http://jinjinxia.company.com:8080
jinjinxia-client install codex       --url http://jinjinxia.company.com:8080
jinjinxia-client install qoder       --url http://jinjinxia.company.com:8080
jinjinxia-client install trae        --url http://jinjinxia.company.com:8080
jinjinxia-client install traework    --url http://jinjinxia.company.com:8080
jinjinxia-client install codebuddy   --url http://jinjinxia.company.com:8080
jinjinxia-client install opencode    --url http://jinjinxia.company.com:8080

# Check status (shows all platforms)
jinjinxia-client status

# Uninstall
jinjinxia-client uninstall claude-code
jinjinxia-client uninstall copilot
# ... same for codex, qoder, trae, traework, codebuddy, opencode
```

## What It Does

1. `install` writes a native hook config into the agent platform's settings
2. The hook script runs automatically at each session end (< 100ms)
3. It reads the session transcript and uploads new messages to the JinJinXia server
4. The server analyzes sessions after inactivity timeout, clusters issues, and generates PRs
5. The client itself does no analysis — all intelligence is server-side

## How Hooks Are Registered

| Platform | Config file | Hook event |
|----------|-------------|------------|
| Claude Code | `~/.claude/settings.json` → `hooks.Stop` | Stop (agent finishes responding) |
| Copilot CLI | `~/.copilot/hooks/jinjinxia.json` → `agentStop` | agentStop (agent finishes turn) |
| Codex | `~/.codex/hooks.json` → `hooks.Stop` | Stop (turn stops) |
| Qoder | `~/.qoder/settings.json` → `hooks.Stop` | Stop (agent completes response) |
| TRAE | `~/.trae-cn/hooks.json` → `hooks.Stop` | Stop (agent about to end query) |
| TRAE Work | `~/.trae-cn/hooks.json` → `hooks.Stop` | Stop (shared runtime with TRAE) |
| CodeBuddy | `~/.codebuddy/settings.json` → `hooks.Stop` | Stop (agent completes response) |
| OpenCode | `~/.config/opencode/plugins/jinjinxia.js` | `session.idle` (JS plugin, not JSON hooks) |

> **Note:** TRAE and TRAE Work share the same agent runtime and config file. Installing one replaces the other.
>
> **Qoder Work** and **WorkBuddy** are not supported — no public hook system is documented for them as of 2026-07-23.
