> For the complete documentation index, see [llms.txt](https://wiki.redmodding.org/wolvenkit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.redmodding.org/wolvenkit/wolvenkit-app/usage/scripting-with-wscript.md).

# Scripting with wscript

Wolvenkit is scriptable using javascript and its internal API. With it you can automate tasks such as exporting, as well as make changes to files programmatically.

{% hint style="info" %}
For documentation of the [Script Manager](/wolvenkit/wolvenkit-app/tools/script-manager.md), check the corresponding sub-page.
{% endhint %}

## Adding Scripts

See [Script Manager](/wolvenkit/wolvenkit-app/tools/script-manager.md) -> [Script Manager](/wolvenkit/wolvenkit-app/tools/script-manager.md#adding-scripts)

## Script file path

Any .wscript files you have created or edited will be stored in the following location:

```
%APPDATA%\REDModding\WolvenKit\WScript
```

You can delete or edit them via [Script Manager](/wolvenkit/wolvenkit-app/tools/script-manager.md).

## Editing Scripts

The editor shows your source code with code formatting and includes code suggestion for the Wolvenkit api.

<figure><img src="/files/RIIkr7qglxgIaemZMdPa" alt=""><figcaption></figcaption></figure>

For questions or suggestions about the scripting interface please visit the #wolvenkit-scripts channel on the [Discord server](/wolvenkit/help/community.md).

## API Commands

Documentation of the API can be found at

{% content-ref url="/pages/taPhqTzUsPxivZkWLvR6" %}
[WScript API Documentation](/wolvenkit/wolvenkit-app/usage/wscript-api-docs.md)
{% endcontent-ref %}

## Utility Functions

There is also a utility library called Logger.wscript shipped with wolvenkit that assists with writing messages to the wolvenkit Log. It can be included with the following statement:

```javascript
import * as Logger from 'Logger.wscript';
```

it provides the following functions:

**Logger.Info(obj)**

Prints the supplied object or text in yellow in the log window.

**Logger.Warning(obj)**

Prints the supplied object or text in purple in the log window.

**Logger.Error(obj)**

Prints the supplied object or text in red in the log window.

**Logger.Success(obj)**

Prints the supplied object or text in light blue in the log window.

**Logger.Debug(obj)**

Prints the supplied object or text only to the log file.
