Skip to main content

create-goin

🚀 Python 项目初始化工具 - 快速创建标准化的项目骨架

Python Version License Code style: black


✨ 特性

  • 🎯 快速创建 - 一条命令快速搭建项目骨架
  • 📦 模板支持 - 支持从 Git 仓库克隆各类项目模板
  • 🎨 灵活配置 - YAML 配置文件管理模板,易于扩展
  • 🤖 智能替换 - 自动替换模板中的变量(项目名、作者等)
  • 💬 交互友好 - 支持交互式和非交互式两种模式
  • 🔧 开箱即用 - 创建后即可开始开发,无需额外配置

📦 安装

使用 pip 安装

pipx install create-goin

从源码安装

git clone XXXXX
cd create-goin
pip install -e .

🚀 快速开始

1. 交互式创建项目

create-goin

工具会引导你输入项目信息:

  • 项目名称
  • 项目描述
  • 作者名称
  • 选择模板类型

2. 直接指定项目名称

create-goin my-awesome-project

📚 命令行参数

Usage: create-goin [OPTIONS] [PROJECT_NAME]

Options:
  -t, --template TEXT          项目模板类型(可选值见 --list-templates)
  -o, --output-dir PATH        项目输出目录(默认为当前目录)
  -y, --non-interactive        非交互模式,使用默认值
  -l, --list-templates         列出所有可用的模板
  --version                    显示版本信息
  --help                       显示帮助信息

🎨 可用模板

查看所有可用模板:

create-goin --list-templates

内置模板

模板名称 描述 类型
ml-model-service 机器学习模型服务项目模板 Git 模板

⚙️ 配置模板

你可以通过修改 templates_config.yaml 来添加自定义模板:

templates:
  # 你的自定义模板
  my-custom-template:
    name: my-custom-template
    display_name: 我的自定义模板
    description: 这是一个自定义项目模板
    type: git
    source: https://github.com/your-org/your-template.git
    branch: main  # 可选,默认为 main
    variables:
      - PROJECT_NAME
      - PROJECT_DESCRIPTION
      - AUTHOR_NAME

# 设置默认模板
default_template: my-custom-template

# Git 克隆配置
git_config:
  timeout: 60  # 克隆超时时间(秒)
  depth: 1     # 浅克隆深度(加快克隆速度)

模板变量

模板中可以使用以下变量,工具会自动替换:

  • PROJECT_NAME - 项目名称
  • PROJECT_DESCRIPTION - 项目描述
  • AUTHOR_NAME - 作者名称

📖 使用示例

示例 1:创建 ML 模型服务项目

$ create-goin ml-service -t ml-model-service

🚀 欢迎使用 create-goin!

项目名称: ml-service
项目描述: 一个机器学习模型推理服务
作者名称: Your Name

✨ 确认创建项目? [Y/n]: y

🔨 正在创建项目...
✅ 项目创建成功!

📝 下一步操作:
  1. 进入项目目录:cd ml-service
  2. 创建虚拟环境:python -m venv .venv
  3. 安装依赖:pip install -e ".[dev]"
  4. 开始开发!

Release files for create-goin 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for create-goin 0.1.0
File Size Uploaded
create_goin-0.1.0.tar.gz 13.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for create-goin 0.1.0
File Interpreter ABI Platform
create_goin-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.2 kB

Release files / create_goin-0.1.0.tar.gz

Download URL create_goin-0.1.0.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c15005fd1bb281932fb20d2c53d401788b453855e4e73cf6119699248c4697bd
BLAKE2b-256 checksum
How to use checksums
9d567eaf532751ae1fecb152fb078405ddba4c2010c856ce81a7d809b56072f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / create_goin-0.1.0-py3-none-any.whl

Download URL create_goin-0.1.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5408458b107bb73ffebf9d4eba191c6c8c0785fe0c6f4a63caeb97010954b895
BLAKE2b-256 checksum
How to use checksums
8063b824061f7a42d116962feca0aeff8ca17f522d4d02fd02083716f4c3a73e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page