Transforms Reference

Apply transforms to variables to change their format. Use the syntax %VARIABLE:transform%.

String Transforms

uppercase

Converts to uppercase.

InputOutput
hello worldHELLO WORLD
MyProjectMYPROJECT
<file name="%NAME:uppercase%.txt" />

lowercase

Converts to lowercase.

InputOutput
HELLO WORLDhello world
MyProjectmyproject
<file name="%NAME:lowercase%.txt" />

camelCase

Converts to camelCase (first word lowercase, subsequent words capitalized).

InputOutput
hello worldhelloWorld
user-profileuserProfile
MY_CONSTANTmyConstant
<file name="%NAME:camelCase%.ts" />

PascalCase

Converts to PascalCase (all words capitalized).

InputOutput
hello worldHelloWorld
user-profileUserProfile
my_componentMyComponent
<file name="%NAME:PascalCase%.tsx" />

kebab-case

Converts to kebab-case (lowercase with hyphens).

InputOutput
HelloWorldhello-world
myProjectmy-project
MY_CONSTANTmy-constant
<!-- Perfect for npm package names -->
<file name="package.json">
{
  "name": "%PROJECT_NAME:kebab-case%"
}
</file>

snake_case

Converts to snake_case (lowercase with underscores).

InputOutput
HelloWorldhello_world
myProjectmy_project
user-profileuser_profile
<!-- Common for Python files -->
<file name="%MODEL:snake_case%.py" />

Utility Transforms

plural

Converts a word to its plural form using basic English pluralization rules.

InputOutput
catcats
boxboxes
citycities
childchildren
<folder name="%MODEL:plural%" />

length

Returns the character count of the value.

InputOutput
hello5
Structure Creator17
<file name="length-%NAME:length%.txt" />

Date Formats

The built-in %DATE% variable supports custom formatting using the format() transform.

Syntax

Use %DATE:format(PATTERN)% to format dates:

<file name="log-%DATE:format(YYYY-MM-DD)%.txt" />

Format Tokens

TokenDescriptionExample
YYYY4-digit year2024
YY2-digit year24
MMMMFull month nameJanuary
MMMShort month nameJan
MM2-digit month01
DD2-digit day15
DDay without padding5

Examples

<!-- ISO date: 2024-01-15 -->
<file name="log-%DATE:format(YYYY-MM-DD)%.txt" />

<!-- Readable date: Jan 15, 2024 -->
<file name="report-%DATE:format(MMM D, YYYY)%.md" />

<!-- Year-month: 2024-01 -->
<folder name="archive-%DATE:format(YYYY-MM)%" />

Built-in Variables

These variables are automatically available without needing to define them.

VariableDescriptionExample
%DATE%Current date (ISO format)2024-01-15
%YEAR%Current year2024
%MONTH%Current month (01-12)01
%DAY%Current day (01-31)15

Chaining Transforms

Transforms cannot be chained. Use the single most appropriate transform for your use case.

<!-- ✓ Correct -->
<file name="%NAME:kebab-case%.ts" />

<!-- ✗ Not supported -->
<file name="%NAME:lowercase:kebab-case%.ts" />

Transform Aliases

For convenience, most transforms have shorter aliases you can use:

Full NameAlias
uppercaseupper
lowercaselower
camelCasecamel
PascalCasepascal
kebab-casekebab
snake_casesnake
pluralpluralize
lengthlen
<!-- These are equivalent -->
<file name="%NAME:uppercase%.txt" />
<file name="%NAME:upper%.txt" />

Usage Examples

React Component

<folder name="%COMPONENT:PascalCase%">
  <file name="index.tsx" />
  <file name="%COMPONENT:PascalCase%.tsx" />
  <file name="%COMPONENT:PascalCase%.test.tsx" />
  <file name="%COMPONENT:kebab-case%.module.css" />
</folder>

Python Module

<folder name="%MODULE:snake_case%">
  <file name="__init__.py" />
  <file name="%MODULE:snake_case%.py" />
  <file name="test_%MODULE:snake_case%.py" />
</folder>

npm Package

<folder name="%PACKAGE%">
  <file name="package.json">
{
  "name": "@%SCOPE:kebab-case%/%PACKAGE:kebab-case%",
  "version": "1.0.0"
}
  </file>
</folder>