Metadata-Version: 2.4
Name: soloflow
Version: 2.0.0
Summary: 文件驱动的 AI Skill 工具 —— 保存工作方法，按步骤自动执行
Project-URL: Homepage, https://github.com/halexzd686-cloud/SoloFlow
Project-URL: Repository, https://github.com/halexzd686-cloud/SoloFlow
Project-URL: Issues, https://github.com/halexzd686-cloud/SoloFlow/issues
Project-URL: Changelog, https://github.com/halexzd686-cloud/SoloFlow/blob/main/CHANGELOG.md
Author: SoloFlow Contributors
License: MIT License
        
        Copyright (c) 2026 SoloFlow Contributors
        
        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.
License-File: LICENSE
Keywords: ai,cli,llm,multi-agent,prompt-engineering,skill
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Requires-Dist: httpx>=0.28
Requires-Dist: jinja2>=3.1
Requires-Dist: pydantic>=2.10
Requires-Dist: python-dotenv>=1.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.9
Requires-Dist: typer>=0.15
Provides-Extra: dev
Requires-Dist: pre-commit>=4.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Description-Content-Type: text/markdown

# SoloFlow

> 把 AI 工作方法存成文件（Skill），按步骤自动执行（Flow）。

[![CI](https://github.com/halexzd686-cloud/SoloFlow/actions/workflows/ci.yml/badge.svg)](https://github.com/halexzd686-cloud/SoloFlow/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/soloflow.svg)](https://pypi.org/project/soloflow/)
[![Python](https://img.shields.io/badge/Python-3.12%2B-blue.svg)](https://www.python.org/)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

当前稳定版本：**v2.0.0**。从 v1 升级请先查看 [v2.0.0 变更与迁移说明](CHANGELOG.md#200---2026-08-10)。

## 30 秒跑通

需要 Python 3.12+ 和 [DeepSeek API Key](https://platform.deepseek.com/)。先配置密钥：

```powershell
$env:DEEPSEEK_API_KEY = "你的密钥"
```

或者在当前目录创建 `.env`：

```dotenv
DEEPSEEK_API_KEY=你的密钥
```

然后运行内置写作 Skill：

```bash
uvx soloflow run content-writer "为我的产品写一篇介绍"
```

不想产生 API 费用时，先预览最终 Prompt：

```bash
uvx soloflow run content-writer "为我的产品写一篇介绍" --dry-run
```

## 只需理解三个概念

- **Skill**：一份可以重复执行的 AI 工作手册，例如 [`content-writer`](skills/writing/content-writer/SKILL.md)。
- **Flow**：把多个 Skill 按依赖顺序串起来，例如 [`blog-pipeline`](flows/blog-pipeline.flow.yml)。
- **Agent（可选）**：给 Skill 加上固定角色和行为规则，例如 [`content-editor`](agents/content-editor.agent.yml)。

## 常用命令

| 命令 | 用途 |
| --- | --- |
| `sf run <skill> <task>` | 运行一个 Skill，推荐入口 |
| `sf skill list` | 查看可用 Skill |
| `sf skill show <name>` | 查看 Skill 内容 |
| `sf skill init <name>` | 创建 Skill |
| `sf flow run <name> -i key=value` | 运行 Flow |
| `sf flow runs` | 查看 Flow 运行记录 |
| `sf flow watch <run-id>` | 实时查看 Flow 进度 |
| `sf flow resume <run-id>` | 从失败处恢复 Flow |
| `sf agent run <name> <task>` | 用 Agent 执行任务 |

如果从源码开发，把 `sf` 换成 `uv run sf`。项目目录、`~/.soloflow/`、安装包内置资产按此顺序查找，同名文件以前者为准。

## 下一步

- [TrailLight 完整案例](docs/tutorial.md)
- [架构说明](docs/architecture.md)
- [项目状态](STATUS.md)
- [贡献指南](CONTRIBUTING.md)
- [版本记录](CHANGELOG.md)

## License

[MIT License](LICENSE)
