跳到正文
Skillpedia
部署与云(DevOps)40k · #7066

aspire

它能做什么

Aspire 是一个用于构建和管理复杂分布式应用的工具包。它可以组织应用的不同部分(例如 API、数据库和用户界面),让它们协同工作,即使它们是用不同语言编写的。

适用场景

  • ✓当你需要创建一个新的分布式应用时。
  • ✓当你需要配置或连接应用中的不同服务时。
  • ✓当你需要运行、调试或部署复杂应用时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/aspire/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/github/awesome-copilot/blob/main/skills/aspire/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该怎样配置 Aspire 来使用 PostgreSQL 数据库?”

每周 5 个新技能,1 分钟读完。

工作原理

Aspire 使用一个名为 'AppHost' 的核心文件,它就像一位指挥。它定义了有哪些服务、这些服务如何通信,以及它们需要哪些资源(例如数据库)。AppHost 会按正确的顺序启动所有内容,并确保服务之间能够互相找到。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Aspire — Polyglot Distributed-App Orchestration

Aspire is a code-first, polyglot toolchain for building observable, production-ready distributed applications. It orchestrates containers, executables, and cloud resources from a single AppHost project — regardless of whether the workloads are C#, Python, JavaScript/TypeScript, Go, Java, Rust, Bun, Deno, or PowerShell.

Mental model: The AppHost is a conductor — it doesn't play the instruments, it tells every service when to start, how to find each other, and watches for problems.

Detailed reference material lives in the references/ folder — load on demand.


References

Reference When to load
CLI Reference Command flags, options, or detailed usage
MCP Server Setting up MCP for AI assistants, available tools
Integrations Catalog Discovering integrations via MCP tools, wiring patterns
Polyglot APIs Method signatures, chaining options, language-specific patterns
Architecture DCP internals, resource model, service discovery, networking, telemetry
Dashboard Dashboard features, standalone mode, GenAI Visualizer
Deployment Docker, Kubernetes, Azure Container Apps, App Service
Testing Integration tests against the AppHost
Troubleshooting Diagnostic codes, common errors, and fixes

1. Researching Aspire Documentation

The Aspire team ships an MCP server that provides documentation tools directly inside your AI assistant. See MCP Server for setup details.

Aspire CLI 13.2+ (recommended — has built-in docs search)

If running Aspire CLI 13.2 or later (aspire --version), the MCP server includes docs search tools:

Tool Description
list_docs Lists all available documentation from aspire.dev
search_docs Performs weighted lexical search across indexed documentation
get_doc Retrieves a specific document by its slug

These tools were added in PR #14028. To update: aspire update --self --channel daily.

For more on this approach, see David Pine's post: https://davidpine.dev/posts/aspire-docs-mcp-tools/

Aspire CLI 13.1 (integration tools only)

On 13.1, the MCP server provides integration lookup but not docs search:

Tool Description
list_integrations Lists available Aspire hosting integrations
get_integration_docs Gets documentation for a specific integration package

For general docs queries on 13.1, use Context7 as your primary source (see below).

Fallback: Context7

Use Context7 (mcp_context7) when the Aspire MCP docs tools are unavailable (13.1) or the MCP server isn't running:

Step 1 — Resolve the library ID (one-time per session):

Call mcp_context7_resolve-library-id with libraryName: ".NET Aspire".

Rank Library ID Use when
1 /microsoft/aspire.dev Primary source. Guides, integrations, CLI reference, deployment.
2 /dotnet/aspire API internals, source-level implementation details.
3 /communitytoolkit/aspire Non-Microsoft polyglot integrations (Go, Java, Node.js, Ollama).

Step 2 — Query docs:

libraryId: "/microsoft/aspire.dev", query: "Python integration AddPythonApp service discovery"
libraryId: "/communitytoolkit/aspire", query: "Golang Java Node.js community integrations"

Fallback: GitHub search (when Context7 is also unavailable)

Search the official docs repo on GitHub:

  • Docs repo: microsoft/aspire.dev — path: src/frontend/src/content/docs/
  • Source repo: dotnet/aspire
  • Samples repo: dotnet/aspire-samples
  • Community integrations: CommunityToolkit/Aspire

2. Prerequisites & Install

Requirement Details
.NET SDK 10.0+ (required even for non-.NET workloads — the AppHost is .NET)
Container runtime Docker Desktop, Podman, or Rancher Desktop
IDE (optional) VS Code + C# Dev Kit, Visual Studio 2022, JetBrains Rider
# Linux / macOS
curl -sSL https://aspire.dev/install.sh | bash

# Windows PowerShell
irm https://aspire.dev/install.ps1 | iex

# Verify
aspire --version

…
常见问题

'polyglot' 在 Aspire 语境下是什么意思?

'Polyglot' 意味着 Aspire 支持多种编程语言。你可以在同一个应用中同时使用 C#、Python、JavaScript、Go、Java 等语言。

我需要精通所有支持的编程语言吗?

不需要。Aspire 负责统筹协调,你只需要掌握你所开发的服务所用的语言即可。

什么是 AppHost?

AppHost 是 Aspire 的核心。它是一个描述分布式应用的项目,定义服务、它们的依赖关系以及运行方式。可以把它想象成协调所有乐手(服务)的指挥。

详情

作者的原始描述

Aspire skill covering the Aspire CLI, AppHost orchestration, service discovery, integrations, MCP server, VS Code extension, Dev Containers, GitHub Codespaces, templates, dashboard, and deployment. Use when the user asks to create, run, debug, configure, deploy, or troubleshoot an Aspire distributed application.

repo: github/awesome-copilot

热度

GitHub 星标
40k
排名
#7066
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能