# hop conf projects

#### Configuration on the command line

The `hop-conf` script offers many options to edit environment definitions.

**Creating an environment**

* Windows

  ```highlight
  hop-conf.bat --environment-create \
               --environment hop2 \
               --environment-project hop2
               --environment-purpose=Development \
               --environment-config-files="C:\<YOUR_ENV_FILE_PATH>\env-variables.json"
  ```

  Expected output:

  ```highlight
  C:\<YOUR_PATH>\hop>echo off
  ===[Environment Settings - hop-conf.bat]===================================
  Java identified as "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java"
  HOP_OPTIONS=-Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows -DHOP_PLATFORM_RUNTIME=Conf
  -DHOP_AUTO_CREATE_CONFIG=Y
  Command to start Hop will be:
  "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java" -classpath lib\core\*;lib\beam\*;lib\swt\win64\*
  -Djava.library.path=lib\core;lib\beam -Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows
  -DHOP_PLATFORM_RUNTIME=Conf -DHOP_AUTO_CREATE_CONFIG=Y org.apache.hop.config.HopConfig  --environment-create
  --environment hop2 --environment-project hop2 --environment-purpose Development
  --environment-config-files "C:\<YOUR_ENV_FILE_PATH\env-variables.json"
  ===[Starting HopConfig]=========================================================
  Creating environment 'hop2'
  Environment 'hop2' was created in Hop configuration file C:\<YOUR_PATH>\hop\config\hop-config.json
  Warning: referenced project 'hop2' doesn\'t exist
  Found existing environment configuration file: C:\<YOUR_ENV_FILE_PATH>\variables.json
  Purpose: Development
  Project name: hop2
  Config file: C:\<YOUR_ENV_FILE_PATH>\env-variables.json
  ```
* Linux, macOS

  ```highlight
  $ sh hop-conf.sh \
       --environment-create \
       --environment hop2 \
       --environment-project hop2 \
       --environment-purpose=Development \
       --environment-config-files=<YOUR_ENV_FILE_PATH>/env-variables.json
  ```

  Expected output:

  ```highlight
  Creating environment 'hop2'
  Environment 'hop2' was created in Hop configuration file <YOUR_PATH>/hop/config/hop-config.json
  Warning: referenced project 'hop2' doesn't exist
  Found existing environment configuration file: <YOUR_ENV_FILE_PATH>/env-variables.json
    hop2
      Purpose: Development
      Project name: hop2
        Config file: <YOUR_ENV_FILE_PATH>/env-variables.json
  ```

As you can see from the log, an empty file was created to set variables in:

```highlight
{ }
```

**Setting variables in an environment**

This command adds a variable to the environment configuration file:

&#x20;

* Windows

  ```highlight
  hop-conf.bat --config-file "C:\<YOUR_ENV_FILE_PATH>\env-variables.json" --config-file-set-variables "DB_HOSTNAME=localhost,DB_PASSWORD=abcd"
  ```

  Expected output:

  ```highlight
  C:\<YOUR_PATH\hop>echo off
  ===[Environment Settings - hop-conf.bat]===================================
  Java identified as "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java"
  HOP_OPTIONS=-Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows -DHOP_PLATFORM_RUNTIME=Conf -DHOP_AUTO_CREATE_CONFIG=Y
  Command to start Hop will be:
  "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java" -classpath lib\core\*;lib\beam\*;lib\swt\win64\*
  -Djava.library.path=lib\core;lib\beam -Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows
  -DHOP_PLATFORM_RUNTIME=Conf -DHOP_AUTO_CREATE_CONFIG=Y org.apache.hop.config.HopConfig
  --config-file "C:\<YOUR_ENV_FILE_PATH>\env-variables.json"
  --config-file-set-variables "DB_HOSTNAME=localhost,DB_PASSWORD=abcd"
  ===[Starting HopConfig]=========================================================
  Configuration file 'C:\<YOUR_ENV_FILE_PATH>/env-variables.json' was modified.
  ```
* Linux, macOS

  ```highlight
  ./hop-conf.sh --config-file <YOUR_ENV_FILE_PATH>/env-variables.json --config-file-set-variables DB_HOSTNAME=localhost,DB_PASSWORD=abcd
  ```

  Expected output:

  ```highlight
  Configuration file '<YOUR_ENV_FILE_PATH>/env-variables.json' was modified.
  ```

If you look at the file `env-variables.json`, you’ll see that the variables were added:

```highlight
{
  "variables" : [ {
    "name" : "DB_HOSTNAME",
    "value" : "localhost",
    "description" : ""
  }, {
    "name" : "DB_PASSWORD",
    "value" : "abcd",
    "description" : ""
  } ]
}
```

Please note that you can add descriptions for the variables as well with the `--describe-variable` option. Please run hop-conf without options to see all the possibilities.

**Deleting an environment**

The following example deletes an environment from the Hop configuration file:

&#x20;

* Windows

  ```highlight
  hop-conf.bat -ed --environment hop2
  ```

  Expected output:

  ```highlight
  C:\<YOUR_PATH>\hop>echo off
  ===[Environment Settings - hop-conf.bat]===================================
  Java identified as "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java"
  HOP_OPTIONS=-Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows -DHOP_PLATFORM_RUNTIME=Conf -DHOP_AUTO_CREATE_CONFIG=Y
  Command to start Hop will be:
  "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java" -classpath lib\core\*;lib\beam\*;lib\swt\win64\* -Djava.library.path=lib\core;lib\beam -Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows -DHOP_PLATFORM_RUNTIME=Conf -DHOP_AUTO_CREATE_CONFIG=Y org.apache.hop.config.HopConfig  -ed --environment hop2
  ===[Starting HopConfig]=========================================================
  Lifecycle environment 'hop2' was deleted from Hop configuration file C:\<YOUR_PATH>\hop\config\hop-config.json
  ```
* Linux, macOS

  ```highlight
  ./hop-conf.sh -ed --environment hop2
  ```

  Expected output:

  ```highlight
  Lifecycle environment 'hop2' was deleted from Hop configuration file <YOUR_PATH>/hop/config/hop-config.json
  ```

#### Projects Plugin configuration

There are various options to configure the behavior of the `Projects` plugin itself. In Hop configuration file `hop-config.json` we can find the following options:

```highlight
{
    "projectMandatory" : true,
    "environmentMandatory" : false,
    "defaultProject" : "default",
    "defaultEnvironment" : null,
    "standardParentProject" : "default",
    "standardProjectsFolder" : "/home/matt/test-stuff/"
}
```

| Option                 | Description                                                                        | hop-conf option              |
| ---------------------- | ---------------------------------------------------------------------------------- | ---------------------------- |
| projectMandatory       | This will prevent anyone from using hop-run without specifying a project           | `--project-mandatory`        |
| environmentMandatory   | This will prevent anyone from using hop-run without specifying an environment      | `--environment-mandatory`    |
| defaultProject         | The default project to use when none is specified                                  | `--default-project`          |
| defaultEnvironment     | The default environment to use when none is specified                              | `--default-environment`      |
| standardParentProject  | The standard parent project to propose when creating new project                   | `--standard-parent-project`  |
| standardProjectsFolder | The folder to which you’ll browse by default in the GUI when creating new projects | `--standard-projects-folder` |

Last updated 2025-09-04 18:20:55 +0200


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/index-1/hop-conf/hop-conf-projects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
