# ui-ux-pro-max-skill-cli

CLI to install UI/UX Pro Max skill for AI coding assistants.

## Installation

```bash
npm install -g ui-ux-pro-max-skill-cli
```

## Usage

```bash
# Install for specific AI assistant
uipro init --ai claude      # Claude Code
uipro init --ai cursor      # Cursor
uipro init --ai windsurf    # Windsurf
uipro init --ai antigravity # Antigravity
uipro init --ai copilot     # GitHub Copilot
uipro init --ai kiro        # Kiro
uipro init --ai codex       # Codex (Skills)
uipro init --ai roocode     # Roo Code
uipro init --ai qoder       # Qoder
uipro init --ai gemini      # Gemini CLI
uipro init --ai trae        # Trae
uipro init --ai traecode    # TraeCode (CN, ~/.trae-cn/skills/)
uipro init --ai traework    # TraeWork（与 Trae 共用 ~/.trae/skills/）
uipro init --ai workbuddy   # WorkBuddy (~/.workbuddy/skills/)
uipro init --ai qoderwork   # QoderWork（与 Qoder 共用 ~/.qoder/skills/）
uipro init --ai doubao      # 豆包工作台 (~/.doubao/skills/)
uipro init --ai qclaw       # QClaw (~/.qclaw/skills/)
uipro init --ai opencode    # OpenCode
uipro init --ai universal   # Universal / Agent Standard (.agents/skills/)
uipro init --ai all         # All assistants

# Options
uipro init --offline        # Compatibility flag; installs bundled templates
uipro init --force          # Overwrite existing files
uipro init --global         # Install globally to home directory (~/)

# Other commands
uipro versions              # List available versions
uipro update                # Update the global CLI to the latest release
uipro update --global       # Refresh globally installed skill files from this CLI package
```

## GitHub Authentication

GitHub's unauthenticated API allows 60 requests/hour per IP. If you hit rate limits, you can provide a GitHub Personal Access Token (PAT) to raise the limit to 5,000 requests/hour.

**Options (in order of precedence):**

```bash
# 1. Pass directly as a flag (one-off use)
uipro init --token ghp_yourtoken
uipro versions --token ghp_yourtoken
uipro update --token ghp_yourtoken

# 2. Set as a project-scoped environment variable (recommended)
export UI_PRO_MAX_GITHUB_TOKEN=ghp_yourtoken
uipro init

# 3. Fallback: GITHUB_TOKEN is also read if UI_PRO_MAX_GITHUB_TOKEN is not set
export GITHUB_TOKEN=ghp_yourtoken
uipro init
```

**Creating a token:** Go to <https://github.com/settings/tokens>, click **Generate new token (classic)**, and select **no scopes** — public repo access requires no permissions. Copy the token and store it as an environment secret; never hardcode it in source files.

> **Warning:** `GITHUB_TOKEN` is automatically injected by GitHub Actions with broad repo permissions. Prefer `UI_PRO_MAX_GITHUB_TOKEN` in CI to avoid accidentally attaching workflow credentials to release download requests.

## How It Works

`uipro init` generates assistant-specific files from the templates bundled with the installed CLI package. To get newer templates and data, update the package, then regenerate:

```bash
uipro update                   # updates the global CLI to the latest release
uipro init --ai codex --force  # regenerate skill files from the new package
```

`uipro update` runs `npm install -g ui-ux-pro-max-skill-cli@latest` for you (it shells out to `npm` only on Windows, where `npm` is a `.cmd`). You can still run that command manually if you prefer. When the CLI is already current, `uipro update` just refreshes the installed skill files.

## 一键安装（全部 Agent 工具）

在任意机器上执行一条命令，即可把 7 个 skill 一次性装到本机所有常见 Agent 的全局技能目录（codex / claude-code / cursor / trae / traecode / traework / workbuddy / qoder / qoderwork / doubao / qclaw / opencode …）：

```bash
uipro init --all --global    # 已全局安装 CLI 后
# 或不用安装，直接 npx 执行：
npx ui-ux-pro-max-skill-cli init --all --global
```

- 想只装给某几个工具：`uipro init --ai trae --global`（`--global` 装到 `~/`，不加则装到当前项目 `.trae/skills/` 等）。
- 已存在同名 skill 时用 `--force` 覆盖。
- 通用兜底：`~/.agents/skills/`（Agent Skills 开放标准，Codex / Trae 等原生读取，也是多数新工具的兼容目录）。
- 部分国产工具目录为社区约定（如 `~/.doubao/skills/`、`~/.workbuddy/skills/`），若你的工具版目录不同，改 `cli/assets/templates/platforms/<platform>.json` 里的 `folderStructure.root` 即可，重新构建发布。

## 发布到自己的 npm

1. 改 `cli/package.json` 的 `"name"`（原包名 `ui-ux-pro-max-skill-cli` 已被上游占用，且发布到你的账号下可用 `@你的scope/ui-ux-pro-max` 这类私有/公开 scope），再在 `README.md` 里把安装/更新命令中的包名同步替换。
2. 登录并发布：

```bash
cd cli
npm run sync:assets   # 先从仓库源码同步技能资产（如改过 src/.claude/skills）
npm run build         # 构建 dist
npm publish --ignore-scripts   # 跳过 prepublishOnly 的 python 校验链（该链需在完整仓库根目录运行）
```

3. 发布后，用户侧一键安装：

```bash
npx <你的包名> init --all --global
```

## Development

```bash
# Install dependencies
bun install

# Run locally
bun run src/index.ts --help

# Build
bun run build

# Sync bundled CLI assets from the source skill
npm run sync:assets

# Verify bundled assets are current before publishing
npm run check:assets

# Link for local testing
bun link
```

## License

CC-BY-NC-4.0
