Skip to content

First Steps

  • Start an empty git repository
Terminal window
mkdir hello-world && cd hello-world && git init
  • Add your first module with the Mr. Smith CLI
Terminal window
mr module add --repository mr-smith-org/hello-world
  • Follow the steps in your terminal until you see the message “Hello World!”

out

If you followed the previous steps correctly, you should have the following directory:

  • Directory.mr-smith
    • Directoryhello-world
      • Directorypipelines
        • hello-world-pipelines.yaml
      • Directorytemplates
        • Main.go
      • base.yaml
    • mr-modules.yaml
  • go.mod
  • main.go

All Mr. Smith files are located within the .mr-smith folder. Inside this folder, the organization is by modules (but you can also create pipelines that do not belong to any module). The hello-world module is the first module you added to your project. Within the module, you will find the following directories:

  • pipelines: this directory contains the configuration files for pipelines, which are YAML files that define the process prior to applying the templates to generate the code. Learn more
  • templates: this directory contains the template files that will be used to generate the code. Learn more

The base.yaml file is responsible for defining the directory and file structure that will be created in your project. Learn more

The mr-modules.yaml file is the Mr. Smith configuration file; it contains information about the modules you have added to your project and is automatically modified whenever a module is added or removed.

The go.mod and main.go files were generated by running the initial pipeline.