Skip to content

[docs] Add Custom process commands docs (withProcessCommand / withProcessCommandFactory)#923

Merged
IEvangelist merged 2 commits into
release/13.4from
docs/process-command-factory-16972-e6171673d8293861
May 12, 2026
Merged

[docs] Add Custom process commands docs (withProcessCommand / withProcessCommandFactory)#923
IEvangelist merged 2 commits into
release/13.4from
docs/process-command-factory-16972-e6171673d8293861

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#16972, authored by @davidfowl.

Targeting release/13.4 based on the source PR milestone 13.4.

Why this PR is needed

microsoft/aspire#16972 added two new TypeScript (polyglot) AppHost APIs for attaching process-backed resource commands to resources:

  • withProcessCommand – registers a command with a fixed process spec (executable, arguments, environment) at AppHost startup.
  • withProcessCommandFactory (new in #16972) – registers a command whose process spec is built dynamically at invocation time from user-supplied ExecuteCommandContext arguments.

Neither API was previously documented on aspire.dev.

What was changed

  • Created src/frontend/src/content/docs/fundamentals/process-commands.mdx — a new page covering both APIs, their option types, the C# equivalents, and CLI invocation syntax.
  • Updated src/frontend/config/sidebar/docs.topics.ts — registered the new page in the sidebar between "Custom HTTP commands" and "Custom resource URLs".

Generated by PR Documentation Check for issue #16972 · ● 22.6M ·

…t APIs

Documents the TypeScript (polyglot) process-backed resource command APIs
introduced in microsoft/aspire#16972:
- withProcessCommand: static process spec registered at AppHost startup
- withProcessCommandFactory: dynamic spec built from ExecuteCommandContext
  arguments at invocation time

Adds fundamentals/process-commands.mdx and registers it in the sidebar
between Custom HTTP commands and Custom resource URLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label May 12, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from JamesNK May 12, 2026 07:00
Move the TypeScript process command factory example into the existing custom resource commands page and remove the duplicate standalone page/navigation entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

const cache = await builder.addRedis('cache');

await cache.withProcessCommandFactory(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest, what are the rules for when to append Factory to the end of the polygot method name?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have, calback and factory, this just seemed like a better name, but maybe we should call it Callback.

@sebastienros

@IEvangelist IEvangelist marked this pull request as ready for review May 12, 2026 12:02
@IEvangelist IEvangelist self-requested a review as a code owner May 12, 2026 12:02
@IEvangelist IEvangelist merged commit 3761291 into release/13.4 May 12, 2026
5 checks passed
@IEvangelist IEvangelist deleted the docs/process-command-factory-16972-e6171673d8293861 branch May 12, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants