clawock

Command reference / 命令参考

This file has two halves. The inventory below is generated by ops/ci/generate_tool_reference.py from the clawock distribution’s two command registries (clawock.utilities.PACKAGED_UTILITIES and the root [project.scripts]) and the classification in config/information-layers.json, so a command that is added, renamed or removed changes it without anyone editing this page. Everything after it is hand-written, and covers what a registry cannot hold: operational boundaries and links to the workflow and provider contracts.

上半部分是生成的完整清单(新增/删除命令自动反映,禁止手改);下半部分是手写细节, 从根目录 TOOLS.md 外移(TOOLS.md 受 openclaw 16K bootstrap 注入上限约束), TOOLS.md 只留精简索引 + 路由。

Installed commands / 已安装命令

88 commands are installed by the single clawock distribution: 11 lifecycle subcommands built in src/clawock/cli.py, 65 packaged clawock <utility> subcommands and 12 standalone scripts. clawock --help offers the first two groups (76 subcommands). 48 of the registry commands collect or compute information and appear under the layer they feed; the remaining 29 publish, gate, record or schedule, and are listed with the reason they are not collection.

本节由生成器从 clawock.cli.build_parser()、两份 registry 与 config/information-layers.json 推导,不手写;新增或删除一条命令,这张表自己会变。

Lifecycle subcommands / 生命周期子命令

Workspace, run and harness lifecycle commands; details are in the hand-written sections below.

Command What it does
clawock init create a standalone clawock workspace
clawock run certify and publish one external decision-workflow run
clawock doctor audit portfolio and registry prerequisites
clawock calendar check whether an HK or US market session is open
clawock profile validate and describe a declarative runtime profile
clawock report assemble and validate a market report from a context file
clawock brief run brief harness in-process
clawock intraday run intraday harness in-process
clawock tool call a context tool through the registry
clawock context audit, assemble, compare or verify the agent context contract
clawock workflow discover or install portable decision-workflow skills

Layer 1 · Market / 行情

Sources: Tencent · Yahoo · Eastmoney · Polygon · Nasdaq

Command Module What it collects or computes
clawock analyze-hk clawock.market_data.hk_analysis HK holdings: Tencent + Eastmoney dual-source reconciliation, stooq/yfinance fallback (the yfinance hop needs clawock[market])
clawock analyze-us clawock.market_data.us_analysis US holdings: price refresh plus RSI/MA and news-derived signals
clawock us-quotes clawock.market_data.us_quotes multi-provider US quote fetcher, seven-route fallback (the yfinance hop needs clawock[market])
clawock fetch-peers clawock.market_data.peer_quotes current price and 5-day P&L for peer tickers
clawock daily-bars clawock.market_data.bars canonical unadjusted daily OHLC store the ledger settles against
clawock benchmark clawock.market_data.benchmarks SPY / HSI / HSTECH daily-close history for the equity-curve overlay
clawock-gold-fetch clawock.market_data.gold.fetch daily NAV for the 000217 gold DCA position from the Eastmoney fund API
clawock discover-stocks clawock.market_data.stock_discovery free Nasdaq US-listed snapshot, sector-diverse research candidates outside held exposures; time unverified, no trade authority

Layer 2 · Fundamentals & filings / 基本面/申报

Sources: SEC EDGAR · Eastmoney datacenter · HKEX

Command Module What it collects or computes
clawock filings clawock.market_data.filings 10-K/10-Q/8-K, XBRL concepts, Form 4, 13F-HR
clawock fundamentals clawock.market_data.fundamentals Eastmoney datacenter fundamentals for US and HK names
clawock earnings clawock.decision.earnings primary-source earnings review and earnings-quality math

Layer 3 · Capital flow / 资金面

Sources: Eastmoney push2his

Command Module What it collects or computes
clawock fundflow clawock.market_data.fund_flows daily fund-flow series for US and HK names

Layer 4 · News & catalysts (bilingual) / 消息面与催化剂(双语)

Sources: Eastmoney · Finnhub · Google News · Yahoo · 10jqka · exchange filings · DeepSeek Search · Tavily

Command Module What it collects or computes
clawock em-news clawock.market_data.eastmoney_news Chinese-language Eastmoney news for active HK holdings
clawock catalysts clawock.market_data.calendar next 14 days of earnings, FOMC and macro events
clawock mover-evidence clawock.market_data.mover_evidence filing-first catalyst probe, fired only for names that already moved
clawock live-sources clawock.evidence.live_sources live free news and disclosures (HKEXnews, EDGAR full-text, Google News, Yahoo RSS, DeepSeek Search, 同花顺 7x24, 东财 7x24) for any harness, budgeted and timed
clawock web-search clawock.evidence.web_search web search through DeepSeek and Tavily side by side (each result labelled by provider, each provider’s own limit: DeepSeek 5 QPS per account, Tavily credit buckets), or a DeepSeek Fetch of one page
clawock news-evidence clawock.evidence.news_evidence_graph deduplicates news and filings into an expiring evidence graph with confirmation gates
clawock-news-digest clawock.automation.news_digest US 21:00 digest; Finnhub with a Google News RSS fallback per ticker

