Git Frameworker is a CLI tool for quickly bootstrapping custom framework configurations.

Overview

Git Frameworker

Git Frameworker

Git Frameworker is a tool that allows you to quickly bootstrap a project using a framework from GitHub. If the repository you clone contains a framework.json file, Git Frameworker will automatically create a CLI to configure and bootstrap the project.

Installation

To install Git Frameworker, run the following command:

npm install -g git-frameworker

Using Git Frameworker

To use Git Frameworker, simple run the command in your terminal:

git-frameworker

The cli will guide you through the process of configuring and bootstrapping your project.

Configuring framework.json

The framework.json file allows you to configure your project based on your specific needs. Here's an example of what a framework.json file might look like:

{
  "projectName": "My Awesome Project",
  "projectDescription": "A brief description of your project",
  "questions": [
    {
      "name": "databaseType",
      "type": "multiple-choice",
      "options": ["MySQL", "PostgreSQL", "MongoDB"]
    },
    {
      "name": "useAuthentication",
      "type": "confirm",
      "message": "Do you want to use authentication?"
    },
    {
      "name": "eslint",
      "type": "confirm",
      "message": "Do you want to use ESLint?",
      "isPartial": true
    }
  ]
}

projectName and projectDescription

These two options allow you to specify the name and description of your project. They will be used in the README.md file and other documentation generated by the CLI.

questions

The questions array allows you to define custom questions that will be asked when the CLI is run. Each question object should have the following properties:

  • name: A unique name for the question.
  • type: The type of question (e.g. input, confirm, multiple-choice).
  • message: The message to display when the question is asked.
  • default (optional): The default value to use if the user does not provide an answer.
  • options (required for multiple-choice): An array of options for multiple-choice questions.

Supported Question Types

Currently, Git Frameworker supports the following question types:

  • input: A basic text input.
  • confirm: A yes/no confirmation question.
  • multiple-choice: A question with a list of options to choose from.

Creating the templates

The options passed will only work if you set the templates in the templates folder. The templates folder should have the following structure:

templates
  ├─── <multiple>:<option>_<confirm>:<true or false>_...

Partial Questions

If the isPartial property is set to true then this question shoudn't be added in the templates folder. You must create a partials folder and create a folder with the name of the question. Inside this folder you must create the templates for the options of the question. The partials folder should have the following structure:

partials
  ├─── <question_name>:<option>
       ...

The folder should only contain the files that will be changed if the option is selected.

Example

This is an example of a framework for backend

{
  "projectName": "My Awesome Project",
  "projectDescription": "A brief description of your project",
  "questions": [
    {
      "name": "database",
      "type": "multiple-choice",
      "options": ["MySQL", "PostgreSQL", "MongoDB"]
    },
    {
      "name": "auth",
      "type": "confirm",
      "message": "Do you want to use authentication?"
    },
    {
      "name": "format",
      "type": "confirm",
      "message": "Do you want to have auto formatting?",
      "isPartial": true
    }
  ]
}

This would be the right structure for the repository:

partials
    └─── format
       └─── <some file for the formatting config>

templates
    ├─── database:MySQL_auth:true
    ├─── database:MySQL_auth:false
    ├─── database:PostgreSQL_auth:true
    ├─── database:PostgreSQL_auth:false
    ├─── database:MongoDB_auth:true
    └─── database:MongoDB_auth:false

framework.json

When the user selects

Contributing

Contributions are welcome! If you have an idea for a new feature or would like to report a bug, please open an issue. If you would like to contribute code, please open a pull request.

You might also like...

⚙️ Monorepo for shared configurations used in Alphaworks

@alpha-dao/shared-config Usage Shared Config Wondering which configuration to use when starting a new project? Then you're probably looking for this m

Nov 17, 2022

An Eleventy wrapper for type supported configurations

Shareable Eleventy configuration strap. The module can be dropped in to your .eleventy.js configuration file for Typed supported configuration options.

Jun 17, 2022

fcall, fetch and call any remote hot functions, anywhere, anytime, without installations or configurations.

fcall, fetch and call any remote hot functions, anywhere, anytime, without installations or configurations.

Sep 20, 2022

🚀 A boilerplate with generic configurations to a Nextjs project with bun, vitest, cicd and etc

👕 Next.JS Template with Linter 🔨 Tools: NextJS Typescript ESLint (Code Pattern) Prettier (Formatter) Husky (Pre-commit) Vitest (Unit/Integration Tes

Dec 18, 2022

Official moon configurations for popular JavaScript developer tooling.

moon development configs This repository is a collection of moon owned and maintained configurations and presets for common developer tools -- primari

Nov 10, 2022

This repo contains configurations for webpack, webhint, stylelint and eslint, it is a boiler-plate template and a starting point for coming projects.

Project Name Description the project. Built With Major languages Frameworks Technologies used Live Demo (if available) Experience a live Demo 🚀 Getti

Oct 20, 2022

View a GCP project's API/service endpoint configurations.

View a GCP project's API/service endpoint configurations.

GCP Service Observer This is an application that displays GCP Service/API endpoint information for a given project. GCP requires API endpoints to be e

Dec 28, 2022

Theme Redone is a custom WordPress theme starter/framework with its own Gutenberg blocks solution and a CLI that speeds up the block creation process.

Theme Redone is a custom WordPress theme starter/framework with its own Gutenberg blocks solution and a CLI that speeds up the block creation process.

Theme Redone The Framework for Developing Custom WordPress Themes with its own Gutenberg Blocks creation solution. Theme Redone is a custom WordPress

Dec 30, 2022
Owner
Guilherme Marcondes
Guilherme Marcondes
A quick way of bootstrapping a new mono-repo for a Web Application

marp theme class author true gaia lead invert Matteo ronchi [email protected] Mono-repo Starter https://github.com/cef62/monorepo-template What

Matteo Ronchi 12 Jul 29, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Jean Rodríguez 7 Sep 13, 2022
Kuldeep 2 Jun 21, 2022
🦄 A CLI tool to quickly generate Next.js components

?? nextrate A CLI tool for quickly generating Next.js components. ✨ Features Automatically add the file type to the component name using the folder na

Kira 9 Aug 19, 2022
CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

CloudCrafter CLI CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

Missio 7 May 5, 2023
Simple Git (Github) CLI made in Node.js

nagit Simple Git (Github) CLI made in Node.js Quickstart The CLI is self-documented, just follow the steps to perform a commit. npm install -g nagit n

Nacho Aldama 8 Nov 10, 2022
🍣 CLI to handle Private Git Submodules in your Vercel Project

vercel-submodules: The CLI to handle Private Git Submodules in your Vercel Project This project is community-driven and not affiliated with Vercel in

Juno 37 Jan 1, 2023