> For the complete documentation index, see [llms.txt](https://timmy.gitbook.io/classlib-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://timmy.gitbook.io/classlib-1/classlib.md).

# ClassLib

Lua OOP Library

<div align="left" data-full-width="false"><img src="https://img.shields.io/github/v/release/Timmy-the-nobody/ClassLib" alt=""> <img src="https://img.shields.io/github/stars/Timmy-the-nobody/ClassLib" alt=""> <img src="https://img.shields.io/github/license/Timmy-the-nobody/ClassLib" alt=""> <img src="https://img.shields.io/github/languages/top/Timmy-the-nobody/ClassLib" alt=""></div>

***

## **Overview**

**ClassLib** is a powerful Lua Object-Oriented Programming (OOP) library designed with a specific focus on emulating the behavior of [nanos world](https://nanos.world/)'s class library. Whether you are an experienced nanos world scripter or new to Lua OOP, **ClassLib** provides a familiar environment to streamline your scripting experience.

The library stands as a robust and feature-rich OOP framework tailored for nanos world. The primary objective is to offer a seamless transition for scripters accustomed to nanos world's scripting API, ensuring a smooth and painless integration into their workflow.

***

## **Key Features**

* **Lua OOP Framework**
  * **ClassLib** is built upon Lua's Object-Oriented Programming paradigm, providing a structured and efficient way to organize code.
* #### **Nanos World Compatibility**
  * Developed specifically for nanos world, **ClassLib** minimizes dependencies on the game, ensuring optimal compatibility. The library is crafted to seamlessly integrate into nanos world's scripting environment.
* #### **Portability**
  * While **ClassLib** is tailored for nanos world, it boasts a high degree of portability. With 95% of the library written in pure Lua, it can be easily adapted to other projects and platforms as needed.

***

## Credits

The inception of ClassLib owes credit to [MegaThorx ](https://github.com/MegaThorx)and their EGUI package, serving as the foundational inspiration.

Special thanks go to [Mouloud](https://github.com/MouloudP) and [Aerox](https://github.com/aeroxfr) for their invaluable contributions in testing and providing feedback during the early stages of the library. Their input has played a crucial role in refining and enhancing the library.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://timmy.gitbook.io/classlib-1/classlib.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
