# Ipman Update

> Update the IpMan CLI to the latest version and keep the companion skills in lockstep. Use when asked to "update ipman", "upgrade ipman", "get the latest ipman", "ipman 有新版本吗", "更新 ipman". Detects the install method (pipx / uv tool / pip), upgrades from PyPI, then regenerates the skills.

- Skill: `twisker/ipman-update` (Agent Skill)
- Install (CLI): `npx skillmds@latest add twisker/ipman-update`
- Raw SKILL.md: https://api.skillmd.com/api/skills/twisker/ipman-update/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: twisker (https://skillmd.com/u/twisker)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/twisker/ipman-update

---


# /ipman-update

Update the IpMan CLI and its companion skills to the latest release.

The CLI ships on PyPI; the skills are regenerated from the installed CLI
(the CLI is the single source of truth). This skill does both, in order.

## Step 0 — check whether an update is needed

```bash
command -v ipman >/dev/null 2>&1 || { echo "IPMAN_MISSING"; exit 0; }
ipman skill-sync --check --json
```

Parse the JSON:
- `cli_outdated: false` and `skill_stale: false` → already current. Tell the
  user "IpMan is up to date (vX)." and stop.
- `cli_outdated: true` → a newer CLI exists on PyPI (`pypi_latest`); go to Step 1.
- `cli_outdated: false` but `skill_stale: true` → CLI is current, only the
  installed skill files lag (common right after a CLI upgrade); skip to Step 2.
- `pypi_latest: null` → offline; report that the check couldn't reach PyPI and
  offer to regenerate skills from the installed CLI anyway (Step 2 only).

If `IPMAN_MISSING`: the CLI isn't installed. Tell the user to install it
(`pipx install ipman-cli` or `uv tool install ipman-cli`) and stop.

## Step 1 — upgrade the CLI

Detect the install method and upgrade with the matching tool:

```bash
IPMAN_PATH=$(command -v ipman)
case "$IPMAN_PATH" in
  *pipx*)          echo "METHOD=pipx" ;;
  *uv/tools*|*uv*) echo "METHOD=uv" ;;
  *)               echo "METHOD=pip" ;;
esac
```

Ask before upgrading (unless the user already said "just update"):

> AskUserQuestion: "IpMan **v{pypi_latest}** is available (you're on
> v{cli_version}). Upgrade now?"
> Options: "Yes, upgrade now" / "Not now"

On "Yes", run the command for the detected method:
- `pipx`: `pipx upgrade ipman-cli`
- `uv`:   `uv tool upgrade ipman-cli`
- `pip`:  `python -m pip install --upgrade ipman-cli`

Never upgrade silently without the user's go-ahead. If the upgrade command
fails, report the error verbatim and stop — do not touch the skills.

## Step 2 — regenerate the companion skills

The CLI is now current; bring every registered skill file up to its version:

```bash
ipman skill-sync
```

This rewrites `ipman` and `ipman-update` (and any other registered targets)
from the freshly installed CLI. If skill-sync reports no registered targets,
tell the user how to register one:
`ipman skill-sync --scope claude-code-user`.

## Step 3 — show what changed

```bash
NEW=$(ipman --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
echo "Now on IpMan v$NEW"
```

Point the user at the release notes for the new version:
`https://github.com/twisker/ipman/releases/tag/v$NEW`. Offer a one-line
summary if you can fetch it; otherwise just give the link. Suggest they run
`ipman status` to confirm the tool still sees their scopes correctly.

## Notes

- The skills and the CLI are versioned together; a mismatch after an upgrade
  is expected and Step 2 resolves it.
- This skill only updates IpMan itself. It does not touch the user's managed
  skills, the store, or any scope — those are never modified by an update.

