> For the complete documentation index, see [llms.txt](https://docs.saturncms.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saturncms.net/1.0.0/dev/plugins/how-to-structure-a-plugin.md).

# How to structure a plugin

## Plugin Folder

Your plugin must be uploaded in a .zip folder, with the manifest directly inside it, you should not place the manifest in any sub-folders.

Because of how Saturn detects and loads plugins, you must have your manifest in the root .zip file. It must not be in any sub-folders, Saturn won't load your plugin.

## manifest.json file

```
PluginSlug.zip
-> manifest.json
```

You can place the code, or anything else in sub-folders as long as you update your manifest to point to the correct file.

For example: If your main file is called main.php and it's in the /code folder. You should set your Startup value to "`code/main.php`"

Learn more about manifests here:

{% content-ref url="/pages/HTgUkip4BX3J5eLRrprO" %}
[Manifest](/1.0.0/dev/plugins/manifest.md)
{% endcontent-ref %}

## Your code

Your code can be in any number of sub-folders, as long as you link to it. Please see the above section for how to change your manifest.json to point to a sub-folder.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.saturncms.net/1.0.0/dev/plugins/how-to-structure-a-plugin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
