Current collected state Current
Observed since 21 Oct, 11:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
ai-img-gen
独立图像生成工具 - 支持智谱AI、OpenAI、自定义API,无需运行时依赖
独立图像生成工具,支持多种 AI 图像生成 API。
pip install image-gen-mcp
安装后可直接使用:
# 命令行工具
image-gen -k YOUR_KEY -t "一只可爱的橘猫"
# MCP 服务器配置到 ~/.claude/settings.json
image-gen-mcp
从 Releases 下载对应平台的可执行文件。
git clone https://github.com/your-username/image-gen.git
cd image_gen
python3 img_gen.py -k YOUR_KEY -t "风景"
# 智谱AI(默认)
image-gen -k YOUR_KEY -t "日落风景" -o ~/sunset.png
# OpenAI DALL-E
image-gen -p openai -k YOUR_KEY -m dall-e-3 -t "森林小屋"
# 自定义 API
image-gen -p custom -u https://api.example.com/v1/images -k KEY -t "山水画"
~/.claude/settings.json:{
"mcpServers": {
"image-gen": {
"command": "image-gen-mcp",
"env": {
"IMAGE_GEN_API_KEY": "your-api-key",
"IMAGE_GEN_MODEL": "cogview-3-flash"
}
}
}
}
你: 生成一张赛博朋克城市的图片
| 参数 | 说明 | 必需 |
|---|---|---|
--provider, -p | API 提供商 (zhipu/openai/custom) | 否 |
--api-key, -k | API 密钥 | 是 |
--model, -m | 模型名称 | 否 |
--api-url, -u | 自定义 API 地址 | 否 |
--prompt, -t | 图片描述 | 是 |
--size, -s | 图片尺寸 | 否 |
--output, -o | 输出路径 | 否 |
| 模型 | 说明 |
|---|---|
cogview-3-flash | 快速生成(推荐) |
cogview-3 | 高质量生成 |
API 密钥: https://open.bigmodel.cn/usercenter/apikeys
| 模型 | 说明 |
|---|---|
dall-e-2 | 标准质量 |
dall-e-3 | 高质量 |
API 密钥: https://platform.openai.com/api-keys
# Linux/macOS
chmod +x build.sh && ./build.sh
# Windows
build.bat
chmod +x publish.sh && ./publish.sh
image_gen/
├── img_gen.py # 独立可执行程序源码
├── mcp_server.py # MCP 服务器
├── build.sh # Linux/macOS 打包脚本
├── build.bat # Windows 打包脚本
├── publish.sh # PyPI 发布脚本
├── pyproject.toml # 项目配置
├── .github/workflows/ # CI/CD 配置
├── README.md # 本文档
└── LICENSE # MIT 许可证
urllib, json, pathlib, argparseDownload counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
mcpEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | mcp>=0.9.0; extra == "dev" | runtime |
pyinstallerEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pyinstaller; extra == "dev" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest; extra == "dev" | runtime |
mcpEnvironment{
"extras": "",
"marker": "extra == \"mcp\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | mcp>=0.9.0; extra == "mcp" | runtime |
bdist_wheel · 14.65 KB · Python py3
sdist · 6.97 KB · Python source
Observed since 21 Oct, 11:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:98ac086351ea0c20ba487e545d4afbfffcea508d6d8d79d89da74a91b4a5c568