返回顶部
c

copilot-moneyCopilot资金查询

Query and analyze personal finance data from the Copilot Money Mac app. Use when the user asks about their spending, transactions, account balances, budgets, or financial trends from Copilot Money.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
642
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

copilot-money

Copilot Money

从Copilot Money Mac应用查询本地数据,分析交易、消费模式、账户余额、投资和预算。数据存储在SQLite(交易、余额)和Firestore LevelDB缓存(重复名称、预算、投资)中。

数据库位置

~/Library/Group Containers/group.com.copilot.production/database/CopilotDB.sqlite

表结构

Transactions表

所有金融交易的主表。

列名类型描述
idTEXT主键
date
DATE | 交易日期 |
| name | TEXT | 商户/交易名称 |
| original_name | TEXT | 银行原始名称 |
| amount | DOUBLE | 交易金额(正数=支出) |
| isocurrencycode | TEXT | 货币(例如USD) |
| account_id | TEXT | 关联账户引用 |
| category_id | TEXT | 类别引用 |
| pending | BOOLEAN | 交易是否待处理 |
| recurring | BOOLEAN | 交易是否重复 |
| recurring_id | TEXT | 关联重复定义(参见Firestore) |
| user_note | TEXT | 用户添加的备注 |
| user_deleted | BOOLEAN | 用户软删除 |

accountDailyBalance表

每个账户的每日余额快照。

列名类型描述
dateTEXT快照日期
account_id
TEXT | 账户引用 |
| current_balance | DOUBLE | 当日余额 |
| available_balance | DOUBLE | 可用余额 |

Firestore缓存(LevelDB)

额外数据存储在Firestore的本地LevelDB缓存中,而非SQLite数据库。

位置:

~/Library/Containers/com.copilot.production/Data/Library/Application Support/firestore/FIRAPP_DEFAULT/copilot-production-22904/main/*.ldb

集合

集合描述
items关联的银行账户/机构
investment_prices
历史证券价格 | | investment_performance | 每项持仓的TWR(时间加权收益率) | | investment_splits | 股票拆分历史 | | securities | 股票/基金元数据 | | users/.../budgets | 预算定义(金额、category_id) | | users/.../recurrings | 重复交易定义 | | amazon | 亚马逊订单匹配数据 |

重复定义

字段描述
name显示名称(例如水费/排污费、租金)
match_string
要匹配的交易名称(例如CHECK PAID) | | plaidcategoryid | 重复交易的类别ID | | state | active或inactive |

不在SQLite中的数据

  • - 重复名称 - 人类可读的名称,如租金、Netflix
  • 预算金额 - 每个类别的月度预算
  • 投资数据 - 持仓、价格、表现、拆分
  • 账户/机构名称 - 摩根大通、富达等
  • 类别名称 - 餐厅、旅行、杂货等

从LevelDB提取数据

列出所有重复名称:
bash
for f in ~/Library/Containers/com.copilot.production/Data/Library/Application\ Support/firestore/FIRAPP_DEFAULT/copilot-production-22904/main/*.ldb; do
strings $f 2>/dev/null | grep -B10 ^state$ | grep -A1 ^name$ | grep -v ^name$ | grep -v ^--$
done | sort -u | grep -v ^$

列出所有集合:
bash
for f in ~/Library/Containers/com.copilot.production/Data/Library/Application\ Support/firestore/FIRAPP_DEFAULT/copilot-production-22904/main/*.ldb; do
strings $f 2>/dev/null
done | grep -oE documents/[a-z_]+/ | sort | uniq -c | sort -rn

查找类别名称:
bash
for f in ~/Library/Containers/com.copilot.production/Data/Library/Application\ Support/firestore/FIRAPP_DEFAULT/copilot-production-22904/main/*.ldb; do
strings $f 2>/dev/null
done | grep -iE ^(groceries|restaurants|shopping|entertainment|travel|transportation|utilities)$ | sort -u

常用查询

近期交易

sql SELECT date, name, amount, category_id FROM Transactions WHERE user_deleted = 0 ORDER BY date DESC LIMIT 20;

月度支出汇总

sql SELECT strftime(%Y-%m, date) as month, SUM(amount) as total FROM Transactions WHERE amount > 0 AND user_deleted = 0 GROUP BY month ORDER BY month DESC;

按类别支出

sql SELECT category_id, SUM(amount) as total, COUNT(*) as count FROM Transactions WHERE amount > 0 AND user_deleted = 0 AND date >= date(now, -30 days) GROUP BY category_id ORDER BY total DESC;

搜索交易

sql SELECT date, name, amount FROM Transactions WHERE name LIKE %SEARCHTERM% AND userdeleted = 0 ORDER BY date DESC;

列出重复交易

sql SELECT DISTINCT name, recurring_id FROM Transactions WHERE recurring = 1 AND user_deleted = 0 ORDER BY name;

使用方法

使用sqlite3查询数据库:

bash
sqlite3 ~/Library/Group\ Containers/group.com.copilot.production/database/CopilotDB.sqlite YOUR_QUERY

格式化输出:
bash
sqlite3 -header -column ~/Library/Group\ Containers/group.com.copilot.production/database/CopilotDB.sqlite YOUR_QUERY

注意事项

  • - 类别ID是不透明字符串 - 按它们分组进行分析(名称在Firestore缓存中)
  • 金额正数为支出,负数为收入
  • 过滤userdeleted = 0以排除已删除的交易
  • 两个数据库均由应用主动使用;只读访问是安全的
  • SQLite有recurringid关联到Firestore重复定义
  • 在LevelDB文件上使用strings命令提取Firestore缓存中的人类可读数据

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 copilot-money-mac-1776419987 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 copilot-money-mac-1776419987 技能

通过命令行安装

skillhub install copilot-money-mac-1776419987

下载

⬇ 下载 copilot-money v1.0.0(免费)

文件大小: 3.51 KB | 发布时间: 2026-4-17 18:42

v1.0.0 最新 2026-4-17 18:42
A Claude Code plugin for querying personal finance data from the Copilot Money Mac app.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部