ray-finance 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/package.json +4 -1
- package/.claude/settings.local.json +0 -18
- package/.env.example +0 -13
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -19
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -9
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -5
- package/.github/ray-logo.png +0 -0
- package/.github/workflows/ci.yml +0 -22
- package/CHANGELOG.md +0 -16
- package/CODE_OF_CONDUCT.md +0 -31
- package/CONTRIBUTING.md +0 -41
- package/Dockerfile +0 -8
- package/SECURITY.md +0 -36
- package/docker-compose.yml +0 -9
- package/site/next-env.d.ts +0 -6
- package/site/next.config.ts +0 -7
- package/site/package-lock.json +0 -1704
- package/site/package.json +0 -25
- package/site/postcss.config.mjs +0 -7
- package/site/public/favicon.png +0 -0
- package/site/public/ray-logo-dark.png +0 -0
- package/site/public/ray-logo-light.png +0 -0
- package/site/public/ray-og.jpg +0 -0
- package/site/public/robots.txt +0 -4
- package/site/public/sitemap.xml +0 -8
- package/site/src/app/copy-command.tsx +0 -29
- package/site/src/app/globals.css +0 -87
- package/site/src/app/layout.tsx +0 -65
- package/site/src/app/page.tsx +0 -841
- package/site/src/app/pii-scramble.tsx +0 -190
- package/site/src/app/reveal.tsx +0 -29
- package/site/tsconfig.json +0 -21
- package/src/ai/agent.ts +0 -118
- package/src/ai/audit.ts +0 -11
- package/src/ai/context.ts +0 -94
- package/src/ai/insights.ts +0 -496
- package/src/ai/memory.ts +0 -21
- package/src/ai/redactor.test.ts +0 -63
- package/src/ai/redactor.ts +0 -114
- package/src/ai/system-prompt.ts +0 -90
- package/src/ai/tools.ts +0 -720
- package/src/alerts/index.ts +0 -123
- package/src/cli/backup.ts +0 -126
- package/src/cli/chat.ts +0 -219
- package/src/cli/commands.ts +0 -240
- package/src/cli/format.ts +0 -180
- package/src/cli/index.ts +0 -203
- package/src/cli/scheduler.ts +0 -116
- package/src/cli/setup.ts +0 -194
- package/src/config.ts +0 -81
- package/src/daily-sync.test.ts +0 -150
- package/src/daily-sync.ts +0 -170
- package/src/db/connection.ts +0 -49
- package/src/db/encryption.test.ts +0 -86
- package/src/db/encryption.ts +0 -39
- package/src/db/helpers.ts +0 -47
- package/src/db/schema.test.ts +0 -53
- package/src/db/schema.ts +0 -202
- package/src/index.ts +0 -3
- package/src/plaid/client.ts +0 -25
- package/src/plaid/link.ts +0 -25
- package/src/plaid/sync.ts +0 -219
- package/src/public/favicon.png +0 -0
- package/src/public/link.html +0 -184
- package/src/public/ray-logo-dark.png +0 -0
- package/src/queries/index.test.ts +0 -397
- package/src/queries/index.ts +0 -586
- package/src/scoring/index.ts +0 -468
- package/src/server.ts +0 -198
- package/tsconfig.json +0 -16
- package/vitest.config.ts +0 -7
package/README.md
CHANGED
|
@@ -59,10 +59,16 @@ Open Ray and it shows your net worth, spending vs last month, budget pacing, and
|
|
|
59
59
|
- **Scheduled daily sync** — Automatic bank sync via launchd (macOS) or cron (Linux)
|
|
60
60
|
- **Export/import** — Back up and restore your financial data
|
|
61
61
|
|
|
62
|
+
## Install
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install -g ray-finance
|
|
66
|
+
```
|
|
67
|
+
|
|
62
68
|
## Quick Start
|
|
63
69
|
|
|
64
70
|
```bash
|
|
65
|
-
|
|
71
|
+
ray setup
|
|
66
72
|
```
|
|
67
73
|
|
|
68
74
|
The setup wizard offers two modes:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ray-finance",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Local-first CLI that turns your bank data into a personal AI financial advisor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18"
|
|
27
27
|
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/"
|
|
30
|
+
],
|
|
28
31
|
"bin": {
|
|
29
32
|
"ray": "./dist/cli/index.js"
|
|
30
33
|
},
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(npm install:*)",
|
|
5
|
-
"Bash(gh api:*)",
|
|
6
|
-
"mcp__paper__create_artboard",
|
|
7
|
-
"mcp__paper__write_html",
|
|
8
|
-
"mcp__paper__get_screenshot",
|
|
9
|
-
"mcp__paper__delete_nodes",
|
|
10
|
-
"Bash(npx next:*)",
|
|
11
|
-
"Bash(npx tsc:*)",
|
|
12
|
-
"Bash(git add:*)",
|
|
13
|
-
"Bash(git commit:*)",
|
|
14
|
-
"Bash(npm run:*)",
|
|
15
|
-
"Bash(npm test:*)"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
package/.env.example
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Anthropic API key for AI chat — https://console.anthropic.com
|
|
2
|
-
ANTHROPIC_API_KEY=
|
|
3
|
-
|
|
4
|
-
# Plaid credentials for bank sync — https://dashboard.plaid.com
|
|
5
|
-
PLAID_CLIENT_ID=
|
|
6
|
-
PLAID_SECRET=
|
|
7
|
-
PLAID_ENV=production
|
|
8
|
-
|
|
9
|
-
# Database encryption key (any strong passphrase)
|
|
10
|
-
DB_ENCRYPTION_KEY=
|
|
11
|
-
|
|
12
|
-
# Separate key for encrypting stored Plaid access tokens (any strong passphrase)
|
|
13
|
-
PLAID_TOKEN_SECRET=
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug Report
|
|
3
|
-
about: Report a bug
|
|
4
|
-
labels: bug
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**What happened?**
|
|
8
|
-
|
|
9
|
-
**What did you expect?**
|
|
10
|
-
|
|
11
|
-
**Steps to reproduce**
|
|
12
|
-
1.
|
|
13
|
-
2.
|
|
14
|
-
3.
|
|
15
|
-
|
|
16
|
-
**Environment**
|
|
17
|
-
- OS:
|
|
18
|
-
- Node.js version:
|
|
19
|
-
- Ray version (`ray --version`):
|
package/.github/ray-logo.png
DELETED
|
Binary file
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
strategy:
|
|
13
|
-
matrix:
|
|
14
|
-
node-version: [18, 20, 22]
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
- uses: actions/setup-node@v4
|
|
18
|
-
with:
|
|
19
|
-
node-version: ${{ matrix.node-version }}
|
|
20
|
-
- run: npm install
|
|
21
|
-
- run: npm run build
|
|
22
|
-
- run: npm test
|
package/CHANGELOG.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 0.2.0
|
|
4
|
-
|
|
5
|
-
Initial open source release.
|
|
6
|
-
|
|
7
|
-
- CLI interface with 13 commands (`ray`, `setup`, `sync`, `link`, `status`, `transactions`, `spending`, `budgets`, `goals`, `score`, `alerts`, `export`, `import`)
|
|
8
|
-
- AI financial advisor powered by Claude with 13+ tools
|
|
9
|
-
- Plaid integration for bank sync (checking, savings, credit cards, investments, loans)
|
|
10
|
-
- Encrypted local SQLite database (AES-256)
|
|
11
|
-
- Daily financial scoring (0-100) with streaks and 14 achievements
|
|
12
|
-
- Budget tracking with overage alerts
|
|
13
|
-
- Financial goal tracking
|
|
14
|
-
- Transaction auto-recategorization via user-defined rules
|
|
15
|
-
- Conversation memory and persistent financial context
|
|
16
|
-
- Data export/import for backup and restore
|
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
-
|
|
7
|
-
## Our Standards
|
|
8
|
-
|
|
9
|
-
Examples of behavior that contributes to a positive environment:
|
|
10
|
-
|
|
11
|
-
- Being respectful of differing viewpoints and experiences
|
|
12
|
-
- Giving and gracefully accepting constructive feedback
|
|
13
|
-
- Focusing on what is best for the community
|
|
14
|
-
- Showing empathy towards other community members
|
|
15
|
-
|
|
16
|
-
Examples of unacceptable behavior:
|
|
17
|
-
|
|
18
|
-
- Trolling, insulting/derogatory comments, and personal or political attacks
|
|
19
|
-
- Public or private harassment
|
|
20
|
-
- Publishing others' private information without explicit permission
|
|
21
|
-
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
22
|
-
|
|
23
|
-
## Enforcement
|
|
24
|
-
|
|
25
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer at clark@rayfinance.app.
|
|
26
|
-
|
|
27
|
-
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
|
|
28
|
-
|
|
29
|
-
## Attribution
|
|
30
|
-
|
|
31
|
-
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
Thanks for your interest in contributing to Ray.
|
|
4
|
-
|
|
5
|
-
## Development Setup
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
git clone https://github.com/cdinnison/ray-finance.git
|
|
9
|
-
cd ray-finance
|
|
10
|
-
npm install
|
|
11
|
-
npm run build
|
|
12
|
-
npm link
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
You'll need Plaid and Anthropic API keys to test. Copy `.env.example` to `.env` and fill in your credentials.
|
|
16
|
-
|
|
17
|
-
## Making Changes
|
|
18
|
-
|
|
19
|
-
1. Fork the repo and create a branch from `main`
|
|
20
|
-
2. Make your changes
|
|
21
|
-
3. Run `npm run build` to verify the project compiles
|
|
22
|
-
4. Open a pull request
|
|
23
|
-
|
|
24
|
-
## Code Style
|
|
25
|
-
|
|
26
|
-
- TypeScript with strict mode
|
|
27
|
-
- ES modules (`"type": "module"`)
|
|
28
|
-
- Prefer simple, direct code over abstractions
|
|
29
|
-
- No unnecessary dependencies
|
|
30
|
-
|
|
31
|
-
## Reporting Bugs
|
|
32
|
-
|
|
33
|
-
Open a GitHub issue with:
|
|
34
|
-
- What you expected to happen
|
|
35
|
-
- What actually happened
|
|
36
|
-
- Steps to reproduce
|
|
37
|
-
- Your Node.js version and OS
|
|
38
|
-
|
|
39
|
-
## Security Issues
|
|
40
|
-
|
|
41
|
-
See [SECURITY.md](SECURITY.md) for reporting security vulnerabilities. Do not open public issues for security bugs.
|
package/Dockerfile
DELETED
package/SECURITY.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Security
|
|
2
|
-
|
|
3
|
-
## Architecture
|
|
4
|
-
|
|
5
|
-
Ray is local-first. All financial data is stored on your machine in an encrypted SQLite database. No data is sent to Ray servers because there are no Ray servers.
|
|
6
|
-
|
|
7
|
-
### Encryption
|
|
8
|
-
|
|
9
|
-
- **Database encryption**: The SQLite database is encrypted at rest using AES-256 via [SQLCipher](https://www.zetetic.net/sqlcipher/) (better-sqlite3-multiple-ciphers). The encryption key is provided during setup and stored in your local config.
|
|
10
|
-
- **Plaid token encryption**: Plaid access tokens are encrypted separately using AES-256-GCM with scrypt key derivation before being stored in the database.
|
|
11
|
-
- **File permissions**: Config and database files are created with `0600` permissions (owner read/write only).
|
|
12
|
-
|
|
13
|
-
### Data Flow
|
|
14
|
-
|
|
15
|
-
Ray makes outbound API calls to two services:
|
|
16
|
-
|
|
17
|
-
| Service | Purpose | When |
|
|
18
|
-
|---------|---------|------|
|
|
19
|
-
| Plaid | Sync bank transactions and balances | `ray sync`, `ray link` |
|
|
20
|
-
| Anthropic | AI-powered chat responses | `ray` (interactive chat) |
|
|
21
|
-
|
|
22
|
-
No telemetry, analytics, or usage data is collected or transmitted.
|
|
23
|
-
|
|
24
|
-
### PII Handling
|
|
25
|
-
|
|
26
|
-
When sending data to the Anthropic API for AI chat, Ray redacts personally identifiable information (account numbers, routing numbers) before transmission and restores it in the response for display.
|
|
27
|
-
|
|
28
|
-
## Reporting a Vulnerability
|
|
29
|
-
|
|
30
|
-
If you discover a security vulnerability, please report it responsibly:
|
|
31
|
-
|
|
32
|
-
1. **Do not** open a public GitHub issue
|
|
33
|
-
2. Email **clark@rayfinance.app** with details
|
|
34
|
-
3. Include steps to reproduce if possible
|
|
35
|
-
|
|
36
|
-
I will respond within 48 hours and work with you to address the issue before any public disclosure.
|
package/docker-compose.yml
DELETED
package/site/next-env.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="next" />
|
|
2
|
-
/// <reference types="next/image-types/global" />
|
|
3
|
-
/// <reference path="./.next/types/routes.d.ts" />
|
|
4
|
-
|
|
5
|
-
// NOTE: This file should not be edited
|
|
6
|
-
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|