Skip to content

TerraFin

An agent-friendly financial-research toolkit: 30 capabilities (DCF with turnaround mode, reverse DCF, FCF history, SEC filings TOC + section bodies, sentiment widgets, market breadth, guru portfolios, view-context reader) callable from Claude Code, Codex, opencode, or TerraFin's own hosted agent.

git clone https://github.com/KiUngSong/TerraFin
cd TerraFin
./setup   # auto-detects Claude Code / Codex / opencode on PATH

Install pattern adapted from gstack — symlink-based, so git pull upgrades every host at once.

What TerraFin Includes

Area Purpose
Data layer Unified access to market, economic, corporate, and private-access data
Analytics Technical indicators, DCF tooling, risk helpers, and standalone analysis modules
Interface FastAPI app with chart, dashboard, stock, market-insights, calendar, and watchlist surfaces
Agent harness Shared capability kernel, hosted runtime, model-provider registry, and browser widget
Cache system In-memory and on-disk warming, fallback behavior, and refresh coordination

Pick your track

The TerraFin Agent runtime ships with a floating chat panel on every dashboard page, hidden guru routing (Buffett, Marks, Druckenmiller), and view-context awareness. Run it locally or as a public deployment.

Drop skills/terrafin/SKILL.md into your agent's skill folder (or let ./setup above do it) and TerraFin's full capability surface becomes callable from any Anthropic-Skills-compatible agent. External agents can also hit /agent/api/* over HTTP directly.

./setup --host claude    # or codex, opencode, auto
  • Agent Docs Overview — surfaces, transports, disclosure rules.
  • Agent Usage — request policy, route summary, the view-context read-only contract, the form-mutation gap.
  • API Reference — per-route docs for /stock/api/* and /agent/api/*.

Working on TerraFin's internals? Start with the architecture and feature-integration rules so your change lands in the right layer.

Also Useful

Software rights are not data rights

TerraFin's code is MIT-licensed. That does not grant rights to Yahoo, SEC, FRED, private endpoints, or other upstream data sources. Read License & Data Rights before running a public deployment.

Read By Goal

If you want to... Start here
install TerraFin and try it locally Getting Started
understand the page routes and APIs Interface Overview
use TerraFin from an external or hosted agent Agent Docs
add a provider, indicator, or feature Data Layer and Feature Integration
operate the server in demo or private mode Deployment & Operations
work on the repo itself Development Guide