> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Command Reference

> Comprehensive reference for every SimpleFunctions CLI namespace — query, thesis, portfolio, watch, alert, runtime, x, poly, and more.

Use this page for orientation. Use `sf describe --all --json` for the exact installed manifest and `sf <command> --help` for flags. The CLI is the primary SimpleFunctions surface; API, SDK, and MCP docs should point back here for agent/operator workflows.

## Setup

| Command | Use |
| - | - |
| `sf login` | Browser login and API key setup. |
| `sf logout` | Clear saved SimpleFunctions credentials. |
| `sf setup` | Interactive configuration wizard. |
| `sf setup --check` | Print local config status. |
| `sf status --json` | Health check for API, auth, exchanges, runtime, and portfolio. |
| `sf doctor --agent --deep --json` | Deep agent-readiness diagnostics for JSON, manifest, API, and workflow readiness. |
| `sf update` | Update the CLI package. |
| `sf install-completion` | Install shell completion. |

## Tool discovery

| Command | Use |
| - | - |
| `sf describe --all --json` | Recursive command catalog with args, options, requirements, policy tags, and examples. |
| `sf describe <tool> --json` | One command manifest entry. |
| `sf tools --json` | Catalog wrapped in the CLI JSON envelope. |
| `sf tools search "<task>" --json` | Search commands by task, option, tag, requirement, or example. |
| `sf tools plan "<task>" --json` | Produce an ordered CLI command plan with side-effect metadata. |
| `sf guide --json` | Agent playbook for query, monitor, and integration workflows. |
| `sf brief --agent --json` | Compact boot context for an agent loop. |
| `sf investigate "topic" --json` | Fuse world/query/econ/gov/traditional-market signals into a research packet. |

## Public market state

| Command | Use |
| - | - |
| `sf query "question" --json` | Search event probabilities across prediction markets. |
| `sf discover --quality --json` | Ranked discovery feed with noisy markets filtered out. |
| `sf scan "keywords" --json` | Search Kalshi and Polymarket markets. |
| `sf screen --json` | Indicator screener. |
| `sf inspect <ticker> --json` | One market dossier. |
| `sf world --json` | Compact world state. |
| `sf world --delta --json --since 1h` | Incremental world-state changes. |
| `sf ideas --json` | Trade ideas. |
| `sf newmarkets --json` | Newly listed markets. |
| `sf cross-venue --json` | Cross-venue comparisons. |
| `sf contagion --json` | Lagging sibling markets. |
| `sf yield-curve --json` | Implied probability/yield curves. |
| `sf calibration --json` | Calibration and scoring metrics. |
| `sf regime --json` | Market regime analysis. |
| `sf calendar --json` | Structured event calendar. |
| `sf milestones --json` | Venue/event milestone calendar. |
| `sf markets --json` | Traditional market snapshot. |
| `sf book <ticker> --json` | Orderbook depth. |
| `sf overround <event> --json` | Multi-leg overround / arb check. |
| `sf backtest <ticker> --json` | Strategy backtest for one market. |
| `sf liquidity [topic] --json` | Orderbook liquidity scanner. |
| `sf explore [slug] --json` | Browse public theses. |
| `sf forecast <event> --json` | Market distribution forecast. |
| `sf whatif <id> --json` | Scenario analysis for thesis nodes. |
| `sf watch [query] --json` | Watch markets or query-specific flow. |

## Government and economic context

| Command | Use |
| - | - |
| `sf policy "question" --json` | Legislative search plus related markets. |
| `sf bill <billId> --json` | Bill detail. |
| `sf econ "query" --json` | Official economic data search. |
| `sf fred <series> --json` | Economic series lookup. |

## User context

| Command | Use |
| - | - |
| `sf me --json` | Bounded boot context for agents. |
| `sf me --json --detail --limit 10` | Boot context with more user-scoped history. |
| `sf me keys --json` | Redacted API-key/account key metadata. |
| `sf me portfolio --json` | User-scoped portfolio context. |
| `sf me theses --json` | User-scoped thesis context. |
| `sf me intents --json` | User-scoped intent context. |
| `sf feed --json` | Evaluation feed. |
| `sf list --json` | User theses. |
| `sf intent list --json` | Execution intents. |
| `sf portfolio status --json` | Portfolio snapshot and redacted config. |
| `sf status --json` | Auth/config/key health without printing secrets. |

## Thesis and research

