cdinnison/ray-finance

ray-finance tackles a common challenge in personal finance tools: how to combine powerful AI-driven advice with strict privacy guarantees. The repo implements a local-first CLI that stores your financial data encrypted on-device and carefully scrubs personally identifiable information (PII) before sending anything to AI providers. This design lets you have personalized, conversational financial advice powered by large language models (LLMs) without compromising sensitive data.

what ray-finance does and how it works

At its core, ray-finance is a TypeScript-based command-line financial advisor. It syncs with your bank accounts using Plaid, downloads transaction and account data, and stores everything in a local SQLite database encrypted with AES-256 via SQLCipher. This means all your raw financial data lives on your machine, not the cloud.

Before any data is sent to the AI provider, the system applies a rigorous PII redaction pipeline that masks or removes names, account numbers, and other identifying details. This sanitized data, combined with a persistent financial context stored in a context.md file, forms the input to the AI.

The persistent context file is a key architectural choice. It saves conversation history and financial context across sessions, so the AI remembers your financial situation over time without resending raw data repeatedly. This enables a more natural and continuous advisory experience.

ray-finance supports multiple LLM providers out of the box: Anthropic, OpenAI, Ollama (a local model), or any OpenAI-compatible API endpoint. The architecture restricts outbound network calls to exactly two: one to Plaid for bank data sync, and one to the chosen AI provider with masked data.

Additionally, the tool implements a behavioral scoring system that rates your financial behavior on a 0-100 scale. This includes streak tracking and 14 unlockable achievements, gamifying the financial advisory experience.

key technical strengths and tradeoffs

The standout feature is the privacy-first design that balances data utility with security. Storing data locally encrypted in an AES-256 SQLite database ensures your raw financial information never leaves your device unprotected. The PII redaction pipeline before AI calls further reduces risk by stripping sensitive details from any outbound data.

The persistent context.md file is a practical approach to maintaining long-term memory across conversations without bloating AI input tokens or exposing raw data. This pattern could serve as a blueprint for building other privacy-conscious AI agents.

Supporting multiple AI providers, including a local Ollama option, adds flexibility for different privacy and cost preferences. The two outbound calls architecture simplifies threat modeling.

However, this design also has tradeoffs. Local encrypted storage demands users manage their own backups and device security — losing access means losing data. The PII redaction pipeline may occasionally remove useful context, limiting the AI’s effectiveness.

The behavioral scoring system, while a nice engagement feature, relies on heuristics that might not suit all financial behaviors or goals.

The code quality is decent for a TypeScript CLI project, with clear separation of concerns between data sync, encryption, context management, and AI interaction layers. The README is well-structured with setup instructions and explanations.

quick start

npm install -g ray-finance
ray setup

The setup wizard offers two modes:

Pro (quick setup)

We handle the API keys. Your data stays local. $10/mo.

  1. Enter your name
  2. Get a Ray API key (opens Stripe checkout)
  3. Link your accounts — checking, savings, credit cards, investments, loans, mortgage
  4. Done — daily sync auto-scheduled at 6am

Bring your own keys

Bring your own AI and Plaid credentials. Free forever.

  1. Pick your AI provider — Anthropic, OpenAI, Ollama (local), or any OpenAI-compatible endpoint
  2. Enter your API key and pick a model
  3. Enter your Plaid credentials (get free keys)
  4. Link your accounts — checking, savings, credit cards, investments, loans, mortgage
  5. Done

who should consider ray-finance

ray-finance is ideal for technically inclined users who want a privacy-first, local solution for AI-augmented personal finance advice. Its local encryption and PII masking pipeline offer a solid privacy model, especially compared to cloud-based finance tools.

Developers and privacy-conscious users will appreciate the open architecture and the ability to bring your own AI and Plaid keys for free. The persistent context feature enables more natural conversations with AI advisors over time.

On the flip side, the manual setup and local storage management may be a hurdle for casual users. The tool assumes some command-line comfort and responsibility for security.

Overall, ray-finance presents a practical, well-engineered blueprint for building privacy-preserving AI agents that feel personalized without compromising sensitive data.


→ GitHub Repo: cdinnison/ray-finance ⭐ 194 · TypeScript