This repository has been archived by the owner. It is now read-only.
AarKay is a language independent code generation framework.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
README.md

README.md

AarKay

AarKay is a command line utility especially for developers to boost productivity in creating files of any type and manage projects at a large scale using templates.

Installation

  • Binary form

    Download the latest release with the prebuilt binary from release tab. Unzip the archive into the desired destination and add bin/aarkay to your $PATH.

Getting Started

Template

A template consists of three components name, extension and stencil template. The extension can be left empty if there is none.

Examples

  • Mux.yml.stencil
  • Colors.swift.stencil
  • gitignore.stencil

All your templates have to be stored inside the directory ~/Developer/AarKay/AarKayTemplates/AarKay. You can create custom templates using Stencil.

Datafile

A Datafile consists of three components filename, the template to use and the contents to supply to the template. You can also use the same name for filename and template.

Examples

  • Mux.yml
  • Name.Mux.yml
  • Colors.yml
  • Style.Colors.yml

Datafiles with dot prefix

A dotfile is a special kind of Datafile which starts with dot. prefix like dot.gitignore.yml.

Collection of Datafiles

A collection of files is also a special kind of Datafile which has contents of type array. It is generally defined with a [] prefix like [].Mux.yml.

You can group the collection by providing name like in the following examples to segregate your data.

  • [work].Mux.yml
  • [rk].Mux.yml
  • [restofire].Mux.yml
  • [aarkay].Mux.yml

The mapping of Datafiles and Generatedfiles

All your datafiles have to be stored inside the directory ~/Developer/AarKay/AarKayFiles/{relative/to/developer/directory} where path/relative/to/developer/directory is the path where the actual file will be generated.

Example

  • A Datafile created at path - ~/Developer/AarKay/AarKayFiles/RahulKatariya/macOS/dotfiles/tmuxinator/AarKay.Mux.yml
  • will search for the template Mux.{extension}.stencil
  • in the directory ~/Developer/AarKay/AarKayTemplates/AarKay
  • and will find Mux.yml.stencil with yml as its extension.
  • The file will then be generated at path - ~/Developer/RahulKatariya/macOS/dotfiles/tmuxinator/AarKay.yml.

Filenames

  • In the case of single file with no name Mux.yml
    • Mux is used as the filename and
    • Mux.{extension}.stencil as the template.
  • In the case of dotfile with no name dot.gitignore.yml
    • .gitignore is used as the filename and
    • gitignore.{extension}.stencil as the template.
  • In the case of single file with name AarKay.Mux.yml
    • AarKay is used as the filename and
    • Mux.{extension}.stencil as the template.
  • In the case of dotfile with name dot.AarKay.Mux.yml
    • .AarKay is used as the filename and
    • Mux.{extension}.stencil as the template.
  • In the case of collection of files [].Mux.yml
    • The filename is contents[0...n]["name"] and
    • Mux.{extension}.stencil as the template.

Custom Filename

If you want to give a custom filename then you will need to add string with the key "fn" inside your contents.

  • In the case of single or dotfile file with or without name AarKay.Mux.yml
fn: "Mac"
name: "macOS"
root: "RahulKatariya/macOS"
  • In the case of collection of files [].Mux.yml
- fn: "MacOS"
  name: "macOS"
  root: "RahulKatariya/macOS"
- fn: "AarKay"
  name: "aarkay"
  root: "RahulKatariya/AarKay"
  1. Mac is used as the filename and Mux.{extension}.stencil as the template.
  2. AarKay is used as the filename and Mux.{extension}.stencil as the template.

Articles

Attributions

This tool is powered by

Contributing

Issues and Feature Requests are welcome!

Author

Created with ❤️ by Rahul Katariya @rahulkatariya91