Layer 5 · Macro & sentiment / 宏观/情绪

Sources: Yahoo · Reddit · CNN · social feeds

Command Module What it collects or computes
clawock macro clawock.market_data.macro VIX, 10Y, DXY, Fear & Greed, Federal Reserve releases
clawock sentiment clawock.market_data.sentiment Reddit archive title sample and Google News scan per active holding
clawock-influencer-scan clawock.automation.influencer market-moving statements from high-impact figures, read from primary feeds

Layer 6 · Quant & risk / 量化与风险

Sources: deterministic math over price history

Command Module What it collects or computes
clawock quant clawock.decision.signals standard factor layer over held names, zero LLM opinion
clawock quant-review clawock.decision.signal_review measures each factor’s own hit rate before it may be quoted
clawock cross-factor clawock.market_data.factors point-in-time, sector-neutral cross-sectional ranking over a curated universe
clawock peer-residual clawock.market_data.peer_residuals curated-peer residual alpha, leadership and diffusion
clawock t0 clawock.decision.setups T+0 setup grading — card quality, not a buy signal
clawock t0-review clawock.decision.setup_review edge self-check that decides whether the grading may be used
clawock portfolio-risk clawock.portfolio.risk beta, volatility, drawdown and concentration per book
clawock regime clawock.decision.regime the leverage dial: 200-day trend × volatility
clawock watch-list clawock.decision.watch_list non-held AI watch names price scan — opportunities only, never an add

Layer 7 · Book & FX integrity / 账本/汇率校验

Sources: Frankfurter · the reconciliation ledger · local invariants

Command Module What it collects or computes
clawock fx clawock.portfolio.fx USDHKD with three-route fallback; HK and US totals may not be summed without it
clawock integrity clawock.portfolio.integrity the data-health gate that turns past numeric bugs into an automatic door
clawock reconcile clawock.portfolio.reconcile recompute every derived money field, then run the integrity gate
clawock aggregates clawock.portfolio.aggregates rebuild each derived portfolio field from ledger leaves
clawock cash clawock.portfolio.cash derive each book’s cash from its reconciliation ledger
clawock realized clawock.portfolio.realized single source of truth for realized P&L, summed from trades

Layer 8 · Backtest & calibration / 回测/自省

Sources: local snapshots + canonical bars

Command Module What it collects or computes
clawock evaluate-hstech-regime clawock.evaluation.hstech_regime the regime de-risking thesis, tested on real HSTECH data
clawock evaluate-us-leverage clawock.evaluation.us_leverage the regime indicators on the US 2x sleeve; the 生产三档 row replays production’s ok/watch/cut dial; needs clawock[evaluation]
clawock evaluate-combined-regime clawock.evaluation.combined_regime the whole book at current USD weights; needs clawock[evaluation]
clawock validate-regime-dial clawock.evaluation.regime_validation out-of-sample and circular-shift null for the dial’s timing
clawock validate-regime-hmm clawock.evaluation.regime_hmm posterior regimes with a duration, scored on the dial’s own circular-shift null
clawock shadow clawock.decision.shadow replays triggered calls against buy-and-hold to measure simulated timing alpha, gross and net of the pre-registered cost model
clawock decision-audit clawock.decision.audit absolute and broad-market-relative direction scores with exact-window coverage
clawock audit-resettle clawock.decision.settlement dry-run bar-based re-settle that reports every verdict it would change
clawock evaluate-add-alpha clawock.evaluation.add_alpha_walkforward point-in-time diagnostic replay of price-relative and information interaction adds
clawock evaluate-methods clawock.decision.method_evaluation method payoff and probability reports; frozen prospective three-arm shadow trials
clawock evaluate-add-shapes clawock.evaluation.add_shapes descriptive pass over the bar store: what each add-side entry shape has been worth against the unconditional baseline; not walk-forward

Not information collection / 不属于信息收集

These are installed commands too. They are listed here so the catalog is the whole installation rather than the interesting part of it.

