For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /docs/index.md.

Decoy documentation

Start with Serve your first mock. You'll make one request return a user, then a 404. The quick start includes installation, both YAML files, and the commands to check each response. If you only need the CLI, choose an installation method.

Write mocks

I want to…Read
Match a path, inspect the request body, or delay a replyHTTP Routes, Cases, and Behaviors
Switch several responses togetherCollections
Return a protobuf message or stream repliesgRPC
Respond to a WebSocket message or close a connectionWebSocket
Decode a custom payload before matching it or encode a replyTransformers and Pipelines

Drive Decoy from a test

Use the Playwright fixture or Testplane plugin to route browser requests to Decoy. Each test gets a Session, so one test can select an error while another still sees a successful response.

For curl or another HTTP client, use the Control API. For a complete setup with its own mocks, browse the runnable examples.

Run the server

  • Configuration lists YAML keys, CLI flags, and defaults.
  • TLS shows how to serve HTTPS with a local certificate.
  • Terminal UI explains how to inspect requests and change the active Collection.
  • Troubleshooting helps you tell a mock miss from a connection or Session problem.
  • Glossary defines the terms used in mock files and the Control API.