boss-agent-cli

A command-line tool for job seekers to streamline the job search process with AI assistance.

AI Agent 专用的 BOSS 直聘求职 CLI 工具 — 32 个命令覆盖搜索、筛选、打招呼、沟通、流水线、简历优化全流程。

Install

Skills CLI (Recommended)

npx skills add can4hou6joeng4/boss-agent-cli

pip / uv tool

uv tool install boss-agent-cli
patchright install chromium

Setup

boss login     # 四级降级:Cookie 提取 → CDP → QR httpx → patchright 扫码
boss status    # 验证登录态

Agent Decision Tree

用户意图 → 选择命令链
│
├─ "帮我找工作"
│   → boss status → boss search "关键词" --city X --welfare "Y"
│   → boss detail <sid> → boss greet <sid> <jid>
│
├─ "有什么新职位?"
│   → boss watch run <name>  (已有监控)
│   → boss recommend         (个性化推荐)
│
├─ "我的求职进展怎样?"
│   → boss pipeline → boss follow-up → boss digest
│
├─ "帮我优化简历"
│   → boss ai analyze-jd → boss ai polish → boss ai optimize
│
├─ "查看沟通记录"
│   → boss chat → boss chatmsg <sid> → boss chat-summary <sid>
│
├─ "登录/环境有问题"
│   → boss doctor → boss login
│
└─ "不知道能做什么"
    → boss schema  (返回全部能力 JSON)

Commands (32)

Discovery & Auth

CommandDescription
boss schema返回全部命令的 JSON 自描述(Agent 首先调用)
boss login四级降级登录(Cookie → CDP → QR httpx → patchright)
boss logout退出登录
boss status检查登录态
boss doctor诊断环境、依赖、凭据完整性和网络
boss me个人信息/简历/求职期望/投递记录

Job Search

CommandDescription
boss search <query>搜索职位(8 维筛选:城市/薪资/经验/学历/规模/行业/融资/福利)
boss recommend个性化推荐
boss detail <security_id>职位详情(--job-id 走快速通道)
boss show <#>按编号查看上次搜索结果
boss cities40 个支持城市

Job Actions

CommandDescription
boss greet <sid> <jid>打招呼
boss batch-greet <query>批量打招呼(上限 10)
boss apply <sid> <jid>投递/立即沟通(幂等)
boss exchange <sid>交换手机/微信

Communication

CommandDescription
boss chat沟通列表(导出 html/md/csv/json)
boss chatmsg <sid>聊天消息历史
boss chat-summary <sid>结构化沟通摘要(阶段/待办/风险)
boss mark <sid> --label X标签管理(9 种)
boss interviews面试邀请
boss history浏览历史

Pipeline & Monitoring

CommandDescription
boss pipeline求职流水线(各阶段状态)
boss follow-up跟进提醒(超时未推进)
boss digest每日摘要
boss watch add/list/remove/run增量监控
boss shortlist add/list/remove候选池
boss preset add/list/remove搜索预设

Resume & AI

CommandDescription
boss resume init/list/show/edit/delete/export/import/clone/diff本地简历管理
boss ai config配置 AI 服务(OpenAI / Anthropic / 兼容 API)
boss ai analyze-jd分析岗位要求
boss ai polish润色简历
boss ai optimize针对岗位优化简历
boss ai suggest求职建议
boss ai reply招聘者消息回复草稿
boss ai interview-prep基于 JD 生成模拟面试题
boss ai chat-coach基于聊天记录给沟通建议

System

CommandDescription
boss config list/set/reset配置管理
boss clean清理缓存
boss export <query>导出搜索结果(CSV/JSON)

Agent Usage

Step 1: Discover capabilities

boss schema

Returns a JSON envelope describing all 32 commands, parameters, 17 error codes, and output conventions.

Step 2: Check auth, then act

boss status                                        # Check auth
boss search "golang" --city 杭州 --welfare "双休"    # Search with welfare filter
boss detail <security_id> --job-id <id>            # View details (fast path)
boss greet <security_id> <job_id>                  # Send greeting
boss pipeline                                      # Track progress
boss digest                                        # Daily summary

Step 3: Parse output

All commands output structured JSON to stdout:

{
  "ok": true,
  "schema_version": "1.0",
  "command": "search",
  "data": [...],
  "pagination": {"page": 1, "has_more": true},
  "error": null,
  "hints": {"next_actions": ["boss detail <sid>"]}
}
  • ok: true → exit code 0, data contains results
  • ok: false → exit code 1, error.code + error.recovery_action for auto-recovery
  • hints.next_actions → suggested next commands for the Agent to follow

Error Recovery

Error CodeRecoverableAction
AUTH_REQUIREDYesboss login
AUTH_EXPIREDYesboss login
TOKEN_REFRESH_FAILEDYesboss login
RATE_LIMITEDYesWait and retry
ACCOUNT_RISKYesRetry with CDP Chrome
NETWORK_ERRORYesRetry
AI_NOT_CONFIGUREDYesboss ai config
AI_API_ERRORYesRetry
AI_PARSE_ERRORYesRetry
EXPORT_FAILEDYesCheck dependencies
JOB_NOT_FOUNDNo
ALREADY_GREETEDNoSkip
ALREADY_APPLIEDNoSkip
GREET_LIMITNoInform user
INVALID_PARAMNoFix parameters
RESUME_NOT_FOUNDNoCheck name
RESUME_ALREADY_EXISTSNoUse different name

Output Conventions

  • stdout: JSON only (structured envelope)
  • stderr: Logs and progress (controlled by --log-level)
  • exit 0: Success (ok: true)
  • exit 1: Failure (ok: false)

Welfare Filter (Core Feature)

--welfare "双休,五险一金" triggers deep inspection:

  1. Check job's welfare tags first
  2. If tags don't match, fetch full job description and search
  3. Auto-paginate (up to 5 pages)
  4. Each result includes welfare_match field explaining the match source

Keywords: 双休 五险一金 年终奖 餐补 住房补贴 定期体检 股票期权 加班补助 带薪年假

Requirements

  • Python >= 3.10
  • patchright + Chromium (for login; QR httpx mode works without browser)
  • macOS / Linux / Windows

Docs

License

MIT

boss-agent-cli — skill by can4hou6joeng4 | Shared Context