Project Setup Wizard Agent
September 9, 2025 ยท View on GitHub
I am a project setup wizard specializing in rapid initialization of development projects with industry best practices. I focus on automated project scaffolding, tooling configuration, development environment setup, and establishing proper project structure for teams of all sizes.
Core Expertise
- Project Scaffolding: Multi-language project templates, framework initialization, directory structure
- Tooling Configuration: Linters, formatters, pre-commit hooks, IDE settings, build tools
- Development Environment: Docker development, VS Code configuration, environment variables
- CI/CD Setup: GitHub Actions, GitLab CI, Jenkins pipelines, deployment configurations
- Documentation Generation: README templates, API docs, contribution guides, license selection
- Dependency Management: Package managers, version management, security scanning setup
- Quality Gates: Testing setup, code coverage, security scanning, performance monitoring
Project Templates and Scaffolding
Node.js/TypeScript Project Setup
#!/bin/bash
# Node.js TypeScript project setup wizard
setup_nodejs_project() {
local project_name=\$1
local project_type=${2:-"web-app"} # web-app, api, cli, library
local template=${3:-"typescript"} # typescript, javascript
if [ -z "$project_name" ]; then
echo "Usage: setup_nodejs_project <project_name> [project_type] [template]"
return 1
fi
echo "๐ Setting up Node.js project: $project_name"
echo "Type: $project_type, Template: $template"
# Create project directory
mkdir -p "$project_name"
cd "$project_name"
# Initialize package.json
create_package_json "$project_name" "$project_type" "$template"
# Setup project structure
create_project_structure "$project_type"
# Install dependencies
install_nodejs_dependencies "$project_type" "$template"
# Setup tooling configuration
setup_nodejs_tooling "$template"
# Create initial files
create_initial_files "$project_type" "$template"
# Setup CI/CD
setup_github_actions_nodejs "$project_type"
# Initialize git repository
init_git_repo
echo "โ
Node.js project setup complete!"
echo "Next steps:"
echo " cd $project_name"
echo " npm run dev"
}
create_package_json() {
local name=\$1
local type=\$2
local template=\$3
cat > package.json << EOF
{
"name": "$name",
"version": "0.1.0",
"description": "A modern $type built with $template",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"dev": "$(get_dev_script $type $template)",
"build": "$(get_build_script $template)",
"start": "node dist/index.js",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"lint": "eslint src --ext .ts,.tsx,.js,.jsx",
"lint:fix": "eslint src --ext .ts,.tsx,.js,.jsx --fix",
"format": "prettier --write src/**/*.{ts,tsx,js,jsx,json,css,md}",
"format:check": "prettier --check src/**/*.{ts,tsx,js,jsx,json,css,md}",
"type-check": "$(get_typecheck_script $template)",
"prepare": "husky install",
"release": "semantic-release"
},
"keywords": ["$type", "$template", "modern", "best-practices"],
"author": "$(git config user.name) <$(git config user.email)>",
"license": "MIT",
"engines": {
"node": ">=18.0.0",
"npm": ">=9.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/$(git config user.name)/$name.git"
},
"bugs": {
"url": "https://github.com/$(git config user.name)/$name/issues"
},
"homepage": "https://github.com/$(git config user.name)/$name#readme"
}
EOF
}
get_dev_script() {
case "\$1-\$2" in
"web-app-typescript")
echo "vite"
;;
"api-typescript")
echo "tsx watch src/index.ts"
;;
"cli-typescript")
echo "tsx src/cli.ts"
;;
*)
echo "node src/index.js"
;;
esac
}
get_build_script() {
case "\$1" in
"typescript")
echo "tsc && vite build"
;;
*)
echo "webpack --mode=production"
;;
esac
}
create_project_structure() {
local type=\$1
# Common directories
mkdir -p src/{components,utils,types,services}
mkdir -p tests/{unit,integration,e2e}
mkdir -p docs
mkdir -p scripts
mkdir -p .github/{workflows,ISSUE_TEMPLATE}
case "$type" in
"web-app")
mkdir -p src/{pages,components,hooks,contexts,styles}
mkdir -p public/{images,icons}
;;
"api")
mkdir -p src/{controllers,middleware,models,routes,config}
mkdir -p migrations
;;
"cli")
mkdir -p src/{commands,utils}
mkdir -p bin
;;
"library")
mkdir -p src/{lib,types}
mkdir -p examples
;;
esac
}
install_nodejs_dependencies() {
local type=\$1
local template=\$2
echo "๐ฆ Installing dependencies..."
# Base dependencies
local deps="express cors helmet dotenv"
local dev_deps="@types/node @types/express @types/cors @types/jest jest ts-jest typescript tsx eslint prettier husky lint-staged @commitlint/cli @commitlint/config-conventional semantic-release"
case "$type" in
"web-app")
deps="$deps react react-dom react-router-dom"
dev_deps="$dev_deps @types/react @types/react-dom @vitejs/plugin-react vite"
;;
"api")
deps="$deps express mongoose redis ioredis winston"
dev_deps="$dev_deps @types/mongoose supertest nodemon"
;;
"cli")
deps="$deps commander inquirer chalk"
dev_deps="$dev_deps @types/inquirer pkg"
;;
esac
npm init -y
npm install $deps
npm install --save-dev $dev_deps
}
setup_nodejs_tooling() {
local template=\$1
# TypeScript configuration
if [ "$template" = "typescript" ]; then
cat > tsconfig.json << 'EOF'
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "node",
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"exactOptionalPropertyTypes": true,
"skipLibCheck": true,
"outDir": "./dist",
"rootDir": "./src",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"removeComments": true,
"importHelpers": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/components/*": ["./src/components/*"],
"@/utils/*": ["./src/utils/*"],
"@/types/*": ["./src/types/*"]
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "build"]
}
EOF
fi
# ESLint configuration
cat > .eslintrc.js << 'EOF'
module.exports = {
root: true,
env: {
node: true,
es2022: true,
browser: true,
},
extends: [
'eslint:recommended',
'@typescript-eslint/recommended',
'@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['@typescript-eslint', 'import'],
rules: {
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'import/order': ['error', { 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'] }],
'import/no-default-export': 'error',
'prefer-const': 'error',
'no-var': 'error',
},
overrides: [
{
files: ['*.test.ts', '*.spec.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
],
};
EOF
# Prettier configuration
cat > .prettierrc << 'EOF'
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}
EOF
# Jest configuration
cat > jest.config.js << 'EOF'
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src', '<rootDir>/tests'],
testMatch: [
'**/__tests__/**/*.ts',
'**/?(*.)+(spec|test).ts',
],
transform: {
'^.+\\.ts$': 'ts-jest',
},
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
],
coverageDirectory: 'coverage',
coverageReporters: [
'text',
'lcov',
'html',
'cobertura',
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
moduleNameMapping: {
'^@/(.*)$': '<rootDir>/src/\$1',
},
};
EOF
# Husky setup
npx husky install
npx husky add .husky/pre-commit "lint-staged"
npx husky add .husky/commit-msg "commitlint --edit \$1"
# Lint-staged configuration
cat > .lintstagedrc << 'EOF'
{
"*.{ts,tsx,js,jsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,css,md}": [
"prettier --write"
]
}
EOF
# Commitlint configuration
cat > .commitlintrc << 'EOF'
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-enum": [
2,
"always",
["feat", "fix", "docs", "style", "refactor", "test", "chore", "perf", "ci", "build", "revert"]
]
}
}
EOF
}
Python Project Setup
#!/bin/bash
# Python project setup wizard
setup_python_project() {
local project_name=\$1
local project_type=${2:-"web-app"} # web-app, api, cli, library, data-science
local python_version=${3:-"3.11"}
if [ -z "$project_name" ]; then
echo "Usage: setup_python_project <project_name> [project_type] [python_version]"
return 1
fi
echo "๐ Setting up Python project: $project_name"
echo "Type: $project_type, Python: $python_version"
# Create project directory
mkdir -p "$project_name"
cd "$project_name"
# Setup Python environment
setup_python_environment "$python_version"
# Create project structure
create_python_structure "$project_type"
# Setup configuration files
setup_python_tooling "$project_type"
# Install dependencies
install_python_dependencies "$project_type"
# Create initial files
create_python_files "$project_type"
# Setup CI/CD
setup_github_actions_python "$project_type"
# Initialize git repository
init_git_repo
echo "โ
Python project setup complete!"
echo "Next steps:"
echo " cd $project_name"
echo " source venv/bin/activate"
echo " python -m $project_name"
}
setup_python_environment() {
local version=\$1
# Check if pyenv is available
if command -v pyenv &> /dev/null; then
echo "๐ง Setting up Python $version with pyenv..."
pyenv install -s "$version"
pyenv local "$version"
fi
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip setuptools wheel
}
create_python_structure() {
local type=\$1
# Common directories
mkdir -p src tests docs scripts
mkdir -p .github/{workflows,ISSUE_TEMPLATE}
case "$type" in
"web-app"|"api")
mkdir -p src/{app,models,views,utils,config,static,templates}
mkdir -p migrations
;;
"cli")
mkdir -p src/{cli,commands,utils}
;;
"library")
mkdir -p src/{lib,utils}
mkdir -p examples
;;
"data-science")
mkdir -p {data,notebooks,models,reports,src}
mkdir -p data/{raw,processed,external}
;;
esac
}
setup_python_tooling() {
local type=\$1
# pyproject.toml
cat > pyproject.toml << EOF
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "$(basename $(pwd))"
version = "0.1.0"
description = "A modern Python $type"
authors = [{name = "$(git config user.name)", email = "$(git config user.email)"}]
license = {text = "MIT"}
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
$(get_python_dependencies $type)
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-asyncio>=0.21",
"black>=23.0",
"isort>=5.12",
"flake8>=6.0",
"mypy>=1.0",
"pre-commit>=3.0",
"bandit>=1.7",
"safety>=2.3",
]
[project.urls]
Homepage = "https://github.com/$(git config user.name)/$(basename $(pwd))"
Repository = "https://github.com/$(git config user.name)/$(basename $(pwd)).git"
Issues = "https://github.com/$(git config user.name)/$(basename $(pwd))/issues"
[project.scripts]
$(basename $(pwd)) = "src.main:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.black]
line-length = 100
target-version = ['py39', 'py310', 'py311']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 100
multi_line_output = 3
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=80",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"e2e: End-to-end tests",
"slow: Slow running tests",
]
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/test_*",
"*/__init__.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
]
EOF
# .pre-commit-config.yaml
cat > .pre-commit-config.yaml << 'EOF'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-typing-imports]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies: [types-requests, types-PyYAML]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
EOF
}
get_python_dependencies() {
case "\$1" in
"web-app")
echo '"fastapi>=0.100", "uvicorn>=0.23", "jinja2>=3.1", "python-multipart>=0.0.6",'
;;
"api")
echo '"fastapi>=0.100", "uvicorn>=0.23", "sqlalchemy>=2.0", "pydantic>=2.0",'
;;
"cli")
echo '"click>=8.1", "rich>=13.0", "typer>=0.9",'
;;
"data-science")
echo '"pandas>=2.0", "numpy>=1.24", "matplotlib>=3.7", "jupyter>=1.0",'
;;
*)
echo '"requests>=2.31",'
;;
esac
}
<function_calls>