Quick Start
Get claudefi running in 5 minutes with paper trading.
1. Clone and Install
bash
git clone https://github.com/claudefi/claudefi
cd claudefi
npm install2. Configure
bash
cp .env.example .envEdit .env and add your Anthropic API key:
bash
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here
DATA_PROVIDER=prismaDATA_PROVIDER=prisma uses the local SQLite database. Switch to supabase only if you're deploying with the hosted backend.
3. Initialize Database
bash
npm run db:setup4. Run
bash
npm run ralphThat's it! claudefi will start running in paper trading mode across all four domains.
What Happens Next?
- Skill Loading - Existing skills are loaded into memory
- Portfolio Coordination - Cross-domain analysis runs
- Context Building - Live market data is fetched for each domain
- Decision Making - Claude analyzes data and makes decisions
- Execution - Approved trades are simulated
- Learning - Outcomes are analyzed for skill generation
Watching the Output
You'll see output like:
[Ralph] Starting cycle 1...
[Ralph] Loading skills... 12 active skills
[Ralph] Building contexts for 4 domains...
[DLMM] Fetching top pools...
[Perps] Fetching markets with indicators...
[Polymarket] Fetching trending markets...
[Spot] Fetching trending tokens...
[Ralph] Executing subagents in parallel...
[DLMM] Decision: ADD_LIQUIDITY on SOL-USDC (confidence: 0.78)
[Perps] Decision: HOLD (confidence: 0.65)
[Ralph] Cycle 1 complete. Next cycle in 30 minutes.Running a Single Domain
To test one domain at a time:
bash
# Run only DLMM
npm run claudefi:dlmm
# Run only Perps
npm run claudefi:perps
# Run only Polymarket
npm run claudefi:polymarket
# Run only Spot
npm run claudefi:spotViewing Data
Prisma Studio
Open a visual database browser:
bash
npm run db:studioThis shows:
- Open positions
- Decision history
- Active skills
- Performance snapshots
Skills Directory
Generated skills are stored in .claude/skills/:
.claude/skills/
├── warning-dlmm-low-tvl-2025-01-07.md
├── pattern-perps-rsi-oversold-2025-01-06.md
└── archive/
└── expired-skills...Stopping
Press Ctrl+C to stop the loop. Positions are preserved in the database.
Next Steps
- Configuration - Customize trading parameters
- The Ralph Loop - Understand the execution cycle
- Skills System - How learning works
- Paper Trading - Detailed paper trading info