Templates

Scaffold new projects from template repositories.

Templates

Scaffold new projects from template repositories. godegit is a natural fit for project scaffolding — you get the template files without the template's git history, so you can start fresh immediately.

Basic usage

godegit user/my-template my-new-project
cd my-new-project
git init
git add .
git commit -m "Initial commit"

Framework template examples

Vue.js

# Vue 3 + TypeScript
godegit vuejs/create-vue-templates/typescript my-vue-app

# Nuxt starter
godegit nuxt/starter/templates/v3 my-nuxt-app

React

# Create React App template
godegit facebook/create-react-app/packages/cra-template my-react-app

# Vite + React + TypeScript
godegit vitejs/vite/packages/create-vite/template-react-ts my-react-app

Node.js

# NestJS starter
godegit nestjs/typescript-starter my-nest-app

# Fastify + TypeScript
godegit fastify/fastify-cli/templates/app-ts my-fastify-app

Organization boilerplates

godegit works with private repositories when you provide an access token:

export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
godegit my-company/service-template new-service

Pinning to a version

Use --branch to pin to a specific tag or branch:

godegit user/my-template --branch v1.0.0 my-project

Post-download setup

After downloading a template, update the project metadata:

  1. Edit package.json with your project name and version
  2. Copy .env.example to .env and fill in your values
  3. Install dependencies: pnpm install
  4. Initialize git: git init && git add . && git commit -m "Initial commit"

See also