SimpleFunctions
# SimpleFunctions CLI (`sf`)
Reference and issue mirror for `@spfunctions/cli`, the supported SimpleFunctions command-line interface for prediction-market infrastructure.
The current CLI is distributed through npm. Install the package and treat the installed `sf` binary as the source of truth:
```bash
npm i -g @spfunctions/cli
sf login
sf status --json
sf world --json
sf describe --all --json
```
`sf` is the primary local surface for SimpleFunctions. It queries live Kalshi + Polymarket state, inspects markets and orderbooks, exports structured JSON for coding agents, runs thesis and portfolio workflows, and keeps execution commands explicit and permission-gated.
## What this repository is
- Public reference page for the npm package.
- Issue tracker for `@spfunctions/cli`.
- Installation, support, and discovery pointer for the current `sf` surface.
## What this repository is not
- It is not the current full operator-runtime source tree.
- It is not the canonical command inventory.
- It should not be used to infer current command counts, market counts, or execution behavior.
Use `sf describe --all --json` for the installed command manifest. Use `https://simplefunctions.dev/api/internal/statistics` for current public surface counts.
## First useful workflow
```bash
sf status --json
sf world --json
sf discover --quality --json
sf inspect <ticker> --json
```
If a command is unavailable in your installed version, run:
```bash
npm i -g @spfunctions/cli@latest
sf describe --all --json
```
## Product surface order
1. CLI: primary local control plane for humans, shell scripts, cron, Claude Code, Codex, and other coding agents.
2. HTTP/Data API: network surface for services, dashboards, notebooks, and remote workers.
3. SDKs and agent runtime: planned wrappers over stable CLI/API object contracts.
4. MCP: compatibility adapter for MCP-only hosts, not the canonical product center.
## Links
- CLI product page: https://simplefunctions.dev/cli
- npm package: https://www.npmjs.com/package/@spfunctions/cli
- Docs: https://docs.simplefunctions.dev
- llms.txt: https://simplefunctions.dev/llms.txt
- Public package catalog: https://simplefunctions.dev/opensource
## License
The public mirror is MIT-licensed. The supported npm distribution may include private SimpleFunctions runtime code.
TDQS
Scored across 16 tools
Tools are mostly distinct with clear descriptions, but the large number of 'get_*' tools (get_changes, get_context, get_edges, get_markets, get_trade_ideas, get_world_delta, get_world_state) could confuse an agent if not carefully read. However, each serves a unique purpose.
All tool names follow a consistent verb_noun snake_case pattern (e.g., create_thesis, enrich_content, get_markets). No mixing of conventions, making the naming predictable and clear.
16 tools is slightly above the ideal range but still reasonable for the server's scope (thesis management, market data, enrichment). Each tool has a distinct role, and the count does not feel excessive.
The tool surface covers core thesis creation, listing, and evaluation, but lacks update and delete operations for theses. Additionally, there is no direct trade execution tool, which may be intentional. Notable gaps in lifecycle management.