Metadata-Version: 2.4
Name: deepseek-balance-monitor-mac
Version: 0.1.6
Summary: macOS menu bar monitor for DeepSeek API balance and usage
Author: Rock
License-Expression: MIT
Keywords: deepseek,macos,menu-bar,balance-monitor,rumps
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Environment :: MacOS X :: Cocoa
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: Pillow>=10.0.0
Requires-Dist: rumps>=0.4.0
Requires-Dist: cryptography>=42.0.0
Requires-Dist: pyobjc-core>=10.0; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-Cocoa>=10.0; sys_platform == "darwin"
Provides-Extra: build
Requires-Dist: pyinstaller>=6.20.0; extra == "build"
Requires-Dist: build>=1.2.2; extra == "build"
Requires-Dist: twine>=5.1.1; extra == "build"
Dynamic: license-file

# DeepSeek Balance Monitor for Mac

一个面向 macOS 的 DeepSeek 余额监控菜单栏应用。

它会常驻菜单栏，帮助你快速查看余额、今日消耗、日均消耗和服务状态，并在余额不足或消耗异常时提醒你。

[下载最新版本](https://github.com/github653224/DeepSeekBalanceMonitorForMac/releases/latest)

## 项目定位

- mac 原生菜单栏应用
- 原生设置窗口
- 原生历史记录窗口
- 支持源码运行
- 支持打包 `.app`
- 支持打包 `.dmg`

当前仓库聚焦 mac 产品线，后续优先围绕 mac 版本持续演进。

## 主要功能

- 查询 DeepSeek API 余额
- 显示人民币 / 美元余额
- 显示今日消耗
- 显示日均消耗
- 显示服务状态
- 低余额提醒
- 今日消耗阈值提醒
- 本地 SQLite 历史记录
- CSV 导出
- 本地安全存储 API Key

## 界面预览

菜单栏主界面：

![菜单栏主界面](docs/images/screenshots/menu-bar.png)

设置窗口：

![设置窗口](docs/images/screenshots/settings-window.png)

低余额提醒：

![低余额提醒](docs/images/screenshots/low-balance-alert.png)

## 为什么值得用

- 菜单栏常驻，打开电脑就能看到余额状态
- 不用反复打开网页，查询路径更短
- 支持低余额阈值提醒和日消耗提醒
- 支持历史记录沉淀，方便回看消耗变化
- 支持本地运行、`.app` 分发和 `.dmg` 安装
- 已开源，可自行审查代码和二次开发

## 快速开始

建议先准备好 Python 3.11+ 环境，再安装项目依赖。

```bash
cd /path/to/DeepSeekBalanceMonitorForMac
uv pip install -e '.[build]'
python main.py
```

也可以这样启动：

```bash
python -m deepseek_balance_monitor_mac
```

## 常用开发命令

运行应用：

```bash
python main.py
```

运行测试：

```bash
python -m unittest tests.test_core
```

检查关键入口是否可编译：

```bash
python -m py_compile \
  main.py \
  src/deepseek_balance_monitor_mac/mac/main.py \
  src/deepseek_balance_monitor_mac/mac/settings.py
```

## 打包命令

打包 `.app`：

```bash
bash scripts/build_mac.sh
```

打包 `.dmg`：

```bash
bash scripts/build_dmg.sh
```

## 下载与安装

普通用户建议直接前往 GitHub Releases 下载：

- `.dmg`：适合 mac 用户安装使用
- `.zip`：适合手动解压体验

下载地址：

- [GitHub Releases](https://github.com/github653224/DeepSeekBalanceMonitorForMac/releases)

## 项目结构

```text
DeepSeekBalanceMonitorForMac/
  main.py
  pyproject.toml
  README.md
  docs/
  scripts/
  src/
    deepseek_balance_monitor_mac/
      core/
      infra/
      mac/
      assets/
  tests/
```

更多说明见：

- [开发指南](docs/DEVELOPMENT_GUIDE.md)
- [公众号文章草稿](docs/WECHAT_ARTICLE_DEEPSEEK_MONITOR_OPEN_SOURCE.md)
- [发布指南](docs/RELEASE_GUIDE.md)
- [贡献指南](CONTRIBUTING.md)
- [安全说明](SECURITY.md)

## 开源前建议

- 确认代码和文档里没有真实 API Key
- 不提交 `build/`、`dist/`、`*.egg-info/`、`__pycache__/`
- 检查截图和示例数据中是否包含隐私信息
- 推送前先完成一次基础测试和打包验证

## 许可证

本项目使用 MIT License。
