Metadata-Version: 2.4
Name: gitodo
Version: 0.1.3
Summary: Git-based local TODO management
Author-email: ooooofish <ooooofish@126.com>
Maintainer-email: ooooofish <ooooofish@126.com>
License: MIT License
        
        Copyright (c) 2025 whillhill
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://gitee.com/whillhill/gitodo
Project-URL: Bug Tracker, https://gitee.com/whillhill/gitodo/issues
Project-URL: Documentation, https://gitee.com/whillhill/gitodo/wikis
Project-URL: Repository, https://gitee.com/whillhill/gitodo.git
Project-URL: Source Code, https://gitee.com/whillhill/gitodo
Keywords: todo,git,cli,task-management,local
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Office/Business :: Scheduling
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0.0
Requires-Dist: mcp>=0.1.0
Dynamic: license-file

# Gitodo CLI

基于 Git 的本地 TODO 管理工具，所有数据存放在 `~/.gitodo` 并由 Git 记录历史。

## 安装
- 使用 uv（推荐）：`uv pip install .`
- 或使用 pip：`pip install .`

## 默认数据目录
- `~/.gitodo/`（启动或命令首次运行时自动创建并 `git init`）
- 主要文件：`TODO.md`、`archive/`、`resources/`、`.storage.lock`、`gitodo.toml`

## 配置（可选）
`~/.gitodo/gitodo.toml`（如不存在会自动生成）示例：
```toml
debug = false
log_level = "INFO"
repo_path = "~/.gitodo"
auto_commit = true
commit_message_template = "gitodo {action}: {summary}"
plain_output = false
show_pins_default = true
show_preview_default = false
```

## 常用命令
（所有命令默认作用于 `~/.gitodo`，如需自定义目录可设置环境变量 `GITODO_REPO_PATH` 或 `--config` 指定）

- 初始化：`gitodo init`
- 查看状态：`gitodo status`
- 切换/创建分支：`gitodo checkout <branch>`；查看分支：`gitodo branch`
- 固定说明（pin）：`gitodo pin "分支长期说明"`（写入 TODO.md 顶部 PINS 块，支持 `--tags/#tag` `--context/@ctx` `--priority/!P1`，遵循自动提交策略）
- 追加任务：`gitodo add "写方案" [--done] [--tags #tag ...] [--context @home] [--priority !P1] [--resource resources/x.png] [--commit|--no-commit]`
  - 快捷追加（等价 add）：`gitodo "写方案"`
- 完成任务：`gitodo done <id或序号> [--status todo|done|all] [--commit|--no-commit]`
- 列出任务：`gitodo list [--limit N] [--status todo|done|all] [--with-id] [--no-id] [--with-pin|--no-pin] [--preview|--no-preview]`
  - 默认 `limit=7`，展示最新 N 条任务（倒序）；PINS 块默认展示，可用 `--no-pin` 或配置 `show_pins_default=false` 关闭；原文预览默认关闭，可用 `--preview` 或配置 `show_preview_default=true` 开启
- 查看差异：`gitodo diff [path] [--cached]`
- 归档完成项：`gitodo archive [--date YYYY-MM-DD | --since ... --until ...] [--dry-run] [--commit|--no-commit] [-m msg]`
- 手动提交：`gitodo commit [-m msg]`
- 输出模式：默认使用简化 Rich 样式，纯文本回退由配置 `plain_output` 控制（不再提供命令行开关）；主要输出遵循轻量 Table/Markdown，无大面积 Panel。

## 任务行格式（TODO.md）
- 每日块：`## YYYY-MM-DD`
- 任务行：`- [ ] HH:MM 描述 #tag @ctx !P1 (id:xxxx) +res:resources/file`
  - `[ ]`/`[x]`/`[-]`/`[?]` 表示 待办/完成/取消/阻塞
  - 完成时自动追加 `@done(YYYY-MM-DD HH:MM)`

## 归档规则
- `archive` 将已完成/取消的任务移至 `archive/YYYY/MM/DD/TODO.md`，并复制引用的 `resources/`。
- `--dry-run` 仅预览，不落盘；自动去重同一行。

## 自动提交
- 默认开启，提交信息模板 `gitodo {action}: {summary}`；可通过 `--no-commit` 或配置 `auto_commit=false` 关闭。
