Public Docs
OpenAPI Source of Truth
MCP Streamable HTTP
CLI for Consumers
TSFM.ai developer documentation.
Multiple pages, one contract. API, MCP, and CLI are aligned on the same schema so teams can move from manual calls to production automation with zero drift.
CLI
Distributable CLI for consumers
CLI resolves OpenAPI at runtime and executes by operation id. That keeps command workflows stable even as endpoint implementation evolves behind the same contract.
Install options
npx (zero install)
npx @metis/tsfm-cli@latest list --base-url https://api.tsfm.ai
Best default for docs and one-off experiments.
Global install
npm i -g @metis/tsfm-cli
Best for operators using CLI daily on secure workstations.
Pinned project dev dependency
pnpm add -D @metis/tsfm-cli
Best for reproducible CI pipelines with lockfile pinning.
Command reference
| Field | Type | Required | Description |
|---|---|---|---|
| list | read | No | Print operation ids discovered from OpenAPI schema. |
| inspect <operationId> | read | Yes | Show method/path/required params for one operation. |
| call <operationId> | execute | Yes | Execute an API operation with --path, --query, and --body inputs. |
Credential precedence
CLI checks flags first, then environment variables.
| Field | Type | Required | Description |
|---|---|---|---|
| 1. --token | flag | No | Highest priority; useful for session-scoped account actions. |
| 2. --api-key | flag | No | Recommended for CI and server-side forecasting automation. |
| 3. TSFM_API_TOKEN | env | No | Fallback token env var. |
| 4. TSFM_API_KEY | env | No | Fallback API key env var for unattended jobs. |
cli-workflow.sh
# discover operations from live schema
tsfm list --base-url https://api.tsfm.ai
# inspect one operation contract
tsfm inspect forecast --base-url https://api.tsfm.ai
# execute one operation
cat forecast.json | tsfm call forecast \
--base-url https://api.tsfm.ai \
--api-key "$TSFM_API_KEY" \
--body-file /dev/stdincli-ci-check.sh
# CI-friendly smoke check
set -euo pipefail
tsfm list --base-url "$TSFM_API_BASE_URL" --json > /tmp/ops.json
tsfm call getHealth --base-url "$TSFM_API_BASE_URL" --json
tsfm call forecast \
--base-url "$TSFM_API_BASE_URL" \
--api-key "$TSFM_API_KEY" \
--body-file ./payloads/forecast-smoke.json \
--json | jq '.status == 200'Operational guidance
tsfm listshould be your first step in every environment to confirm schema reachability.tsfm inspect <operationId>reveals required path/query/body expectations before execution.tsfm callsupports JSON inline (--body) or file-based payloads (--body-file) for repeatable jobs.- Use
--jsonfor machine-readable output in CI and scripts. - CLI exits non-zero when API call returns non-2xx, which is ideal for deployment gates.