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

# @module

> Declare a file as a named module for documentation and namespace organization.

## Overview

`@module` declares a file as a named module. Documentation tools use that name when they build module pages or process annotation files.

***

## Syntax

```lua theme={null}
---@module module_name
```

***

## Usage

```lua theme={null}
---@module utils

local utils = {}

---@param str string
---@return string
function utils.reverse(str)
    return string.reverse(str)
end

return utils
```

***

## When to use

* In library files that are consumed via `require()`
* In generated stubs and meta declaration files
* When documentation tools need a module name

For most addon development, you can skip `@module`. GLuaLS resolves modules by file path. Use `@module` when you generate docs or build definition files for distribution.

***

## See also

* [@meta](/annotations/meta): Mark a file as a type-only declaration file (not runtime code)