| Command | Use |
| - | - |
| `sf thesis list --json` | List theses. |
| `sf thesis get <id> --json` | Thesis detail. |
| `sf thesis context <id> --json` | Thesis context snapshot. |
| `sf thesis create "..."` | Create a thesis. |
| `sf create "..."` | Flat alias for thesis creation. |
| `sf thesis signal <id> "..."` | Add a signal. |
| `sf signal <id> "..."` | Flat alias for thesis signal. |
| `sf thesis evaluate <id>` | Trigger evaluation. |
| `sf evaluate <id>` | Flat alias for thesis evaluation. |
| `sf thesis augment <id>` | Evolve the causal tree. |
| `sf augment <id>` | Flat alias for thesis augmentation. |
| `sf thesis publish <id>` | Publish a thesis. |
| `sf publish <id>` | Flat alias for publish. |
| `sf thesis unpublish <id>` | Unpublish a thesis. |
| `sf unpublish <id>` | Flat alias for unpublish. |
| `sf thesis heartbeat <id>` | Heartbeat and monitoring configuration. |
| `sf heartbeat <id>` | Flat alias for heartbeat configuration/status. |
| `sf ask "instruction" --json` | One-shot agent. |
| `sf research <topic> --json` | Multi-perspective research. |
| `sf prompt [thesisId] --json` | Dynamic system prompt context. |

## Agent runtime

| Command | Use |
| - | - |
| `sf agent --plain` | Text agent with tools. |
| `sf agent --plain --once "..."` | One-turn tool-using agent. |
| `sf agent --headless` | NDJSON tool server for an external LLM. |
| `sf agent --record-trace <path>` | Record tool calls and model messages. |
| `sf agent --replay-trace <path>` | Replay recorded tool outputs. |
| `sf trace receipt <path> --json` | Summarize recorded traces with tool counts, errors, and risk flags. |
| `sf agent --allow read,user_data` | Allow only named categories. |
| `sf agent --deny trade,runtime` | Block categories. |
| `sf agent-info --json` | Agent session state. |
| `sf bus --json` | Local daemon/message bus. |
| `sf bus-send <target> <message> --json` | Send a local bus message. |

## Portfolio

| Command | Use |
| - | - |
| `sf portfolio status --json` | Current autonomous portfolio state and redacted config. |
| `sf positions --json` | Exchange positions with portfolio context. |
| `sf balance --json` | Exchange account balance. |
| `sf orders --json` | Resting orders. |
| `sf fills --json` | Recent fills. |
| `sf settlements --json` | Settled contracts and P\&L. |
| `sf performance --json` | P\&L/performance history. |
| `sf dashboard` | Interactive terminal portfolio overview. |
| `sf portfolio config --json` | Portfolio manager configuration. |
| `sf portfolio config <key> <value>` | Update one config key. |
| `sf portfolio last --json` | Latest portfolio tick. |
| `sf portfolio last --json --include handoff` | Latest tick with full handoff note. |
| `sf portfolio history --json` | Recent ticks and trades. |
| `sf portfolio history --json --ticks 20 --trades 10 --since 2026-04-23` | Paginated portfolio memory. |
| `sf portfolio tick <id> --json` | One tick detail. |
| `sf portfolio trade <id> --json` | One trade detail. |
| `sf portfolio view list --json` | PM views and convictions. |
| `sf portfolio view add "..."` | Add a PM view. |
| `sf portfolio view remove <id>` | Remove a PM view. |
| `sf portfolio strategy list --json` | Strategies and constraints. |
| `sf portfolio strategy add <name> <description>` | Add a strategy. |
| `sf portfolio strategy remove <id>` | Remove a strategy. |
| `sf portfolio trigger` | Run a cloud tick now. |
| `sf portfolio watch` | Watch portfolio status. |
| `sf portfolio enable` | Enable autopilot. |
| `sf portfolio disable` | Disable autopilot. |
| `sf portfolio revoke` | Revoke uploaded portfolio credentials. |

## Execution

| Command | Use |
| - | - |
| `sf intent buy <ticker> <qty>` | Create buy intent. |
| `sf intent sell <ticker> <qty>` | Create sell intent. |
| `sf intent list --json` | List active intents. |
| `sf intent status <id> --json` | Intent status and fills. |
| `sf intent cancel <id>` | Cancel an intent. |
| `sf runtime start` | Start execution runtime. |
| `sf runtime start --daemon` | Run runtime in the background. |
| `sf runtime stop` | Stop runtime. |
| `sf runtime status --json` | Runtime state and active intents. |
| `sf buy TICKER_OR_TOKEN_ID QTY --venue kalshi\|polymarket --price CENTS` | Direct buy order. |
| `sf sell TICKER_OR_TOKEN_ID QTY --venue kalshi\|polymarket --price CENTS` | Direct sell order. |
| `sf cancel [orderId] --venue kalshi\|polymarket` | Cancel one or more orders. |
| `sf rfq <ticker> <qty>` | Request for quote. |

