
pypreset
io.github.KaiErikNiermann由 GitHub 账号 KaiErikNiermann 发布v0.4.0更新于 Oct 24, 2026
Scaffold Python projects from YAML presets, augment existing projects with CI/tests.
概览
根据 YAML 预设脚手架生成和增强 Python 项目,为 AI 助手生成 CI 工作流、测试、Docker、文档和 PyPI 元数据。
- 可以做什么
- 从内置或自定义 YAML 预设创建项目,可覆盖包管理器、目录布局、类型检查器等选项
- 为现有项目添加 CI 工作流、测试、Dockerfile、devcontainer、文档、tox 和 README
- 校验项目结构,并用 act 在本地验证 GitHub Actions 工作流
- 列出和查看预设,读取或修改用户级默认配置
- 设置 pyproject.toml 中的 PyPI 元数据并生成徽章 Markdown
- 适用场景
- 适合新建 Python 包或命令行工具时快速得到配置齐全、风格统一的骨架,也适合为已有 Python 仓库补上 CI、测试、Docker 或文档,而无需手写配置文件。
- 运行要求
- 以本地 stdio 进程运行,通常通过 uvx 使用 pypreset[mcp] 包(或本地 pip 安装)。需要 Python 以及 uv 或 pip。工作流验证需要 act,完整运行需要 Docker;发布相关命令需要已安装并登录的 gh CLI。未声明任何 API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 pypreset,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
A meta-tool for scaffolding Python projects with configurable YAML presets.
Supports Poetry, uv, and setuptools, generates CI workflows, testing scaffolds, type checking configs, and more.
mcp-name: io.github.KaiErikNiermann/pypreset
Features
- Preset-based project creation from YAML configs with single inheritance
- Augment existing projects with CI workflows, tests, Docker, documentation, and more
- Three package managers: Poetry, uv (PEP 621 + hatchling), and setuptools (PEP 621 + setuptools.build_meta)
- Two layout styles:
src/layout and flat layout - Type checking: mypy, pyright, ty, or none
- Code quality: ruff linting/formatting, radon complexity checks, pre-commit hooks
- Docker & devcontainer: generate multi-stage Dockerfiles,
.dockerignore, and VS Code devcontainer configs (Docker or Podman) - Coverage integration: Codecov support with configurable thresholds and ignore patterns
- Documentation scaffolding: MkDocs (Material theme) or Sphinx (RTD theme) with optional GitHub Pages deployment
- Multi-environment testing: tox configuration with tox-uv backend
- pyenv / .python-version: generate
.python-versionfor pyenv and uv, withpython-version-filein CI workflows - Version management: bump-my-version integration, GitHub release automation via
ghCLI - Workflow verification: local GitHub Actions testing with
act(auto-detect, auto-install, dry-run and full-run modes) - PyPI metadata management: read, set, and check publish-readiness of
pyproject.tomlmetadata - User defaults: persistent config at
~/.config/pypreset/config.yaml - MCP server: expose all functionality to AI coding assistants via the Model Context Protocol
Installation
Quick Start
Commands
create -- Scaffold a new project
augment -- Add components to an existing project
Analyzes pyproject.toml to auto-detect your tooling, then generates the selected components. Runs in interactive mode by default (prompts for values it can't detect); use --auto to skip prompts.
Available components:
workflow -- Local workflow verification
Verify GitHub Actions workflows locally using act. The proxy auto-detects whether act is installed, can install it on supported systems, and surfaces all act output directly.
Supported auto-install targets: Arch Linux (pacman), Ubuntu/Debian (apt), Fedora (dnf), macOS/Linux with Homebrew. Other systems get a link to the act installation page.
version -- Release management
Requires the gh CLI to be installed and authenticated.
metadata -- PyPI metadata management
badges -- Generate badge markdown
Reads pyproject.toml to detect your project name, repository URL, and license, then prints badge markdown you can paste into your README.
Other commands
Presets
Built-in presets: empty-package, cli-tool, data-science, discord-bot.
Presets are YAML files that define metadata, dependencies, directory structure, testing, formatting, and more. They support single inheritance via the base: field. Presets can override the README template by setting metadata.readme_template to a custom .j2 filename.
Custom presets
Place custom preset files in ~/.config/pypreset/presets/ or pass a file directly:
User presets take precedence over built-in presets with the same name.
User Configuration
Persistent defaults are stored at ~/.config/pypreset/config.yaml and applied as the lowest-priority layer (presets and CLI flags override them).
MCP Server
pypreset is published to the MCP Registry as io.github.KaiErikNiermann/pypreset.
Install via the registry (recommended):
Or install locally:
Available tools:
Resources: preset://list, config://user, template://list
Prompts: create-project, augment-project
Development
All tasks use the Justfile:
See CONTRIBUTING.md for development setup and guidelines.
License
MIT
来源:README.md,提交 c6513eb
工具
0版本历史
1- v0.4.0最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。