DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to run a multi-step bash plan in one MCP call with Fauxnix

Use bash_batch to compile and run a known sequence of commands with one result per step.

Who it is forAn engineer building an agent workflow on Windows whose steps are already known and who wants fewer tool calls and clear per-step results.

The problemAgents that call the shell one command at a time spend many round trips, and it is hard to see which step failed in a long sequence.

The outcomeThe agent sends one JSON plan, the server compiles every step before execution, and it returns one structured result per step, stopping on the first nonzero exit by default.

What you need first

  • A Windows machine with PowerShell 5.1 or later (built in)
  • Node.js 22.20.0 or later (Node 18 and 20 are unsupported in v2)
  • npm to install the fauxnix-cli package
  • An agent harness such as Claude Code, Codex, OpenCode, Kimi Code, Qwen Code, or any MCP client

Steps

  1. npm install -g fauxnix-cli
  2. fauxnix install --claude
  3. Call the bash_batch MCP tool with a JSON body such as {"steps": [{"id": "write", "command": "printf 'a\\r\\nb' > data.txt"}, {"id": "measure", "command": "wc -c data.txt"}]} (inferred, check the README)
  4. Read the per-step results in the single response and check the exit codes
  5. Review the compiled plan semantics in docs/rfc-mcp-batch-plans.md for timeout, budget, and cancellation before using it in production

Prompt for your agent

Using the fauxnix `bash_batch` tool from the 20000419/fauxnix repo, send a two-step plan that writes a file named <file-name> and then counts its bytes with `wc -c`. Expect one structured result per step in one response, and verify the byte count matches the content written.

Caveat. The batch plan format is described in an RFC in the repo, so timeout, budget, and cancellation behavior should be read from that document rather than assumed from the example.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page