8.0 KiB
Seal Home CLI Reference
Run from any directory after installing the global CLI:
seal-home <command>
Enterprise config lookup:
- If
SEAL_HOME_ENTERPRISES_DIRis set, only that directory is loaded. - Otherwise
./enterprisesand~/.config/seal-home/enterprisesare merged. - User-level configs override same-ID local configs.
Top-Level Commands
seal-home version
seal-home config paths
seal-home service <start|stop|restart|status>
seal-home update
seal-home tools list
seal-home corps list [--corp <corpId>]
seal-home corps current
seal-home corps switch <corpId>
seal-home corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}'
seal-home corps add-seal --json '{"sealUrl":"https://tenant.sealai.cc","token":"seal-bearer-token"}'
seal-home auth diagnose [--corp <corpId>]
seal-home auth hose-link [--corp <corpId>] [--expire 7200]
seal-home delegation list [--corp <corpId>]
seal-home delegation create [--note <note>] [--corp <corpId>]
seal-home delegation revoke <tokenId> [--corp <corpId>]
seal-home users create --name <name> --phone <phone> [--dept <deptId>] [--corp <corpId>]
seal-home users reset-password <userId> [--corp <corpId>]
seal-home users get <userId> [--corp <corpId>]
seal-home users delete <userId> [--corp <corpId>]
seal-home llm config [--corp <corpId>]
seal-home llm providers [--corp <corpId>]
seal-home permissions available [--corp <corpId>]
seal-home permissions configs [--corp <corpId>]
seal-home billing status [--corp <corpId>]
seal-home billing plans [--corp <corpId>]
seal-home billing features [--corp <corpId>]
seal-home source config [--corp <corpId>]
seal-home tool <toolName> [--corp <corpId>] [--json '{"key":"value"}']
seal-home approval-runs summary [--date YYYY-MM-DD] [--timezone Asia/Shanghai]
seal-home approval-runs search [--query text] [--limit 20] [--includeBridge true]
seal-home approval-runs get <recordId> [--fields metadata|document.fields,result.summary] [--output-file file.json]
seal-home approval-runs attachments <recordId>
seal-home approval-runs result <recordId> [--summary]
seal-home approval-runs url
seal-home approval-runs url <recordId>
seal-home approval-runs url --sourceDocumentSN <sourceDocumentSN>
seal-home approval-runs bridge [--sourceDocumentSN <sourceDocumentSN>]
seal-home simulation batch-records <batchId>
Fine-Grained Tools
seal-home version returns:
{
"name": "seal-home",
"version": "<package version>"
}
seal-home service status returns the PID, version, state directory, PID file, and log file for the optional local background process.
seal-home update updates the git checkout, runs bun install, and restarts the local service if it was running.
Identity and session:
seal-home auth diagnose [--corp <corpId>]seal_whoamiseal_session_get
Approval rule maintenance:
seal-home rules count [--corp <corpId>]seal-home rules list --summary [--corp <corpId>]seal-home rules clear [--corp <corpId>] [--dry-run|--yes]seal_approval_rules_listseal_approval_rules_clearseal_approval_rule_createseal_approval_rule_updateseal_approval_rule_deleteseal_approval_rule_versions_listseal_approval_rule_version_publish
Approval run lightweight queries:
seal-home approval-runs get <recordId> --fields metadataseal-home approval-runs get <recordId> --summaryseal-home approval-runs pick --sn <单号> --batch <batchId> --latestseal-home approval-runs document-summary <recordId>seal-home approval-runs cited-rules <recordId>seal-home approval-runs get <recordId> --fields document.fields,result.summaryseal-home approval-runs attachments <recordId> --summaryseal-home approval-runs result <recordId> --summaryseal_approval_run_getwithfieldsseal_approval_run_pickseal_approval_run_cited_rules_getseal_approval_run_document_summary_getseal_approval_run_attachments_getseal_approval_run_result_getwith{"summary":true}
Approval knowledge documents:
seal_approval_documents_listseal_approval_document_getseal_approval_document_createseal_approval_document_update
Approval search and context:
seal_approval_searchseal_approval_context_getseal-home rules get --version <number> --code '#0038'seal-home rules get --record-id <recordId> --runtime-id rule-205
Style preferences:
seal_approval_style_preferences_getseal_approval_style_preferences_update
Approval runs, simulations, and Langfuse bridge:
seal_approval_runs_searchseal_approval_runs_summaryseal_simulation_batch_records_getseal_approval_run_langfuse_bridge_get
Common Examples
Add and verify a Hose enterprise:
seal-home corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}'
seal-home auth diagnose --corp <corpId>
Force-write a Hose config without verification:
seal-home corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId","force":true}'
Diagnose auth failures:
seal-home auth diagnose --corp <corpId>
The diagnostic stages are hose.openapi, hose.provisional, seal.sso, and seal.whoami. Tokens are omitted from output.
Search approval content:
seal-home tool seal_approval_search --json '{"keywords":["关键词"],"matchMode":"any","maxResults":20}'
Get aggregated approval context:
seal-home tool seal_approval_context_get --json '{"documentLimit":20}'
Create a draft approval rule:
seal-home tool seal_approval_rule_create --json '{"description":"规则描述","scope":"适用场景","strictness":"SHOULD_FOLLOW"}'
Update an approval document:
seal-home tool seal_approval_document_update --json '{"documentId":"doc-id","content":"Markdown 内容"}'
Summarize one local date:
seal-home approval-runs summary --date 2026-06-09 --timezone Asia/Shanghai --limit 100
Find a run and include Langfuse bridge rows:
seal-home approval-runs search --query <sourceDocumentSN> --limit 20 --includeBridge true
Resolve Langfuse trace/session hints:
seal-home approval-runs bridge --sourceDocumentSN <sourceDocumentSN>
Read simulation batch records:
seal-home simulation batch-records <batchId>
Write Operation Payloads
Create a rule:
{
"description": "规则描述",
"scope": "适用场景",
"strictness": "MUST_FOLLOW | SHOULD_FOLLOW | SUGGESTION"
}
Update a rule:
{
"ruleId": "rule-id",
"description": "可选",
"scope": "可选",
"strictness": "SHOULD_FOLLOW"
}
Publish a rule version:
{
"versionName": "版本名称"
}
Create a document:
{
"title": "标题",
"purpose": "用途",
"content": "Markdown 内容",
"contentType": "text/markdown",
"status": "可选",
"scenarios": ["场景"],
"tags": ["标签"]
}
Update a document:
{
"documentId": "doc-id",
"title": "可选",
"purpose": "可选",
"content": "可选",
"enabled": true,
"scenarios": ["可选"],
"tags": ["可选"]
}
Update style preferences:
{
"tone": "可选",
"language": "可选",
"detailLevel": "可选",
"outputFormat": "可选",
"examples": ["可选"],
"prohibitedPhrases": ["可选"],
"customInstructions": "可选"
}
Failure Handling
- CLI commands are short-lived processes. In-memory auth/search caches only live for that single process. Use
seal-home service restartafter updates so the optional local service picks up new code. - If no run is found by
sourceDocumentSN, retry withsourceDocumentIdor a broaderquery. - If date-based summaries look wrong, pass
--timezone Asia/Shanghaiand an explicit--date. - If
langfuseTraceIdis missing, uselangfuseSessionFallback. - If a write operation fails, report the raw JSON error and do not retry with guessed payloads.