# TeamCity

## How to integrate Meterian with TeamCity

In this section we will see the steps to integrate Meterian with TeamCity.

* Create your project, linked to your repository and make sure the correct building agents are installed.
* Now select your project form the list and click on "Edit configuration"
* The first thing to do is set METERIAN\_API\_TOKEN as environment variable
* Select 'Paramenters' on the menu and Add new parameter

![](/files/-M0bfMDFpVS08707Vn5c)

* Here select 'Environment variable' from the dropdown menu, type env.METERIAN\_API\_TOKEN as Name and finally set the API token as value.

{% hint style="info" %}
To retrieve a Meterian API Token visit the [Meterian Dashboard](https://www.meterian.com/account); in your account select the tab "Tokens" and create a new one, or use an existing one.

API tokens are available only on paid account. To upgrade your subscription, please [contact us](mailto:support@meterian.io).
{% endhint %}

* Now select Build Step: Command Line from the menu, Add build step and then from the dropdown menu select "Command line" as Runner type.&#x20;

![](/files/-M0bgioHALoEeDH-9uZ7)

* Here fill all the field as displayed in the image

![](/files/-M0bhTwJ3x9CIOeY-9N9)

Make sure the Docker image name is `meterian/cli` , the selected platform is Linux and the Custom script is  `java -jar /meterian-cli.jar [Meterian CLI Options]`

Learn more about the Meterian Client [here](/the-client/client.md).

### How does it work

TeamCity docker will download and set the Meterian container, which contains the latest version of the Meterian client and the building tools for all the supported languages, then Meterian will be launched against the project.

Finally, given the result of the scan, the TeamCity build will pass or it will fail.


---

# 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.meterian.io/ci-server-integrations/teamcity.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.
