# Using Prometheus in your Lua Application

{% hint style="info" %}
**Legacy mirror:** Prometheus documentation has moved to [**https://prometheus-lua.github.io/Prometheus/docs/**](https://prometheus-lua.github.io/Prometheus/docs/).\
This GitBook remains online for existing links/search results and may not always reflect the latest changes.
{% endhint %}

Prometheus can also be used as a library for your custom Lua Applications instead of using it's cli tool.

In order to do that you'll first need to clone the github repo:

```batch
git clone "https://github.com/levno-710/Prometheus.git"
```

After that, you'll need to copy everything within the src folder to your project. Let's say you created a folder named `prometheus`, where all the Prometheus files are located. You can the use the following code to obfuscate a string:

{% code title="use\_prometheus.lua" %}

```lua
local Prometheus = require("prometheus.prometheus")

-- If you don't want console output
Prometheus.Logger.logLevel = Prometheus.Logger.LogLevel.Error

-- Your code
local code = 'print("Hello, World!")'

-- Create a Pipeline using the Strong preset
local pipeline = Prometheus.Pipeline:fromConfig(Prometheus.Presets.Strong)

-- Apply the obfuscation and print the result
print(pipeline:apply(code));
```

{% endcode %}

Instead of passing the Strong preset you could also pass a custom [Config Object](/prometheus/getting-started/the-config-object.md).


---

# 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://levno-710.gitbook.io/prometheus/advanced/using-prometheus-in-your-lua-application.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.
