# cpl generate ## Contents - [Description](#description) - [Arguments](#arguments) - [Schematics](#schematics) Generate a file based on schematic. cpl **generate** *<schematic>* *<name>*
cpl **g** *<schematic>* *<name>*
cpl **G** *<schematic>* *<name>* ## Description Generates files based on a schematic. You can define custom schematics by creating templates in a ```.cpl``` folder. ## Arguments | Argument | Description | Value type | |-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-------------:| | `````` | The schematic to generate. | ```str``` | | `````` | The name of the generated file. | ```str``` | | ```--base``` | First element of path will be used as base-path not 'src'. For example: 'cpl g c test/Test' will be created at ```src/test/``` with --base it would be ```test/``` | ```str``` | ## Schematics | Schematic | Description | Arguments | |-----------------|:--------------------------------------:|:------------:| | ```abc``` | Abstract base class | `````` | | ```class``` | Class | `````` | | ```enum``` | Enum class | `````` | | ```pipe``` | Pipe class | `````` | | ```service``` | Service class | `````` | | ```settings``` | [Configmodel](cpl_core.configuration) | `````` | | ```test``` | Test class | `````` | | ```thread``` | Thread class | `````` | | ```validator``` | Validator class | `````` | | ```command``` | Discord bot command class | `````` | | ```event``` | Discord bot event class | `````` |