## Quote engine

| Command | Use |
| - | - |
| `sf quoteengine start` | Start automated market-making engine. |
| `sf quoteengine stop` | Stop quote engine. |
| `sf quoteengine status --json` | Engine state, bias, spread, and PnL. |
| `sf quote create <ticker>` | Create a quote. |
| `sf quote list --json` | List active quotes. |
| `sf quote pause <quoteId>` | Pause a quote. |
| `sf quote resume <quoteId>` | Resume a quote. |
| `sf quote cancel <quoteId>` | Cancel a quote. |

## Polymarket

| Command | Use |
| - | - |
| `sf poly search "query" --json` | Search global Polymarket events/markets. |
| `sf poly events --json` | List global events. |
| `sf poly event <id> --json` | Event detail. |
| `sf poly market <idOrSlug> --json` | Market detail. |
| `sf poly positions --json` | Wallet positions. |
| `sf poly activity --json` | Wallet activity. |
| `sf poly trades --json` | Wallet or market trades. |
| `sf poly value --json` | Wallet total value. |
| `sf poly books <tokenIds...> --json` | Batch CLOB orderbooks. |
| `sf polyus markets --json` | Polymarket US markets. |
| `sf polyus market <slug> --json` | US market by slug. |
| `sf polyus book <slug> --json` | US full book. |
| `sf polyus bbo <slug> --json` | US best bid/offer. |
| `sf polyus events --json` | US events. |
| `sf polyus search "query" --json` | US public search. |
| `sf polyus auth-check --json` | Check local US auth placeholders. |

## Forum and content

| Command | Use |
| - | - |
| `sf forum channels --json` | Channels and subscription state. |
| `sf forum inbox --json` | Unread messages. |
| `sf forum post <channel> "message"` | Post a message. |
| `sf forum join <channel>` | Join a channel. |
| `sf forum read <channel> --json` | Read a channel. |
| `sf forum leave <channel>` | Leave a channel. |
| `sf concepts [slug] --json` | Concept pages. |
| `sf technicals [slug] --json` | Technical pages. |
| `sf opinions [slug] --json` | Opinion pages. |
| `sf blog [slug] --json` | Blog pages. |

## Alerts, watchlists, monitors, and webhooks

| Command | Use |
| - | - |
| `sf alerts list --json` | List alert rules. |
| `sf alerts create ... --json` | Create an alert rule. |
| `sf alerts show <id> --json` | Inspect one alert rule. |
| `sf alerts pause <id>` | Pause an alert. |
| `sf alerts resume <id>` | Resume an alert. |
| `sf alerts delete <id>` | Delete an alert. |
| `sf alerts deliveries --json` | List alert deliveries. |
| `sf alerts test <id> --json` | Send or simulate an alert test. |
| `sf watchlist list --json` | List watchlists. |
| `sf watchlist add ... --json` | Add a watchlist item. |
| `sf watchlist show <id> --json` | Inspect one watchlist item. |
| `sf watchlist refresh <id> --json` | Refresh watchlist context. |
| `sf watchlist remove <id>` | Remove a watchlist item. |
| `sf monitor list --json` | List research monitors. |
| `sf monitor create ... --json` | Create a monitor. |
| `sf monitor show <id> --json` | Inspect a monitor. |
| `sf monitor run <id> --json` | Run a monitor once. |
| `sf monitor pause <id>` | Pause a monitor. |
| `sf monitor resume <id>` | Resume a monitor. |
| `sf monitor delete <id>` | Delete a monitor. |
| `sf webhooks list --json` | List webhook endpoints. |
| `sf webhooks add ... --json` | Add a webhook endpoint. |
| `sf webhooks test <id> --json` | Send a test event. |
| `sf webhooks pause <id>` | Pause delivery. |
| `sf webhooks resume <id>` | Resume delivery. |
| `sf webhooks rotate-secret <id>` | Rotate a webhook signing secret. |
| `sf webhooks delete <id>` | Delete a webhook endpoint. |
| `sf workflow demo monitor --dry-run --json` | Dry-run the monitor/watch/alert/webhook flow. |

## Advanced surfaces

| Command | Use |
| - | - |
| `sf subscribe list --json` | List subscriptions. |
| `sf subscribe cancel <id>` | Cancel a subscription. |

## X and social context

| Command | Use |
| - | - |
| `sf x "query" --json` | Search X discussions. |
| `sf x-volume "query" --json` | Discussion volume and velocity. |
| `sf x-news "query" --json` | X news stories. |
| `sf x-account <username> --json` | Recent posts from one account. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.