Telosys doc
WebsiteTwitterLinkedInNews
  • Telosys documentation
  • Telosys CLI
    • Installation on Linux
    • Installation on Windows
    • CLI configuration
    • CLI commands
    • Getting started
  • Telosys with VSCode
    • Extension installation
    • VSCode settings
    • Telosys terminal in VSCode
    • Telosys editor configuration
  • Telosys with JetBrains IDE
  • Project configuration
  • Project variables
  • Project databases
  • Models and entities
    • Model structure
    • Entity
    • Attribute / Link
    • Annotations
    • Tags
    • Examples
    • Model creation
    • Model installation
    • Models management
  • Bundles of templates
    • Bundle structure
    • Bundle creation
    • Bundles installation
    • Bundles management
    • Velocity language
    • Velocity directives
    • Velocity object types
    • Telosys directives
    • Telosys variables
    • Telosys objects
    • Code snippets
  • Code generation
    • "gen" command
    • "genb" command
  • Target languages
    • C++
    • C#
    • Golang
    • Java
    • JavaScript
    • Kotlin
    • PHP
    • Python
    • Scala
    • TypeScript
  • Target databases (SQL)
    • Predefined rules
    • Specific rules
    • Type size and precision
  • Telosys with Git
    • GitHub usage
    • Install with Git
    • Publish with Git
  • Support the project
  • How to contribute
  • Sponsors
  • IDE and editors
  • Telosys 3 Eclipse plugin
    • Eclipse plugin installation
    • Eclipse customization
    • Telosys 3 database model
Powered by GitBook
On this page
  • 1 - Initialize a project
  • 1.1 - Set the "home directory"
  • 1.2 - Initialize the Telosys project folders and files
  • 1.3 - Configure the project
  • 2 - Set up a model
  • 3 - Set up a bundle of templates
  • 4 - Generate your code
  1. Telosys CLI

Getting started

PreviousCLI commandsNextTelosys with VSCode

Last updated 4 months ago

To start using Telosys, simply follow these 4 steps:

1 - Initialize a project

When Telosys-CLI starts nothing is defined ( no "home directory", no "model", no "bundle", etc...)

You can use the env command to see the current Telosys environment.

telosys>env

With the command h you can see that the "home directory" is not yet defined.

1.1 - Set the "home directory"

When Telosys-CLI starts its current directory is the directory where it has been launched

Use pwd to print the current working directory

Use cd to change the current directory

Once your are in the correct directory (the directory where you want to work with Telosys) you can use the h command to set the project's home

Example 1 : use the current directory "." as HOME

telosys>h .

Example 2 : use the "foo" subdirectory as HOME

telosys>h foo

Once Telosys HOME is defined the prompt contains a "#"

telosys#>

1.2 - Initialize the Telosys project folders and files

Once the "home directory" is defined, you can initialize the Telosys projet.

For that just run the init command

telosys#>init

This command creates the "TelosysTools" folder containing all the Telosys files and subfolders.

1.3 - Configure the project

Each project can be configured, for example, to define project-specific variables or to define the directory where the generated files must be created.

All the configuration of a Telosys project is defined in the "TelosysTools/telosys-tools.cfg" file. You can edit the "telosys-tools.cfg" file with your favorite text editor.

To print the current configuration, use the cfg command.

To edit the configuration file with the Telosys-CLI default editor use ecfg command.

If you want to try Telosys quickly you can continue with the default configuration.

2 - Set up a model

To generate application code, you need a model containing the entities of your business domain.

There are 3 ways to set up a Telosys model :

  • create a new model from scratch an empty model in which you can then create the entities you need

  • create a new model from an existing relational database : a model created from the database schema (1 entity for each table)

  • install an existing model from a depot download and install a Git repository containing the model

3 - Set up a bundle of templates

Once you have a model you need at least one bundle of templates to generate your code.

The templates are organized in "bundles". A "bundle" is a set of templates designed to generate a particular kind of targets.

4 - Generate your code

Once you have a valid model and a least one bundle of templates, you are ready to generate your code.

To generate your code you can use the following commands:

  • gen to generate code with the current model and the current bundle

  • genb to generate code in "batch mode" (since ver 4.1.0) with multiple models and/or bundles

For more information about project configuration see .

For more information, see pages "" and ""

To manage your model and its entities you can use "Model commands" and "Entity commands". See "".

Of course you can create your own templates from scatch, but the simplest way to start is to use existing templates. To do so, see ""

To manage your bundles of templates you can "Bundle commands" and "Template commands". See "".

See "".

Configuration & variables
Model creation
Model installation
Model management
Bundles installation
Bundles management
Code generation
Initialize a project
Set up a model
Set up a bundle of templates
Generate your code