CLI

求職者指令

以求職者身分管理你自己的履歷資料。用 OAuth 登入一次(瀏覽器 device flow —— 無密碼、無 API key);token 會靜默續期,也可在任何登入中的機器隨時撤銷。

登入(OAuth device flow)

bash
# 一次性:開瀏覽器授權這台機器(SSH 環境加 --no-browser)
wport login

# 我是誰 / 哪些裝置登入中 / 踢掉遺失的筆電
wport whoami
wport sessions list
wport sessions revoke --all-others

# 登出(server 端撤銷 refresh token、清除本地憑證)
wport logout

個人線是 OAuth-only:沒有個人 API key、也沒有 --token 旗標。個人 OAuth token 與企業 key 分區存於同一份 credentials.json(mode 600),兩條線互不干擾。

履歷工作流(agent-first)

bash
# schema → 填 → 驗證 → 建立
wport personal resumes schema > schema.json          # 機器可讀欄位文件(offline)
wport personal resumes template --out full.json      # 帶範例值的骨架(offline)
wport personal resumes validate --file full.json     # 本地檢查,不耗 API 額度(offline)
wport personal resumes create --file full.json --output json   # 逐 section 成功報告

讀取 / 編輯 round-trip:

bash
# view 會為每筆項目帶 enc_id:
#   有 enc_id 的項目 → 更新;沒有 enc_id 的項目 → 新增
#   既有項目不會被隱式刪除(例外:portfolio_links 為宣告式整批 upsert)
wport personal resumes view <enc_id> --output json > mine.json
wport personal resumes update <enc_id> --file mine.json

日常維護:

bash
wport personal resumes list                    # 含配額(最多 6 份)
wport personal resumes copy <enc_id> --name "英文版"
wport personal resumes publish <enc_id>        # 開放企業搜尋(可逆)
wport personal resumes delete <enc_id> --confirm
wport personal resumes export --out ./backup

投遞職缺

bash
# 投遞職缺(企業看得到;需 --confirm;每日上限 20 筆)
wport personal apply <job_enc_id> --resume <enc_id> --message "自我介紹…" --confirm
wport personal apply <job_enc_id> --resume <enc_id> --message-file intro.txt --confirm  # 或用 - 讀 stdin
wport personal apply --file batch.json --confirm   # { "applications": [...] },最多 20 筆,部分成功

認證與憑證

  • 個人線:OAuth-only(wport login),token 存於 credentials.json 的個人分區。
  • 企業線:用 wpk_live_ API key,設定見 企業徵才指令

下一步