@earnforge/sdk
Zod-typed client for Earn Data API + Composer. Risk scoring, strategy presets, portfolio suggestions, gas optimization. 18 pitfall guards built in. Read the SDK docs
EarnForge is a 7-package monorepo that wraps the LI.FI Earn API into production-grade developer surfaces. It covers 623+ vaults across 16 chains and 11 protocols with full pagination, Zod-validated schemas, risk scoring, strategy presets, gas optimization, and guards for all 18 known API pitfalls.
npm i @earnforge/sdkimport { createEarnForge } from '@earnforge/sdk';
const forge = createEarnForge();const top = await forge.vaults.top({ asset: 'USDC', limit: 5 });for (const vault of top) { const risk = forge.riskScore(vault); console.log(`${vault.name} APY ${vault.analytics.apy.total}% Risk ${risk.score}/10 (${risk.label})`);}@earnforge/sdk
Zod-typed client for Earn Data API + Composer. Risk scoring, strategy presets, portfolio suggestions, gas optimization. 18 pitfall guards built in. Read the SDK docs
@earnforge/cli
Commander CLI wrapping the SDK. 11 commands, all with --json output.
earnforge doctor runs 18-pitfall diagnostics.
Read the CLI docs
@earnforge/react
9 React hooks built on wagmi + TanStack Query. Includes useEarnDeposit
state machine for full deposit flows.
Read the React docs
@earnforge/mcp
9 MCP tools for Claude Desktop, Cursor, and Windsurf. Drop-in Earn intelligence for any LLM that speaks MCP. Read the MCP docs
@earnforge/skill
SKILL.md + 5 reference files following the Agent Skill standard. Give any coding agent Earn API superpowers. Read the Skill docs
@earnforge/bot
Telegram bot via Grammy. /yield, /top, /risk, /suggest, /doctor
commands with Markdown-formatted responses.
Read the Bot overview
EarnForge Studio
Next.js + Tailwind web app. Vault explorer, DeFiLlama sparklines, risk badges, strategy picker, and code generator.
Risk Scoring
How the 0-10 composite score works: 5 dimensions, weighted formula, color coding. Read the guide
18 Pitfalls
Every production pitfall in the LI.FI Earn API, how the SDK defeats each one, and which test verifies it. Read the guide
@earnforge/sdk