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.
Run sf in GitHub Actions for scheduled jobs that need access to SF state.
Daily thesis briefing
.github/workflows/daily-thesis.yml:
name: Daily thesis briefing
on:
schedule:
- cron: '0 13 * * *' # 13:00 UTC daily
workflow_dispatch:
jobs:
brief:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install sf
run: npm install -g simplefunctions
- name: Pull world delta + theses
env:
SF_API_KEY: ${{ secrets.SF_API_KEY }}
run: |
sf world --delta --json --since 24h > delta.json
sf me theses --json > theses.json
- name: Post to Slack
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: |
jq -r '.data.markets[] | "\(.ticker): \(.priceCents)¢"' delta.json | \
curl -X POST -H 'Content-Type: application/json' \
-d "{\"text\": \"$(cat)\"}" $SLACK_WEBHOOK
Trigger an alert from CI
Useful when you want a non-SF event (e.g., a CI failure, a build) to fan out through SF’s alert system.
- name: Fire SF alert
env:
SF_API_KEY: ${{ secrets.SF_API_KEY }}
run: |
sf alerts create \
--object <watched-object-id> \
--condition semantic_match \
--threshold "ci.failed" \
--channel webhook \
--endpoint <webhook-endpoint-id>
Token
Store SF_API_KEY as a repository secret. Scope it to read-only or specific tools via API keys.
Rate limits
Per-key. Schedule jobs sensibly. See Rate limits.
See also
Quickstart
8-step CLI quickstart.
Common workflows
Five end-to-end recipes.