Skip to content
Back to search

boss-agent-cli

🤖 Local-assist BOSS Zhipin CLI for AI agents — search, welfare filtering, shortlist, JSON-envelope output; low-risk & compliant by default.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/can4hou6joeng4/boss-agent-cli with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/can4hou6joeng4/boss-agent-cli'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/can4hou6joeng4--boss-agent-cli/badge.svg)](/listings/can4hou6joeng4--boss-agent-cli)

HTML

<a href="/listings/can4hou6joeng4--boss-agent-cli"><img src="/api/listings/can4hou6joeng4--boss-agent-cli/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 233 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. <img src="docs/assets/logo.png" width="112" alt="boss-agent-cli logo">
  3. # boss-agent-cli
  4. *🤖 面向真人与 AI Agent 的招聘平台 CLI —— 纯终端向导 · 福利筛选 · 双角色工作流 · JSON 信封。*
  5. [![Python](https://img.shields.io/badge/Python-≥3.11-3776AB?logo=python&logoColor=white&style=flat-square)](https://python.org)
  6. [![License](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](LICENSE)
  7. [![GitHub Release](https://img.shields.io/github/v/release/can4hou6joeng4/boss-agent-cli?style=flat-square)](https://github.com/can4hou6joeng4/boss-agent-cli/releases)
  8. [![PyPI Downloads](https://img.shields.io/pypi/dm/boss-agent-cli?style=flat-square)](https://pypi.org/project/boss-agent-cli/)
  9. [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/can4hou6joeng4/boss-agent-cli/pulls)
  10. [快速上手](docs/getting-started.md) · [架构](docs/architecture.md) · [Agent 集成](#-agent-集成) · [命令](#-命令) · [排障](docs/troubleshooting.md) · [路线图](ROADMAP.md) · **中文** | [English](README.en.md)
  11. <a href="demo/showcase/boss-agent-cli-showcase.mp4" title="观看 48 秒产品发布会动画">
  12. <img src="demo/showcase/boss-agent-cli-showcase.gif?v=keynote-20261008" alt="boss-agent-cli 极光发布会动画:福利筛选、双角色工作流与 Agent 接入" width="100%">
  13. </a>
  14. **[观看 48 秒发布会动画](demo/showcase/boss-agent-cli-showcase.mp4)** · [交互版](https://can4hou6joeng4.github.io/boss-agent-cli/keynote-animation/) · [终端交互演示](demo/demo-zh.gif) · 福利筛选 · 双角色工作流 · Agent 接入
  15. </div>
  16. ## 🧭 为什么
  17. boss-agent-cli 把职位发现、福利筛选、本地简历与 AI、投递沟通、招聘者候选人处理和可恢复采集统一到一个 CLI。真人直接运行 `boss` 进入纯终端向导;Agent 使用 JSON、schema、MCP 或 Python API 调用同一套 workflow 与状态。`boss schema` 始终是能力真源。
  18. ## ⚠️ 运行边界
  19. 历史配置 `operating_mode=assisted|research` 继续兼容,但两种模式都可调用全部已实现能力,不再产生模式级 `COMPLIANCE_BLOCKED`。平台尚未实现的能力仍准确返回 `NOT_SUPPORTED`;认证失效、账号风险和网络错误保留结构化错误与恢复动作。长流程仍受 timeout、retry、预算、checkpoint 和 stop 控制。
  20. ## ✨ 核心能力
  21. - **职位发现**:关键词搜索 + 8 维筛选,按编号回看缓存结果 —— `search` `show` `detail`
  22. - **福利筛选(核心差异化)**:`--welfare "双休,五险一金"` 自动翻页补抓、按 AND 逻辑做**真实匹配**,并可 `--sort score` 按本地匹配分排序 —— `search --welfare`
  23. - **HR 活跃度筛选**:`--active 3d` 只留最近活跃的 HR,避免把投递次数浪费在长期不上线的岗位上;`online` 只看列表、请求量与普通搜索相同,其余档位可能要逐个查职位详情,更慢、风控风险更高,低风险场景建议用 `--active online` —— `search --active`
  24. - **纯终端向导**:直接运行 `boss` 或 `boss wizard`,选择角色、平台和目标;同一 workflow 也可用 `--input-json`、run ID 或 MCP 推进和恢复
  25. - **本地候选池与统计**:查看详情后本地保存、读取带有效状态的网页职位收藏并仅同步有效项 / 用标签和备注复盘候选岗位、离线对比、查看漏斗统计 —— `shortlist` `stats` `watch` `preset` `favorites`
  26. - **AI 求职增强 + 本地模型**:JD 分析、简历润色、定向优化、候选池匹配、模拟面试、沟通指导;本地模型权重外置,支持 Ollama/vLLM OpenAI 兼容接口 —— `ai analyze-jd` `ai local configure` `ai local smoke`
  27. - **Schema 驱动 + JSON 信封**:stdout 只输出 `{ok, schema_version, command, data, pagination, error, hints}` 七键信封,`boss schema` 是能力真源,适合 CLI 编排 / Shell Agent / MCP / Python SDK
  28. - **招聘者完整链路**:先确认招聘者身份,再进入候选人搜索、推荐牛人、首次招呼、工作地点、附件简历接收与下载、简历、聊天/最近消息、回复和职位管理 —— `hr whoami/candidates/recommendations/greet/location/applications/resume/chat/last-messages/reply/request-resume/accept-resume/download-resume/jobs`
  29. - **平台抽象**:`Platform` / `RecruiterPlatform` 双注册表 + `--platform` 全局选项;当前注册平台为 `zhipin`(BOSS 直聘)
  30. ## 🚀 快速开始
  31. ```bash
  32. # 安装(uv 推荐;浏览器内核仅用于用户主动登录 / 本地导出)
  33. uv tool install boss-agent-cli
  34. boss doctor # 缺浏览器内核时会给出可直接执行的安装命令
  35. # 真人入口:直接进入角色、平台和目标向导
  36. boss
  37. # Agent / 高级用户仍可直接调用命令
  38. boss doctor # 环境自检
  39. boss login # 登录(按平台选择链路)
  40. boss status # 验证登录态
  41. boss search "Golang" --city 广州 --welfare "双休,五险一金" # 搜索 + 福利筛选
  42. boss search "Golang" --city 广州 --active 3d # 只看 3 日内活跃的 HR
  43. boss detail <security_id> # 查看详情
  44. boss shortlist add <security_id> <job_id> --tags 后端,远程 # 加入本地候选池并打本地标签
  45. boss shortlist compare --tag 远程 # 离线对比候选岗位
  46. boss stats # 本地统计
  47. # 招聘者模式
  48. boss hr candidates "Python" --city 101010100
  49. boss hr recommendations --job-id <encJobId>
  50. boss hr jobs list
  51. ```
  52. 所有命令输出结构化 JSON(`ok` 判断成败,默认 `exit 0/1`;可选 `--exit-codes sysexits` 返回按错误类别区分的语义化退出码)。完整上手见 [快速上手](docs/getting-started.md)。
  53. ## 🎭 角色与平台
  54. | 平台 | 求职者 | 招聘者 | 状态 |
  55. |------|:--:|:--:|------|
  56. | BOSS 直聘 (`zhipin`) | ✅ | ✅ | 默认 |
  57. ```bash
  58. boss platforms # 查看已注册平台与能力状态(当前仅 zhipin)
  59. boss --platform zhipin search "Python" # --platform 默认即 zhipin,可省略
  60. ```
  61. `boss hr ...` 与招聘者侧 `agent` 自动化当前均只支持 `zhipin-recruiter`。设计细节见 [docs/platform-abstraction.md](docs/platform-abstraction.md)。
  62. ## 🤖 Agent 集成
  63. 推荐先读:[Agent Quickstart](docs/agent-quickstart.md) · [Capability Matrix](docs/capability-matrix.md) · [Host Examples](docs/agent-hosts.md)
  64. ```json
  65. // 方式一:MCP(推荐)—— Claude Desktop / Cursor 等 MCP 宿主,暴露 80 个已实现工具
  66. { "mcpServers": { "boss-agent": { "command": "uvx", "args": ["--from", "boss-agent-cli[mcp]", "boss-mcp"] } } }
  67. ```
  68. 不想在本机配 Python 工具链,可用仓库自带的容器:`BOSS_UID=$(id -u) BOSS_GID=$(id -g) docker compose run --rm boss-mcp`。镜像刻意不含浏览器内核 —— 先在宿主机 `boss login`,再把 `~/.boss-agent` 挂进去,详见 [Docker 接入](docs/integrations/docker.md)。
  69. OpenCode 源码项目可直接使用仓库示例:
  70. ```bash
  71. cp examples/opencode/opencode.json ./opencode.json
  72. uv sync --all-extras
  73. uv run boss-mcp --data-dir ./.boss-agent --help
  74. ```
  75. portable / 全局安装后,在任意 OpenCode 项目里使用 `examples/opencode.json`,它会启动 `boss-mcp --data-dir ./.boss-agent`,让 review、pending、日志按项目隔离。
  76. ```bash
  77. # 方式二:subprocess —— 先让 Agent 读能力自描述,再解析 stdout JSON
  78. boss schema
  79. ```
  80. ```python
  81. # 方式三:Python 直接嵌入(随 py.typed 发布,可作类型化库)
  82. from boss_agent_cli import AuthManager, BossClient, AuthRequired
  83. with BossClient(AuthManager(...)) as client:
  84. result = client.search_jobs("Golang", city="广州")
  85. ```
  86. ## 📚 命令
  87. `boss schema` 暴露 39 个顶层命令 + 15 个一级招聘者子命令,按工作流分组:
  88. - **认证**:`login` · `logout` · `status` · `doctor`
  89. - **职位发现**:`search` · `recommend` · `detail` · `show` · `cities` · `history`
  90. - **本地整理**:`watch` · `preset` · `shortlist` · `stats` · `favorites`
  91. - **可恢复采集**:`crawl configure/run/start/status/results/resume/stop/shortlist`
  92. - **简历 / AI**:`resume` · `me` · `ai analyze-jd` · `ai polish` · `ai optimize` · `ai fit` · `ai suggest-keywords` · `ai resume-optimize` · `ai cover-letter` · `ai interview-prep` · `ai chat-coach` · `ai local`
  93. - **系统 / workflow**:`wizard` · `schema` · `platforms` · `export` · `config` · `clean`
  94. - **候选者动作**:`greet` · `batch-greet` · `apply` · `exchange` · `chat` · `chatmsg` · `chat-summary` · `mark` · `interviews` · `pipeline` · `digest` · `follow-up`
  95. - **招聘者**:`hr whoami/applications/candidates/recommendations/greet/location/resume/chat/chatmsg/last-messages/reply/request-resume/accept-resume/download-resume/jobs`
  96. 完整命令表、参数与福利筛选原理见 **[命令参考](docs/commands.md)**;能力真源是 `boss schema`(支持 `--format openai-tools` / `anthropic-tools` / `mcp-tools` 导出工具定义)。
  97. 批量采集需要额外安装 `pip install "boss-agent-cli[crawl]"`(或 `uv tool install "boss-agent-cli[crawl]"`;源码仓库内为 `uv sync --extra crawl`)。它使用独立的 `<data-dir>/crawl/chrome-profile`,不会接管日常 Chrome profile。默认不注入 Hook;如需使用本地脚本,必须同时显式提供 Hook 档位和包含 `SHA256SUMS` 的目录:
  98. ```powershell
  99. boss crawl configure --max-requests 20 --max-details 50 --max-seconds 600 --max-retries 1
  100. boss crawl run "AI" --city 杭州 --pages 3 --with-detail `
  101. --hook-profile screenshot-full --hook-dir E:\boss-agent-cli-local-hooks\AntiDebug_Breaker
  102. boss crawl resume <run_id>
  103. boss crawl stop <run_id>
  104. boss agent crawl --run-id <run_id> --resume <简历名>
  105. ```
  106. `crawl run` 顺序执行并保存 SQLite 断点和 JSON / CSV / XLSX 增量产物;请求数、详情数、墙钟时间和重试均受固定预算约束,`boss crawl stop` 可在下一个安全点停止。导出和 `crawl results` 默认不会暴露 `security_id`、职位 ID 或招聘者字段;执行 `boss clean --privacy` 会删除 crawl 状态、预算和导出。细粒度 MCP crawl tools 读取或导入已有 `run_id`;`boss_wizard` 可通过共享 workflow 启动、恢复和停止任务。出现平台风险码或安全页时停止并返回恢复命令。
  107. ## 🩺 诊断与排障
  108. ```bash
  109. boss doctor # 环境自检
  110. boss status --live # 可选:一次低频只读探测
  111. boss doctor --live-probe
  112. ```
  113. 错误信封统一携带 `code` + `recoverable` + `recovery_action`,可程序化恢复。`boss doctor` 检查 CDP 可达性并汇总 `browser_channel` 状态。`chat` / `chatmsg` 在默认 `auto` 来源下使用本地凭据的 httpx;显式选择 `--browser-source existing-browser` 才会通过 CDP 复用已有目标页,且不读取 CLI 保存的 Cookie。现有浏览器候选耗尽返回 `BROWSER_SESSION_NOT_FOUND` + `boss doctor`,普通未登录路径仍返回 `AUTH_REQUIRED` + `boss login`。所有来源命中平台风控时都停止当前 workflow 并保存 checkpoint;适配器必须有限运行、脱敏、可停止,并只在风险状态解除后显式恢复。
  114. **v3.0.0 迁移:Browser Bridge daemon、Chrome 扩展和 `[bridge]` 安装 extra 已移除。升级 CLI 不会停止旧 daemon,也不会卸载浏览器扩展。** 请手动停止旧 daemon,禁用或移除旧扩展,并从安装命令中去掉 `[bridge]`。浏览器默认降级链为 CDP → headless;若要只复用已有会话,先在本机 CDP 浏览器的官方页面手动登录,再运行:
  115. ```bash
  116. boss --browser-source existing-browser --cdp-url http://localhost:9222 chat
  117. ```
  118. 该来源不新建页面、不导航、不注入 Cookie,也不启动浏览器。CDP 调试端口仅用于本机可信环境,不要暴露到公网或用来绕过平台风控。
  119. 完整检查项、CDP 启动示例与错误码见 **[诊断与排障](docs/troubleshooting.md)**;涉及 Cookie / CDP / patchright / 请求频率 / 接口漂移的问题先读 [平台风险边界](docs/platform-risk.md)。
  120. ## ⚙️ 配置
  121. ```bash
  122. boss config list # 查看所有配置
  123. boss config set log_level debug # 设置日志级别
  124. boss config reset log_level # 恢复单个配置项的默认值
  125. ```
  126. 配置位于 `~/.boss-agent/config.json`:运行模式(`operating_mode=assisted|research`)、请求间隔、批量打招呼间隔、日志级别、CDP 地址、导出目录、平台 / 角色。
  127. ## 🏗️ 技术架构
  128. ```
  129. CLI (Click)
  130. └─ 兼容运行元数据(assisted / research 均开放已实现能力)
  131. └─ AuthManager ── 用户主动登录态(Fernet + PBKDF2 机器绑定加密)
  132. └─ Platform 双注册表 ── BossPlatform / BossRecruiterPlatform
  133. └─ BossClient ── httpx + 节流(高斯延迟);兼容 CDP / patchright 登录与导出
  134. └─ CacheStore(SQLite WAL) · AIService(OpenAI-compatible / Ollama / vLLM)
  135. └─ output.py → JSON 信封 → stdout
  136. ```
  137. **不变量**:stdout 仅 JSON 信封 · stderr 仅日志 · `exit 0/1`(可选 `--exit-codes sysexits` 语义化退出码) · 错误含 `code/recoverable/recovery_action` · `boss schema` 为能力真源。
  138. **双受众提示**:`hints.next_actions` 是给 Agent 执行的后继命令,`hints.operator_actions` 是给真人操作者的自然语言指引(扫码、在浏览器里调整条件等需要离开终端完成的动作);TTY 下只渲染后者到 stderr,Agent 应把它转述给操作者。
  139. **命令还是 wizard**:单次、无状态的能力调用走顶层命令;需要跨步骤状态、可恢复、或中途要把指引递给真人的走 `boss wizard`(goal 取值见 `boss schema` 的 `wizard_catalog`)。
  140. **选型**:Python ≥ 3.11 · Click · httpx · patchright / CDP(登录、导出与声明的浏览器 adapter)· cryptography(Fernet)· sqlite3(WAL)· pytest(2900+ 项)。
  141. ## 🔌 本地存储
  142. 所有状态在 `~/.boss-agent/`:加密登录态、搜索缓存、候选池、本地简历、AI 配置与外置模型登记。模型权重不进入 Python 包;除显式发起的 API 调用或本地模型下载外,数据不离开本机。
  143. ## 🤝 贡献者
  144. 欢迎 Issue / PR:`git clone` → `feat/xxx` 分支 → 写测试 → `python scripts/quality_baseline.py`(Windows 中文系统可先 `$env:PYTHONUTF8='1'`)→ PR。详见 [CONTRIBUTING.md](CONTRIBUTING.md),上手路径见 [快速上手](docs/getting-started.md)。可复现的离线 MCP 评测见 [`evals/README.md`](evals/README.md)。参与即表示同意遵守 [行为准则](CODE_OF_CONDUCT.md)。
  145. 感谢每一位让 boss-agent-cli 变得更好的贡献者,去关注他们!❤️
  146. <a href="https://github.com/can4hou6joeng4/boss-agent-cli/graphs/contributors">
  147. <img src="./CONTRIBUTORS.svg" alt="贡献者" width="1000" />
  148. </a>
  149. ## ❤️ 支持
  150. - 如果它帮到了你,最直接的支持是点一个 [Star ⭐](https://github.com/can4hou6joeng4/boss-agent-cli),或分享给正在找工作的人。
  151. - 用出问题、有新想法,欢迎提 [Issue](https://github.com/can4hou6joeng4/boss-agent-cli/issues);想动手就直接上 PR。安全漏洞请按 [SECURITY.md](SECURITY.md) 私密报告,不要公开提 Issue。
  152. - 需要帮助?先看 [获取支持](SUPPORT.md):文档入口、Discussions、Issue 与私密安全报告的正确去处。
  153. - 想看看船队的其他船,欢迎靠泊母港 [bobochang.cn](https://bobochang.cn) 🧭,航海记录在[掘金专栏](https://juejin.cn/user/1187904004821262)。
  154. 本项目受益于 [geekgeekrun](https://github.com/geekgeekrun/geekgeekrun) · [boss-cli](https://github.com/jackwener/boss-cli) · [opencli](https://github.com/jackwener/opencli),一并致谢。
  155. ## ⭐ Star History
  156. <picture>
  157. <source media="(prefers-color-scheme: dark)" srcset="docs/assets/star-history-dark.svg">
  158. <img alt="Star History" src="docs/assets/star-history.svg" width="100%">
  159. </picture>
  160. 由 [mystarhistory](https://github.com/carsteneu/mystarhistory) 本地生成的静态 SVG,与仓库同源、不依赖第三方服务。
  161. ## ⚠️ 免责声明
  162. 使用时请遵守适用法律、平台协议和隐私要求。对批量触达、候选人个人数据和浏览器适配设置明确的输入、数量、超时和停止条件,并妥善保护本地凭据与导出产物。因不当使用产生的后果由使用者自行承担,与项目作者无关。
  163. ## 📑 许可证 & 友情链接
  164. [MIT](LICENSE) © [can4hou6joeng4](https://github.com/can4hou6joeng4) · 友链 [LINUX DO](https://linux.do/)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.