介绍
# Copilot Money CLI
[个人理财应用](https://copilot.money) [Copilot Money](https://copilot.money) 的命令行界面。只需一次身份验证,即可从终端查询账户、交易、持仓和资产配置数据。
> **注意:** 这是一个非官方工具,与 Copilot Money 没有任何关联。
## 安装
```bash pip install copilot-money-cli ```
## 快速开始
```bash copilot-money config init copilot-money accounts copilot-money networth ```
## 命令
```bash copilot-money refresh # Refresh all bank connections copilot-money accounts # List accounts with balances copilot-money accounts --type CREDIT # Filter by type copilot-money accounts --json # Output as JSON copilot-money transactions # Recent transactions (default 20) copilot-money transactions --count 50 # Specify count copilot-money networth # Assets, liabilities, net worth copilot-money holdings # Investment holdings (grouped by type) copilot-money holdings --group account # Group by account copilot-money holdings --group symbol # Group by symbol copilot-money holdings --type ETF # Filter by security type copilot-money allocation # Stocks/bonds with US/Intl split copilot-money config show # Show config and token status copilot-money config init # Auto-detect token from browsers copilot-money config init --source chrome # From specific browser copilot-money config init --source manual # Manual token entry ```
## 身份验证
配置文件存储在 `~/.config/copilot-money/config.json`。CLI 会自动从 macOS 上支持的浏览器中检测您的 Copilot Money 刷新令牌。
- 自动检测:`copilot-money config init` - 指定来源:`copilot-money config init --source arc|chrome|safari|firefox` - 手动输入:`copilot-money config init --source manual`
使用浏览器自动检测时,CLI 会读取您浏览器的本地 IndexedDB 存储以查找您的 Copilot Money 会话令牌。此过程在本地进行 — 除 Copilot Money 的 API 外,不会向任何地方发送数据。
## 系统要求
- Python 3.10+ - macOS 用于提取浏览器令牌(手动输入令牌在任何地方均可使用)