Skip to content

Expand stdio command help text with examples, log behavior, and usage guidance#1551

Merged
garrytrinder merged 8 commits intomainfrom
copilot/document-stdio-command-guidance
Feb 26, 2026
Merged

Expand stdio command help text with examples, log behavior, and usage guidance#1551
garrytrinder merged 8 commits intomainfrom
copilot/document-stdio-command-guidance

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

  • Expand StdioCommand description with detailed explanation of what the command does
  • Add usage examples to the help text (MCP server, Node.js app, custom config)
  • Document log file behavior (timestamped file devproxy-stdio-YYYYMMDD-HHmmss.log, not console)
  • Document stderr error output behavior
  • Update matching description in DevProxyConfigOptions.cs for consistency
  • Align example descriptions to the same column position
  • Build and verify changes
Original prompt

This section details on the original issue you should resolve

<issue_title>Document stdio command: examples, log behavior, and usage guidance</issue_title>
<issue_description>Parent: #1534

Problem

The stdio command is the most directly agent-relevant feature in Dev Proxy — it's how agents use Dev Proxy as an MCP proxy. Yet its help text is the barest of all commands:

Description:
  Proxy stdin/stdout/stderr of local executables

Usage:
  devproxy stdio <command>... [options]

Arguments:
  <command>  The command and arguments to execute

Options:
  -c, --config-file <config-file>    The path to the configuration file
  ...

An agent trying to use this has almost nothing to work from:

  • No examples of actual usage
  • No explanation of what "proxy stdin/stdout/stderr" means in practice
  • No mention that logs go to a timestamped file (not console) to avoid interfering with stdio streams
  • No mention of which plugins work in stdio mode (IStdioPlugin vs IPlugin)
  • No mention that the @ character in package names (like @devproxy/mcp) is handled correctly

Rationale

The stdio command is the bridge between Dev Proxy and the MCP/agent ecosystem. If agents can't figure out how to use it from --help, they'll fail at the exact integration point that matters most.

Proposed solution

  1. Expanded description:

    Proxy stdin/stdout/stderr of local executables.
    Dev Proxy intercepts and processes the stdio streams of the specified command,
    applying configured plugins (mocking, error simulation, etc.) to the traffic.
    Logs are written to a timestamped file (devproxy-stdio-YYYYMMDD-HHmmss.log)
    to avoid interfering with the proxied streams.
    
  2. Examples in help text:

    Examples:
      devproxy stdio npx -y @devproxy/mcp                 Proxy MCP server
      devproxy stdio node server.js                        Proxy Node.js app
      devproxy stdio -c myconfig.json node app.js          With custom config
    
  3. Document log file behavior — agents need to know where to find logs since they won't appear on console.

  4. Document stdio error outputstderr is used for usage errors and exceptions, which is correct but should be stated.

Affected code

  • DevProxy/Commands/StdioCommand.cs — expand description, add help text
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ror behavior

Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Copilot AI changed the title [WIP] Document stdio command with examples and usage guidance Expand stdio command help text with examples, log behavior, and usage guidance Feb 25, 2026
waldekmastykarz and others added 2 commits February 25, 2026 14:11
Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 25, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy /home/REDACTED/work/dev-proxy/dev-proxy/DevProxy/bin/Debug/net10.0/devproxy stdio --help (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@waldekmastykarz waldekmastykarz marked this pull request as ready for review February 25, 2026 14:09
@waldekmastykarz waldekmastykarz requested a review from a team as a code owner February 25, 2026 14:09
Copilot AI review requested due to automatic review settings February 25, 2026 14:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the stdio command help text by adding comprehensive documentation about what the command does, how it works, and practical usage examples. The stdio command is critical for agent integration (especially with MCP servers), and the previous help text was minimal. This change makes the command much more discoverable and usable.

Changes:

  • Added detailed multi-line description explaining stdio proxying behavior, log file handling, and error output
  • Added three practical examples: MCP server proxy, Node.js app proxy, and custom config usage
  • Updated both StdioCommand.cs (actual command) and DevProxyConfigOptions.cs (early parsing) to maintain consistency

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
DevProxy/Commands/StdioCommand.cs Expanded command description from single-line to multi-paragraph with examples, log behavior documentation, and usage guidance
DevProxy/Commands/DevProxyConfigOptions.cs Applied identical help text updates to maintain consistency with the actual StdioCommand implementation

Copy link
Contributor

@garrytrinder garrytrinder left a comment

Choose a reason for hiding this comment

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

Tested: builds clean. Stdio help expanded with description, examples, log file behavior, stderr documentation. Consistent with DevProxyConfigOptions. LGTM.

@garrytrinder garrytrinder enabled auto-merge (squash) February 26, 2026 12:05
@garrytrinder garrytrinder merged commit 3f8297c into main Feb 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document stdio command: examples, log behavior, and usage guidance

4 participants