{
  "markdown": "# Weckr SDKs\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/14084/badge)](https://www.bestpractices.dev/projects/14084)\n[![CI](https://github.com/Ghiles3232/weckr-sdks/actions/workflows/ci.yml/badge.svg)](https://github.com/Ghiles3232/weckr-sdks/actions/workflows/ci.yml)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Ghiles3232/weckr-sdks/badge)](https://api.securityscorecards.dev/projects/github.com/Ghiles3232/weckr-sdks)\n\nAI cost and margin intelligence for SaaS founders. See exactly which users cost you more than they pay, per LLM call, zero added latency.\n\nDrop the SDK into your app, get a dashboard that shows cost per user / feature / model and recommends cheaper swaps. Set per-plan spending caps the SDK enforces before the LLM call.\n\n## Pick your language\n\n| | Package | Install | Source |\n|---|---|---|---|\n| **TypeScript / Node** | [`@weckr/sdk`](https://www.npmjs.com/package/@weckr/sdk) | `npm install @weckr/sdk` | [`typescript/`](./typescript) |\n| **Python** | [`weckr-sdk`](https://pypi.org/project/weckr-sdk/) | `pip install weckr-sdk` | [`python/`](./python) |\n| **Claude / Cursor (MCP)** | [`@weckr/mcp`](https://www.npmjs.com/package/@weckr/mcp) | `npx -y @weckr/mcp` | [`mcp/`](./mcp) |\n| **Claude Code (Skills)** | `weckr` plugin | `/plugin install weckr@weckr` | [`skills/`](./skills) |\n\nEach subfolder has full setup docs, examples, and supported-model lists.\n\n## Claude Skills\n\nThis repo is also an installable Claude Code plugin that bundles four skills, so your AI assistant knows real model prices and the exact Weckr syntax instead of inventing code:\n\n```\n/plugin marketplace add Ghiles3232/weckr-sdks\n/plugin install weckr@weckr\n```\n\n| Skill | What Claude learns |\n|---|---|\n| [`weckr-integration`](./skills/weckr-integration) | Wire the SDK in with the correct two line pattern, errors, and provider notes |\n| [`weckr-model-pricing`](./skills/weckr-model-pricing) | Current per token prices for OpenAI, Anthropic, Gemini, and Kimi |\n| [`weckr-cost-estimator`](./skills/weckr-cost-estimator) | Project what an AI feature costs per call, per user, per month before shipping |\n| [`weckr-margin-audit`](./skills/weckr-margin-audit) | Flag which pricing plans go underwater once LLM cost is counted |\n\nThe pricing skills read the live feed at [useweckr.com/pricing.json](https://useweckr.com/pricing.json) first (generated from the same table Weckr bills with), and a weekly [pricing watcher](./scripts/pricing-watch) opens a reviewed PR whenever a provider changes rates, so the numbers track reality instead of drifting. Full explainer at [useweckr.com/skills](https://useweckr.com/skills).\n\n## Try it without signing up\n\n[**Live demo dashboard →**](https://app.useweckr.com/demo)\n\nClick around with seeded data for a fictional SaaS. No signup required.\n\n## Starter templates\n\nClone a full AI SaaS with Weckr already wired in and deploy in minutes. Both are MIT licensed.\n\n* [weckr-nextjs-starter](https://github.com/Ghiles3232/weckr-nextjs-starter): Next.js 14, Supabase auth, Stripe billing, an OpenAI endpoint, and Weckr tracking cost and margin per user.\n* [weckr-fastapi-starter](https://github.com/Ghiles3232/weckr-fastapi-starter): FastAPI, a Claude endpoint, SQLite, and Weckr tracking cost and margin per user.\n\n## Framework guides\n\nStep by step integrations for the stacks people actually ship on, each with the exact code and where the wrap goes:\n\n* [Next.js](https://useweckr.com/how-to/nextjs-llm-cost-tracking): route handler pattern, `flush()` for serverless, streaming notes.\n* [FastAPI](https://useweckr.com/how-to/fastapi-llm-cost-tracking): endpoint pattern with the authenticated user, zero added dependencies.\n* [LangChain](https://useweckr.com/how-to/langchain-cost-tracking-per-user): wrap the client at the boundary, not the callbacks.\n* [CrewAI](https://useweckr.com/how-to/crewai-agent-cost-tracking): price every agent turn, catch the stuck crew.\n\n## How it works\n\n1. You wrap your LLM calls with `wk.chat(client, opts)`.\n2. The SDK forwards the call to OpenAI / Anthropic / Gemini and returns the original result, with no added latency on the request path.\n3. After it resolves, the SDK fire-and-forgets a log to the Weckr API with `(userId, feature, model, tokens, latency, plan)`.\n4. The backend computes cost server-side from public per-token pricing (clients can't forge cost) and stores `(cost, revenue, margin)` per request.\n5. The dashboard rolls it up, per user, per feature, per model, and surfaces unprofitable users + cheaper-model recommendations.\n\n## What gets sent\n\nOnly the call metadata above: model name, token counts, latency, plan, and your `userId` string. **No prompt text or completion text is ever sent.**\n\n## Get an API key\n\n[app.useweckr.com](https://app.useweckr.com). Free tier, no credit card.\n\n## Questions and Support\n\nHave a question about integration or a feature request?\nOpen a discussion: https://github.com/Ghiles3232/weckr-sdks/discussions\n\nWe respond to every question.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n",
  "bytes": 5065,
  "sha": "ef461fd9e5ca83dea8e58b94643cf5e1242139fdc3addcdcc24f07fd60e69f37",
  "repo_slug": "ghiles3232/weckr-sdks",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_useweckr_weckr_3f990a84/readme"
}