> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nanoforge.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# @nanoforge-dev/core

[![NanoForge](https://raw.githubusercontent.com/NanoForge-dev/Engine/main/.github/logo.png)](https://github.com/NanoForge-dev)

[![npm version](https://img.shields.io/npm/v/@nanoforge-dev/core.svg?maxAge=3600)](https://www.npmjs.com/package/@nanoforge-dev/core)

[![npm downloads](https://img.shields.io/npm/dt/@nanoforge-dev/core.svg?maxAge=3600)](https://www.npmjs.com/package/@nanoforge-dev/core)

[![Tests status](https://github.com/NanoForge-dev/Engine/actions/workflows/tests.yml/badge.svg)](https://github.com/NanoForge-dev/Engine/actions/workflows/tests.yml)

[![Last commit](https://img.shields.io/github/last-commit/NanoForge-dev/Engine.svg?logo=github\&logoColor=ffffff\&path=packages%2Fcore)](https://github.com/NanoForge-dev/Engine/commits/main/packages/core)

[![Contributors](https://img.shields.io/github/contributors/NanoForge-dev/Engine.svg?maxAge=3600\&logo=github\&logoColor=fff\&color=00c7be)](https://github.com/NanoForge-dev/Engine/graphs/contributors)

## About

`@nanoforge-dev/core` is a core package that contains game main loop. It is used to initialize the game and run it.

## Installation

**Node.js 26 or newer is required.**

```sh theme={null}
npm install @nanoforge-dev/core
yarn add @nanoforge-dev/core
pnpm add @nanoforge-dev/core
bun add @nanoforge-dev/core
```

## Example usage

Initialize the game in your main file.

```ts theme={null}
import { type IRunOptions } from "@nanoforge-dev/common";
import { NanoforgeFactory } from "@nanoforge-dev/core";

export async function main(options: IRunClientOptions) {
  const app = NanoforgeFactory.createClient();

  await app.init(options);

  await app.run();
}
```

## Links

* [GitHub][source]
* [npm][npm]

## Contributing

Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
[documentation][documentation].\
See [the contribution guide][contributing] if you'd like to submit a PR.

## Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to ask questions in [discussions][discussions].

[documentation]: https://github.com/NanoForge-dev/Engine

[discussions]: https://github.com/NanoForge-dev/Engine/discussions

[source]: https://github.com/NanoForge-dev/Engine/tree/main/packages/core

[npm]: https://www.npmjs.com/package/@nanoforge-dev/core

[contributing]: https://github.com/NanoForge-dev/Engine/blob/main/.github/CONTRIBUTING.md

## Interfaces

* [ApplicationOptions](https://docs.nanoforge.eu/references/engine/3.0.0/core/interfaces/ApplicationOptions.md)
* [ClientApplicationOptions](https://docs.nanoforge.eu/references/engine/3.0.0/core/interfaces/ClientApplicationOptions.md)
* [NanoforgeClient](https://docs.nanoforge.eu/references/engine/3.0.0/core/interfaces/NanoforgeClient.md)
* [NanoforgeServer](https://docs.nanoforge.eu/references/engine/3.0.0/core/interfaces/NanoforgeServer.md)

## Variables

* [NanoforgeFactory](https://docs.nanoforge.eu/references/engine/3.0.0/core/variables/NanoforgeFactory.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.