System Properties
System properties are values CodeBaker fills in for you, so a template can use today's date, your user name, the project name or the folder you generate into without declaring anything. They are available in every template. There is nothing to configure.
In the generation dialog they appear in a collapsed System Properties section, where you can also change a value for a single run (see Step 1).
Using them
Write a system property like any other variable. The names are upper case:
| Where | How |
|---|---|
| File contents | {{ DATE }}, or ___DATE___ once you declare that style under placeholders |
| File and folder names | {{ YEAR }}-report.md becomes 2026-report.md |
<?php
// Generated by {{ USER }} on {{ DATE }} for {{ PROJECT_NAME }}
generates
<?php
// Generated by alex on 2026-10-03 for my-shop
The full list
The sample values below assume that user alex generates into the folder app/Models of the project my-shop, on Saturday 3 October 2026 at 14:05:09.
Date and time
| Property | Meaning | Sample value |
|---|---|---|
DATE | Today's date | 2026-10-03 |
TIME | Current time | 14:05:09 |
DATE_TIME | Date and time together | 2026-10-03 14:05:09 |
YEAR | Year | 2026 |
MONTH | Month, zero-padded | 10 |
DAY | Day of the month, zero-padded | 03 |
HOUR | Hour (24-hour clock), zero-padded | 14 |
MINUTE | Minute, zero-padded | 05 |
SECOND | Second, zero-padded | 09 |
DAY_NAME_SHORT | Abbreviated day name, always English | Sat |
DAY_NAME_FULL | Full day name, in your system language | Saturday |
MONTH_NAME_SHORT | Abbreviated month name, always English | Oct |
MONTH_NAME_FULL | Full month name, in your system language | October |
YYYYMMDDHHMMSS | Compact date and time, handy for migration file names | 20261003140509 |
TIMESTAMP | Unix time in seconds: the same instant in every time zone. The sample is for a clock set to UTC | 1791036309 |
Project and user
| Property | Meaning | Sample value |
|---|---|---|
USER | Your operating system user name | alex |
PROJECT_NAME | The name of the IDE project | my-shop |
PRODUCT_NAME | The IDE you generate in | PhpStorm |
The folder you generate into
These describe the folder you right-clicked.
| Property | Meaning | Sample value |
|---|---|---|
DIR_SLASH | Path relative to the project root, with /. Empty for the project root | app/Models |
DIR_BACKSLASH | The same path with \ | app\Models |
FILE_NAME | The folder's name | Models (for a folder reports.v2: reports.v2) |
NAME | The folder's name without an extension, which is everything after its last dot | Models (for a folder reports.v2: reports) |
Other
| Property | Meaning | Sample value |
|---|---|---|
NAMESPACE | The namespace of the folder you generate into. It exists only in an IDE that can work one out (PHP projects, with the PHP plugin installed). In the PHP plugin the composer.json PSR-4 mapping is used first, then a namespace written in a PHP file of the folder, then the folder path | App\Models |
DS | A literal dollar sign | $ |
Good to know
- Names are case-sensitive.
___date___is a different variable from___DATE___and is left as it is unless you define a variable calleddate. - You can override them for one run. Edit the value in the System Properties section of the dialog.
- You can give one your own default. Declare a property with the same name in
vars(for exampleUSER: ""): it moves from System Properties to Custom Properties. An empty value there means "use the system value", and any other value is your default. Like every custom field it is remembered in the history and brought back from it, and Reset returns it to your default. A system property you do not declare always shows the current value, whatever the history holds. NAMESPACEis special. In an IDE with PHP support an automaticNAMESPACEfield is also placed in Custom Properties unless your template defines its own. Other IDEs do not show it. See Configuration Reference.- Dates are plain text. To format them differently (a different order, another separator), build the value from the parts, for example
___DAY___.___MONTH___.___YEAR___.
Next steps
- Configuration Reference: declare your own variables with
vars - Inflection & Case Filters: reshape a value, such as the name of the folder you generate into