> For the complete documentation index, see [llms.txt](https://avaloniachina.gitbook.io/avalonia/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://avaloniachina.gitbook.io/avalonia/docs/getting-started.md).

# 快速开始

准备好开始使用Avalonia了吗？按照以下步骤安装模板并创建第一个应用程序。

## 安装

运行下列命令安装模板Avalonia模板：

```bash
dotnet new install Avalonia.Templates
```

> 注意：.NET 6.0及更早版本，请改用`--install`选项。

## 创建新的应用程序

安装模板后，可以通过运行以下命令创建新的Avalonia应用程序：

```bash
dotnet new avalonia.app -o MyApp
```

这将在您的应用程序目录下创建一个名为`MyApp`的新文件夹。要运行应用程序，请导航到`MyApp`目录并运行：

```bash
cd MyApp
dotnet run
```

就是这样！您的Avalonia应用程序现在已经启动并运行。您可以打开`MyApp`文件夹，开始改进和构建应用程序。


---

# 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://avaloniachina.gitbook.io/avalonia/docs/getting-started.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.
