Skip to content

📦 Remaker — Template-based Project Generator

License

remakerkit/remaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remaker

Remaker is a CLI tool designed to create services and applications based on templates. It simplifies the process of bootstrapping new projects by providing a structured way to define, customize, and generate project templates.

Docs

https://remakerkit.github.io/#/

Features

  • Template-based project generation: Create new projects from predefined templates
  • Interactive CLI: User-friendly terminal UI for selecting options and inputting parameters
  • Multiple providers support: Use templates from local filesystem, GitLab, or GitHub
  • Repository integration: Automatically create and configure Git repositories
  • Customizable templates: Define parameters and options for your templates

Installation

Option 1: Build from source

# Clone the repository
git clone https://github.com/remakerkit/remaker.git

# Build the project
cd remaker
go build -o remaker ./cmd/remaker

# Move the binary to your PATH (optional)
mv remaker /usr/local/bin/

Option 2: Direct installation with Go

# Install directly using go install
go install github.com/remakerkit/remaker/cmd/remaker@latest

This will install the remaker binary to your $GOPATH/bin directory, which should be in your PATH.

Usage

Register a configuration file

Before using Remaker, you need to register a configuration file:

remaker register config.yaml

Example configuration file (config.example.yaml):

providers:
    gitlab:
        token: ${GITLAB_TOKEN}
    github:
        token: ${GITHUB_TOKEN}
templates:
    example:
        provider: local
        path: example-template

Create a new project

remaker create

This command will guide you through the process of creating a new project based on a template.

Template Structure

A template consists of:

  1. A remaker.template.yaml file that defines the template parameters and configuration
  2. The actual template files that will be copied to the new project

Example template definition (remaker.template.yaml):

name: example-template
parameters:
  - name: gitProvider
    type: select
    required: true
    title: Git Provider
    options:
      - title: Gitlab
        value: gitlab
      - title: GitHub
        value: github
  - name: group
    type: select
    title: Group
    options:
      - title: root (/)
        value: "/" # use '/' to create in your root page
      - title: my-private-repo
        value: my-private-repo
  - name: description
    type: string
    title: Description
register:
  provider: gitlab
  repoGroup: "{% .group %}"
  repoName: "{% .name %}"
  visibility: private
  description: "{% .description %}"
  branch: main

Parameter Types

Remaker supports the following parameter types:

  • string: Text input
  • select: Selection from a list of options
  • boolean: Yes/No selection

Template Placeholders

In your template files, you can use placeholders with the syntax {% .paramName %} to insert parameter values. These placeholders work just like Go templates, but with different delimiters ({% %} instead of the standard Go template {{ }} delimiters).

License

MIT License