Command Module Why it is not collection
clawock cron-trigger clawock.automation.cron_trigger fires a host-triggered OpenClaw cron job; it collects nothing and decides nothing
clawock dashboard-build clawock.publish.dashboard publishes the dashboard projection from data the layers already produced
clawock decision-map clawock.publish.decision_map joins decisions to signal histories the layers already collected and publishes the projection; it acquires nothing and decides nothing
clawock dashboard-outputs clawock.publish.outputs publication ownership and semantic diffs for generated write sets
clawock validate-sidecar clawock.publish.artifacts behavioral validation of a publication artifact; gif and screenshots decode images and need the imaging extra (pip install ‘clawock[imaging]’)
clawock evidence clawock.evidence.build_evidence renders the public evidence page from artifacts; it collects nothing
clawock run-card clawock.evidence.run_card records that a backtest ran and against what — provenance, not a measurement
clawock claim-provenance clawock.evidence.claim_provenance gate: a quoted backtest number must still be in the card it cites
clawock signal-panel clawock.evaluation.signal_panel measures registered signal histories that other layers already collected, and never feeds a decision — evaluation, not collection
clawock strategy-lab clawock.strategy_lab.lab mounts the strategy plugins in config/strategy-plugins.json and walks a declared parameter grid forward over adjusted daily bars; it prints a proposal that never carries live permission and records each verdict in its own ledger; intraday-study validates a frozen research manifest and runs net chronological folds without live permission; intraday-replay separately replays a supplied five-minute session with sized net costs and no live permission — evaluation, not collection
clawock scorecard-provenance clawock.evidence.scorecard_verify names the ledger slice and code a published scorecard number came from — provenance, not a measurement
clawock provenance clawock.provenance gate: a published research figure needs two independent sources
clawock mark-followed clawock.decision.execution writes execution ground truth into the decision ledger
clawock record clawock.decision.record appends a conversation verdict to the decision-mind ledger — it records a decision that was already made, and collects nothing
clawock risk clawock.decision.risk durable governance ledger for breaches — a record of decisions, not an input to one
clawock thesis clawock.decision.theses registry the model writes and reads back; its content is authored, not fetched
clawock entry-gate clawock.decision.entry pre-investment gate applied to a candidate, after the information exists
clawock plan-context clawock.decision.plans relays what the 08:03 brief already decided to the crons that run after it
clawock research clawock.evidence.research_surface the brief does read it, but as a work queue — reviews due, overdue promises, ungated positions — not as a measurement of the market or the book
clawock-gold-update clawock.market_data.gold.update operator command that amends the gold DCA baseline; it carries human input into the book rather than measuring it
clawock-weekly-review clawock.automation.weekly_review assembles a weekly review artifact out of records the layers already produced
clawock-workflow-outcomes clawock.automation.workflow_outcomes durable per-slot outcome state for the harness; operational, not market or book
clawock-cron-heartbeat clawock.automation.cron_heartbeat publishes the intraday heartbeat ledger — liveness, not evidence
clawock-brief-fallback clawock.automation.brief_fallback off-host delivery path for the brief when the runtime cannot produce it
clawock-intraday-delta clawock.harness.intraday_delta pre-model trigger state: it decides whether a run happens, and the scheduler is its only reader
clawock-brief-watchdog clawock.harness.brief_watchdog delivery watchdog for the 08:03 brief: it checks that a run produced and sent something
clawock-report-watchdog clawock.harness.report_watchdog delivery watchdog for the session reports, on the same footing
clawock-intraday-watchdog clawock.harness.intraday_watchdog delivery watchdog for the intraday slots, on the same footing
clawock research-inbox clawock.decision.research_inbox local research queue dispositions and review dates; not a market measurement or trading authorization

手写细节 / Hand-written detail

Lifecycle boundaries, context/generation IDs and delivery ownership live in the harness contract; the intraday contract owns slot-specific rules. Provider coverage, credentials and missing-data semantics live in data coverage and tool operations.

Generation-bound postflight calls

The model writes prose to a file; the harness assembles the data block. Both calls require the preflight’s context ID, so a different generation cannot be silently combined with that prose:

If report postflight commits locally and its push fails, the JSON and workflow ledger record committed_local. The result’s commit_msg points to a private memory/.tmp/report-push-*.log containing the push attempts’ stdout and stderr.

Arguments and operational boundaries

The installed parser owns syntax and defaults: use clawock COMMAND --help, or clawock COMMAND SUBCOMMAND --help. The inventory above names the module behind each command; this page does not maintain a second copy of its parser.

Cron map

Schedules, job identities and watchdog mapping are generated in cron schedules from config/cron-schedules.json. Payload text lives in config/cron-payloads/. Check with python3 ops/host/sync_cron_payloads.py --json; use --apply only when synchronizing the live contract. The synchronizer rejects ambiguous jobs and in-flight changes, then reads back each applied patch.

Cron 运行历史(自动 + 手动跨 job 聚合)

openclaw cron runs 必须带 --id,且单 job 视角。跨 job + 自动调度 + 手动 trigger 一起看用:

bash ops/host/check_crons.sh                 # 最近 20 次(auto + manual 混排,HKT 倒序)
bash ops/host/check_crons.sh 50              # 最近 50 次
bash ops/host/check_crons.sh --status error  # 只看失败
bash ops/host/check_crons.sh --kind cron     # 只看自动调度
bash ops/host/check_crons.sh --job 港股       # 按 job 名子串过滤
bash ops/host/check_crons.sh --full          # 摘要不截断
bash ops/host/check_crons.sh --json          # JSON 输出(喂给后续 pipeline)

运行历史同样优先经 OpenClaw CLI 读取;旧 cron/runs/*.jsonl 只作为迁移前 fallback。 脚本本体 ops/host/cron_runs.py。

Low-frequency free data

Private analyst and credit-spread commands, public Treasury coverage and their redistribution limits are described once in data coverage.