# 你的第一个插件

## 获取 Eagle 桌面应用程序 <a href="#htif1" id="htif1"></a>

首先，您需要安装 Eagle 桌面应用程序。您可以点击此处下载安装程序：<https://eagle.cool/download>，如果您已经安装了 Eagle 桌面应用程序，请确保您已更新到最新版本。我们已专门添加了多项功能，以便为您提供更好的插件开发体验。

***

## 建立插件 <a href="#u0omz" id="u0omz"></a>

1. 点击工具栏上的 「插件」 按钮。

   <figure><img src="/files/TMv4mOtLwLgScDbTKtCM" alt=""><figcaption></figcaption></figure>
2. 在弹出的菜单中，选择 「开发者选项」。

   <figure><img src="/files/ZLp1wGemGNorevo5H5te" alt=""><figcaption></figcaption></figure>
3. 点击 「创建插件」。

   <figure><img src="/files/qcGE1Cyo3hZOPI0e0O6d" alt=""><figcaption></figcaption></figure>
4. 在新窗口中，选择您想要创建的插件类型（窗口、背景服务、格式扩展）。这里我们选择 「窗口」 类型。

   <figure><img src="/files/1uzX8XD7c6jkZb7k4oE4" alt=""><figcaption></figcaption></figure>
5. 选择您想要保存插件的位置，然后完成创建。

如果您想更多了解不同插件类型的区别，可以参考[这篇文章](/plugin-api/zh-cn/get-started/plugin-types.md)。这些信息将帮助您确定哪种插件类型适合您的需求。

***

## 运行示例插件 <a href="#cpnwm" id="cpnwm"></a>

1. 点击工具栏上的「插件」按钮。
2. 在弹出的菜单中，找到刚才创建的插件，并点击它。
3. 您将看到一个窗口弹出，窗口中显示了插件的基本属性。

***

## 在代码编辑器打开插件目录 <a href="#uclkm" id="uclkm"></a>

插件项目已经创建完成，这时候你可以使用 Visual Studio Code 或其它代码编辑器打开这个文件夹。插件是由多个文件组成的，你需要同时编辑这些文件，因此你需要打开整个文件夹，而不是其中某个文件。

下个章节将详细介绍插件文件结构。

### &#x20;<a href="#vfkpl" id="vfkpl"></a>


---

# 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/creating-your-first-plugin.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.
