跳至內容
Influence
Esc
↑↓導覽↵開啟⌘J預覽
本頁內容

命令列介面(CLI)

使用限定權限的金鑰與目前的工具目錄,執行儲存庫內的 CLI。

Influence CLI 目前是私有儲存庫內的應用程式。請從已安裝依賴套件的儲存庫工作目錄,以 Bun 執行。此套件沒有公開的 npm 安裝指令。

將 PUBLISH_API_URL 設為可信任的 Influence 來源網址,並透過存放機密值的環境變數提供 PUBLISH_API_TOKEN。先查看連線設定檔與工具目錄:

export PUBLISH_API_URL="https://influence.so"
bun apps/cli/src/index.ts profile
bun apps/cli/src/index.ts tools:list
bun apps/cli/src/index.ts tool:call --tool accountList --input-json '{}'

輸入 JSON 時,選用 --input-json 或 --input-file。工具目錄標示不需確認的工具,可透過 tool:call --tool <name> 呼叫,包括接續已授權的上傳。需要確認的操作,先執行 tool:prepare,再以相同輸入及 --confirmation-capability、--idempotency-key 執行 tool:confirm。回應不明確時,保留這些值;不要只為重試就重新準備請求。

本機媒體請使用 media:upload --file <path> --content-type <mime> --client-key <stable-key>。傳輸中斷後,以相同檔案與金鑰重試。CLI 無法檢視圖片或代替人工進行視覺核准;請登入 Influence,開啟傳回的審核路徑。遵循 HTTP API 審核與復原規則。