> For the complete documentation index, see [llms.txt](https://levno-710.gitbook.io/prometheus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://levno-710.gitbook.io/prometheus/advanced/using-prometheus-in-your-lua-application.md).

# 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).
