# WritersLogic Shell Quote (POSIX/PowerShell/cmd.exe)

> WritersLogic Shell Quote (POSIX/PowerShell/cmd.exe) is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Converts up to 50 literal string values into safely shell-quoted arguments for bash, PowerShell, and cmd.exe, with round-trip verification to prove correctness

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/shell-quote?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-shell-quote-posix-powershell-cmd-exe-a173fac5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PZxbbAKEPQOo-ArQrorO9

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-shell-quote-posix-powershell-cmd-exe-a173fac5 -d '<json body>'
```

Example prompt: I need to safely pass these three user-provided strings as separate arguments in a bash and PowerShell command — can you shell-quote them for me: "hello world", "it's a test", and "50% done"?

## When to prefer this

Use this endpoint when an AI agent is dynamically constructing shell command lines from untrusted, user-supplied, or free-form text and needs to safely quote individual argument values without risk of shell injection. It is especially valuable when targeting multiple shells (bash, PowerShell, cmd.exe) simultaneously and when round-trip verification matters. Prefer this over hand-coding quoting logic, which is error-prone for edge cases like embedded quotes, percent signs, and newlines. Do not use it to quote whole commands, choose a shell interpreter, or protect against programs that re-evaluate arguments internally.

## Known failure modes

- Input exceeds 50 strings or 100,000 total characters — returns a validation error
- An invalid shell target name is provided — returns a schema validation error
- String contains characters cmd.exe cannot carry (line breaks, control characters, %, double quotes) — returns 'unsupported' status for that target rather than an error
- Network or service unavailability — returns HTTP 5xx
- Payment not provided or insufficient — returns HTTP 402

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

For each input string and each requested shell target, the endpoint returns the safely quoted argument string (or the status 'unsupported' if the string cannot be safely represented in that shell, e.g. cmd.exe with line breaks, percent signs, or double quotes). It also provides a round-trip parse result proving the quoted form decodes back to the original string, confirming correctness without executing any real shell.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "values": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 4096
   },
   "maxItems": 50,
   "minItems": 1,
   "description": "Literal argument values; at most 100000 characters in total."
  },
  "targets": {
   "type": "array",
   "items": {
    "enum": [
     "bash",
     "powershell",
     "cmd"
    ],
    "type": "string"
   },
   "maxItems": 3,
   "minItems": 1,
   "description": "Shells to quote for; default all three. Status is unsupported when any requested target cannot carry a value."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-shell-quote-posix-powershell-cmd-exe-a173fac5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
