# Introduction

## Gimhook v0.0.1

A desktop app and modloader for Gimkit.

## How do I install Gimhook?

Check out the [installation](https://gimhook.coder-gage.dev/installation) section for information on installing depending on your OS.

## How do I make a mod?

While it is technically possible to [write a Gimhook mod manually](https://gimhook.coder-gage.dev/creating-mods), the recommended way to do it is via the work-in-progress Gimhook SDK.

Read the [SDK documentation](https://gimhook.coder-gage.dev/creating-mods/sdk-documentation) for more information.

## Is this allowed on Gimkit?

The simplified answer is **yes, as long as you don't use it to cheat or otherwise do anything potentially problematic.**

Special thanks to Josh Feinsilber and Jeff Osborn for answering this question!

## How does this work?

In modern JavaScript, there are modules that can be defined and later imported.

Here's an example of a CommonJS module which we'll give the filename `add.js`:

```javascript
module.exports = (a, b) => {return a + b};
```

..and here's an example of a module that uses it:

```javascript
const add = require('./add');

console.log(add(2, 2)); // 4
```

However, modern web apps don't just use modules directly in the browser - They use a bundler to implement `require()` and bundle all of the dependencies they need into a single JavaScript file.

Gimhook works by hooking onto the parcel's implementation of `require()` (which Gimkit uses) and intercepting the imported modules to replace them with something else, allowing Gimkit to turn modules into global variables and inject modifications into the Gimkit web client.

Think of it as replacing the add function with something entirely different when it tries to use it. ;)

Also, keep in mind that this is all done client-side, so it doesn't touch anything on Gimkit's servers. **Your mods only are only on your client unless you share them and someone else installs it on their client.**

As for the desktop app part... that's just done with Electron.


---

# 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://gimhook.coder-gage.dev/introduction.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.
