templatekit command-line reference

templatekit

templatekit is a CLI for lsst/templates, LSST’s project template repository.

Use templatekit to learn about available templates, and to create a new project or file snippet based on a template.

templatekit [OPTIONS] COMMAND [ARGS]...

Options

-r, --template-repo <template_repo>

Path to the cloned templates Git repository, or a sub directory within the clone templates repository. Default is ‘.’, the current working directory.

check

Check the template repository for valid structure and operation.

The following checks are performed:

  1. Test for untracked files in the Git repository.
  2. Test for modified, but uncommitted, changes in the Git repository.

Note:

  • A non-zero status code is returned if the checks fail.
  • This command always recompiles the examples by running the scons command.
templatekit check [OPTIONS]

help

Show help for any command.

templatekit help [OPTIONS] [TOPIC]

Arguments

TOPIC

Optional argument

list_templates

List available templates in the repository.

templatekit list_templates [OPTIONS]

Options

-t, --type <template_type>

The type of templates to show. File templates are single files or snippets. Project templates create whole project directories.

make

Make a file or project from a template called <template name>.

You will be prompted to configure the template.

 Project output options ———————-

–output sets the base directory that templatekit creates your new project in. Default is the

 File/snippet output options —————————

Set –output to be the file the content is rendered into. Otherwise, the content is printed to stdout.

Set -c/–copy to also copy the rendered content to the clipboard.

templatekit make [OPTIONS] <template name>

Options

-o, --output <output_path>

Filepath to render a file template into, or directory to create a project in.

-c, --copy, --no-copy

Copy a rendered file/snippet to the clipboard.

Arguments

<template name>

Required argument