# 文件结构概述

插件是指一个包含多个文件的安装包，可直接分发给用户。

<pre><code><strong>Plugin
</strong>├─ manifest.json
├─ logo.png
├─ index.html
└─ js
   └─ plugin.js
</code></pre>

<figure><img src="/files/ak20aKFKByPJq6XZIqpM" alt=""><figcaption></figcaption></figure>

***

## manifest.json <a href="#zqpdi" id="zqpdi"></a>

这是每个插件必须拥有的文件。它包含了有关插件的基本信息，如插件的名称、版本、执行代码入口等。不同插件类型有不同的配置方式，以下是「窗口插件」的基本配置：

```json
{
    "id": "LB5UL2P0Q9FFF",
    "version": "1.0.0",
    "name": "Hello World",
    "logo": "/logo.png",
    "keywords": ["keywrod1", "keywrod2"],
    "main":
    {
        "devTools": true,
        "url": "index.html",
        "width": 640,
        "height": 480
    }
}
```

* `id` - 插件 ID
* `version` - 插件版本
* `name` - 插件名
* `logo` - 插件代表图标
* `keywords` - 插件关键字，除了插件名外用户还可以使用这些关键字快速搜索到这个插件
* `main` - 插件窗口程序入口设置
  * `url` - 入口页面
  * `width` - 窗口宽度
  * `height` - 窗口高度

{% hint style="info" %}
注：你可以查看这篇文章，[了解 `manifest.json`的所有配置方式](/plugin-api/zh-cn/tutorial/manifest.md)。
{% endhint %}

{% hint style="info" %}
**完整示例代码：**

<https://github.com/eagle-app/eagle-plugin-examples/tree/main/Window>
{% endhint %}

## logo.png <a href="#pui04" id="pui04"></a>

对应 `manifest.json`中 `logo`字段。代表插件的图标，它将在插件列表及插件中心使用。请提供分辨率为 128 x 128 的 图像，图标一般应该是PNG格式，因为 PNG 对透明度的支持最好。

***

## index.html <a href="#gmbp0" id="gmbp0"></a>

对应 `manifest.json` 中 `main`字段。这是插件程序的入口文件，插件执行时 `index.html`将被独立载入在独立的浏览器窗口中运行。


---

# 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://developer.eagle.cool/plugin-api/zh-cn/get-started/anatomy-of-an-extension.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.
