tmplt

CICD Version info

A User Friendly CLI Tool For Creating New Projects With Templates

Demo

About

tmplt is a command-line tool that lets users quickly create new projects based on templates. With tmplt, users can create a new project that is set up with all the necessary files and dependencies, so they can get started on their project right away.

With tmplt, users can create templates that define the structure and dependencies of a new project. These templates can be customized to fit specific project needs and shared with others. tmplt comes with a simple yet flexible syntax for defining templates that can include variables, files, and dependencies.

Templates are defined in a yaml file that lists all the files to be generated, the dependencies to be installed, and the variables to be replaced.

Here's an example template for a Pygame project:

```yaml

Pygame Project Template

Template information

name: Pygame Project description: A template for creating a Pygame project

Dependency information

dependencies: - name: Pygame install_command: pip install pygame

Files to generate

files: - name: main.py content: | import pygame

  # Set up pygame
  pygame.init()

  # Set up the display
  screen_width = {screen_width}
  screen_height = {screen_height}
  screen = pygame.display.set_mode((screen_width, screen_height))
  pygame.display.set_caption("{app_name}")

  # Game loop
  running = True
  while running:
      # Event handling
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              running = False

      # Game logic

      # Draw to screen
      screen.fill((255, 255, 255))
      pygame.display.flip()

  # Clean up pygame
  pygame.quit()

Variables

variables: - name: appname description: The name of the pygame app default: mypygame_app

Templates

Templates are files that contain information about the project, its dependencies, files to generate, and variables. Users can use these templates to set up projects easily.

A template file is written in YAML format and contains the following information:

Users can create their own templates or download them from the internet. To create a new project from a template, simply run the tmplt new command and provide the name of the template. The tool will generate all the necessary files and install the required dependencies.

Installation

You can install tmplt through a few methods

Releases

You can head over to the releases page and download the official tmplt binaries from there for your target operating system. Windows MSI installers are also available

Cargo Repository

You can install tmplt through the Cargo repository using the following command:

sh $ cargo install tmplt

Source

Go here to see how

More methods of installation will be added in the future!

Usage

Go here to see how to use the tool

Contributing

Contributions to tmplt are always welcome! Please see the Contributing Guidelines for more information.

License

This project is licensed under the MIT License and the Apache License