Skip to content

Enhancement: Make repository a GitHub template and add initialization helper files #1

@punkyard

Description

@punkyard

This repo is an ideal candidate for being a GitHub template, but it lacks a few files and documentation that will make it easy for users to instantiate and initialize a new project from the template. This issue captures the work required to prepare the repo as a template and add supporting files and scripts.

Goals

  • Make the repo friendly and clear for users who create a new repository from this template
  • Add scripts that help initialize placeholders and adjust repo settings after creation
  • Add Issue/PR templates, CODE_OF_CONDUCT, SECURITY policy, and sample workflows
  • Provide docs and CLI examples for template usage

Proposed changes

  • README:
    • Add a short "This repo is a template" section with UI/CLI instructions (e.g., gh repo create --template punkyard/devspace-ai)
    • Add a note to run scripts/init-template.sh (or equivalent) after creating a repo from the template
  • Add TEMPLATE.md describing placeholders, what to replace after creating a repo, and post-creation steps
  • Add scripts/init-template.sh (macOS/zsh-friendly) to safely replace devspace-ai and punkyard placeholders with the new repo name and owner, with a --dry-run mode
  • Add .github/ISSUE_TEMPLATE/bug_report.md and feature_request.md
  • Add .github/pull_request_template.md to guide maintainers and contributors
  • Add CODE_OF_CONDUCT.md (Contributor Covenant) and SECURITY.md (security policy and reporting process)
  • Optionally add a minimal scaffold/ folder to show a minimal runnable project or tiny app
  • Optionally add GitHub workflows in .github/workflows/ with placeholders for secrets (lint/test), and verify they won’t leak secrets
  • Add recommended topics/tags (e.g., template, boilerplate, devspace) to help discovery
  • Optionally provide a codespaces.json dev container and a README section about running in Codespaces

Acceptance criteria

  • README contains a short, clear “Using this template” section and CLI example
  • Template includes TEMPLATE.md with post-creation instructions
  • scripts/init-template.sh exists and supports --dry-run and a safe default mode
  • ISSUE and PR templates exist in .github/ and reference the codebase’s DCO/contribution expectations
  • CODE_OF_CONDUCT.md and SECURITY.md are added with succinct content and quick links
  • CI workflows (if present) are templated and do not use or require committed secrets
  • Repository is toggled as a template in GitHub Settings (or via an API/gh command documented in README)
  • A new task (or project card) is created in the roadmap project or issues backlog for follow-up work if needed

Testing / Validation

  • Create a test repo from the template using the GH CLI gh repo create new-name --template punkyard/devspace-ai and run the init script with --dry-run to confirm placeholder replacements are correct and nothing is mutated unexpectedly
  • Confirm the new repo’s README and docs instruct users to set environment variables for keys (no secrets in repo)
  • Confirm issue and PR templates appear when creating issues/PRs in the new repository

Implementation notes

  • Use macOS-friendly sed -i '' to handle in-place edits in init-template.sh. Use --dry-run and prompt for confirmation before executing destructive changes.
  • Keep API keys and secrets out of the repo. Provide example env.example if needed instead of real secrets.
  • A final step will be to mark the repo as a template in the UI or via the gh api -X PATCH /repos/OWNER/REPO -f is_template=true command

Suggested labels: enhancement, roadmap, template
Suggested assignees: @punkyard

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions