Skip to content

ShanKonduru/create_py_proj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProjectForge MCP

This repository provides a project scaffolding engine with two interfaces:

  • CLI entry via create_project_files.py
  • MCP server via mcp_server.py

It can create Python project scaffolds, generate project README files, generate script helpers (.bat, .sh, or both), initialize git, and integrate with GitHub.

Capabilities

  • Create project scaffolds using templates (basic, cli)
  • Generate README for created projects
  • Generate helper scripts by mode:
    • bat for Windows only
    • sh for Linux/macOS only
    • both for cross-platform
    • none for no helper scripts
  • Optional unit-test scaffolding
  • Optional coverage setup with HTML reporting (pytest-cov, pytest-html)
  • Initialize git and create first commit
  • Create GitHub repo and connect/push remote

Project Files

  • create_project_files.py: CLI wrapper and optional MCP launch mode
  • scaffold_core.py: Reusable core scaffolding logic
  • mcp_server.py: MCP tools exposed through FastMCP
  • tests/test_scaffold_core.py: Unit tests for scaffold behavior

Prerequisites

  • Python 3.9+
  • git available in PATH
  • For MCP mode: mcp package
  • For GitHub integration: Personal Access Token with repo permissions

Install Dependencies (for this utility)

python -m pip install mcp pytest

CLI Usage

Basic interactive mode:

python create_project_files.py

Basic non-interactive mode:

python create_project_files.py --name my_app

Generate only .bat scripts and include test+coverage:

python create_project_files.py --name my_app --script-mode bat

Generate only .sh scripts, without tests:

python create_project_files.py --name my_app --script-mode sh --no-tests

Use CLI template and initialize git:

python create_project_files.py --name my_cli --template cli --git-init

Create GitHub repo and push first commit:

python create_project_files.py --name my_app --git-init --github-create --github-private --github-push --github-token <TOKEN>

Start MCP Server

python create_project_files.py --run-mcp-server

Or directly:

python mcp_server.py

Installed console commands:

projectforge-cli --name my_app
projectforge-mcp-server

MCP Tools

  • create_project_scaffold
    • Create scaffold with template, script mode, tests, and coverage options
  • create_project_readme
    • Regenerate README for an existing project
  • create_helper_scripts
    • Generate only helper scripts for an existing project
  • git_initialize_project
    • Initialize git and make initial commit
  • github_create_repo
    • Create GitHub repository using token auth
  • github_connect_remote
    • Add remote and optionally push initial commit
  • scaffold_and_publish
    • End-to-end flow combining scaffold + git + GitHub

Test and Coverage in Generated Projects

When tests are enabled (include_tests=True), generated projects include:

  • tests/ package with starter unit tests
  • pytest.ini
  • test helper scripts (005_run_test.*)

When coverage is enabled (include_coverage=True), generated projects include:

  • pytest-cov dependency
  • coverage helper scripts (006_run_code_cov.*)
  • HTML coverage report output support

Run Unit Tests for This Utility

python -m pytest tests -q

Notes on GitHub Integration

  • Use --github-token or set GITHUB_TOKEN environment variable
  • Remote URL defaults to HTTPS clone URL returned by GitHub API
  • Initial push is optional via --github-push

About

create_py_proj is python project skelton creator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors