Skip to main content
The sf CLI is the primary surface. Install it once and the API, SDK, Agent SDK, MCP adapter, and web terminal can share the same account context.

npm

npm install -g @spfunctions/cli
Verify:
sf --version

First-time setup

sf setup
sf setup walks you through:
1

SimpleFunctions API key

Pasted from simplefunctions.dev/dashboard/keys, or auto-issued via sf login.
2

Kalshi credentials (optional)

Your private key for read-only positions or live trading.
Credentials live in ~/.config/simplefunctions/config.json. They never leave your machine unless you opt into BYOK cloud secrets via sf portfolio enable.
If you want to run portfolio autopilot in the cloud, see Portfolio autopilot. The CLI encrypts your Kalshi private key before upload; the cloud runner decrypts it only for the active tick.

Login

sf login
Opens a browser. After authorization, the CLI receives a long-lived API key and writes it to your config. To rotate or scope keys, see API keys.

Verify

sf me --json
Returns your account context, plan, Kalshi linkage, and recent activity. If this prints a JSON envelope without an error field, you’re set.

Next steps

Quickstart

First 5 minutes — agent loop with curl + CLI.

CLI quickstart

First JSON commands and tool discovery.

SDK quickstart

Install the TypeScript SDK and read market context.

Agent SDK quickstart

Run the first Cursor-style market agent.

MCP server

Wire up Claude Desktop or Cursor.

Direct API access

Call the HTTP API from curl, TypeScript, Python, services, and agents.