Skip to main content

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.

Pass --json whenever another process will consume the output.
sf query "Fed rate cut" --json --limit 3
sf world --delta --json --since 1h
sf portfolio history --json --ticks 20 --trades 10
sf describe --all --json

Stdout

In JSON mode, stdout is one valid JSON document.
sf portfolio history --json --ticks 2 --trades 2
{
  "ok": true,
  "command": "portfolio.history",
  "data": {
    "ticks": [],
    "trades": []
  },
  "meta": {
    "ticks": 2,
    "trades": 2,
    "fetchedAt": "2026-04-30T00:00:00.000Z"
  }
}
Some public API passthrough commands return the documented API object directly when the server object is already stable.
sf inspect KXRATECUT-26DEC31 --json
That response may be a market dossier object rather than a CLI envelope. Parse the response by shape: if ok is present, use the envelope; otherwise use the API page for that endpoint.

Error envelope

Validation, auth, upstream, and runtime errors use a JSON envelope when JSON mode is active.
{
  "ok": false,
  "command": "query",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Query must be at least 2 characters.",
    "status": 400,
    "details": {
      "field": "query"
    }
  },
  "meta": {
    "fetchedAt": "2026-04-30T00:00:00.000Z"
  }
}

Exit codes

CodeMeaning
0Success
1Runtime or internal error
2Usage or validation error
3Auth or config error
4Upstream unavailable
5Timeout or rate limit

Payload controls

Use the command manifest or --help for the exact flags supported by each command.
FlagUse
--limit <n>Bound result count.
--since <duration-or-date>Start from a time window or date.
--until <date>Stop at a date.
--cursor <token>Continue paginated history.
--include <list>Request large optional fields, such as portfolio handoff notes.
--compactSmaller response where supported.
--rawRaw upstream/server object where supported.

Parsing rules

Agents should use this order:
  1. Check the process exit code.
  2. Parse stdout as JSON.
  3. If the parsed object has ok: false, read error.
  4. If the parsed object has ok: true, read data.
  5. If ok is absent, treat it as a documented API passthrough object.
Do not scrape human terminal text. Use --json, sf describe --all --json, and the API reference pages.