Metadata-Version: 2.4
Name: devkit-tools
Version: 0.1.0
Summary: 面向开发者的命令行工具包：数据格式转换 + 环境诊断
Project-URL: Homepage, https://github.com/yukinpost/devkit-cli
Project-URL: Issues, https://github.com/yukinpost/devkit-cli/issues
Author-email: yukinpost <jasonliaojx98@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,convert,envcheck,json,toml,yaml
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: click>=8.1
Requires-Dist: packaging>=23.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: tomli-w>=1.0
Requires-Dist: tomli>=2.0; python_version < '3.11'
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
Requires-Dist: pytest>=7.4; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Description-Content-Type: text/markdown

# devkit-tools

[![CI](https://github.com/yukinpost/devkit-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/yukinpost/devkit-cli/actions/workflows/ci.yml)

面向开发者的命令行工具包。v0.1 提供两个开箱即用的子命令：

- **`convert`** — 在 JSON / YAML / TOML / CSV 之间互相转换
- **`envcheck`** — 诊断开发环境中必备工具的安装与版本

> 路线图模块（`templater` / `watch` / `gitstats`）见 [docs/requirements.md](docs/requirements.md)，将在 v0.2+ 实现。

## 安装

```bash
pip install devkit-tools
```

需要 Python 3.10+。

## convert

```bash
# 文件互转（输出格式由扩展名推断）
devkit convert config.json config.yaml

# 显式指定格式
devkit convert data.txt --from json --to toml

# 管道模式
cat data.json | devkit convert --to yaml

# 美化输出
devkit convert data.json --to json --pretty
```

支持矩阵与边界（如 CSV 仅支持二维表）见 [docs/requirements.md](docs/requirements.md) 2.2.1。

## envcheck

```bash
# 用预置检查项诊断环境
devkit envcheck

# 自定义检查项 + 输出修复建议
devkit envcheck --config examples/config/dev-toolkit.yml --suggest-fix

# JSON 报告（便于 CI 消费）
devkit envcheck --format json
```

任一检查未通过时返回非零退出码。`--suggest-fix` 只输出建议，**不会修改你的系统**。

## 开发

```bash
pip install -e ".[dev]"
pytest          # 测试 + 覆盖率
ruff check .    # lint
mypy            # 类型检查
```

## License

[MIT](LICENSE)
