aimock CLI

aimock is a test-API CLI that validates local fixture files before starting a server or exercising the application.

  • 1,005 ★ on the repository
  • Last commit
  • MIT
CLIOfficial

Extended access

Why this level

  • Recording can call real APIs and incur charges
  • Fixtures and journals can retain personal data and request content
  • An incorrect SDK base URL can send a test request to the real API
All reasons and checks

copilotkit/aimock

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/aimock

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Recording can call real APIs and incur charges
  • Fixtures and journals can retain personal data and request content
  • An incorrect SDK base URL can send a test request to the real API

This is third-party code. Review the repository files before installing.

What it does

aimock is a test-API CLI that simulates service responses for testing AI applications. A local server returns prepared data through compatible APIs. You specify streamed responses, tool calls or conversation sequences. Fixtures are files in which you describe requests and their responses. The suite supports model APIs and MCP; search and vector stores can use the same port. For an existing integration, record a real exchange and replay its response later. To test failure handling, specify an error, delay or stream interruption. The journal shows client requests and test-server responses.

Who it is for. AI-application QA engineers testing model and external-tool response handling with prepared test data.

Good fit when

  • A test receives the same model-response sequence on every run.
  • A developer checks retries after rate limits or stream interruptions.
  • An agent workflow calls MCP tools with prepared test responses.
  • A recorded real exchange is replayed without a new provider request.

Not a fit when

  • You need to measure a real model’s answer quality on new tasks
  • You need to measure a model provider’s actual latency and response speed
  • Recorded requests contain work secrets that must not enter test data

Example request

Prepare fixtures for a successful response and a 429 error, then check client retries and the message shown to the user.

Limitations

Set the local base URL before constructing the SDK client; an existing client can keep sending requests to a real API. Recording contacts external services and incurs their usage costs, while ordinary mode reads prepared fixtures. Recordings retain requests and responses; known-secret redaction does not replace reviewing files before committing them. Supported formats and replay-speed settings do not reproduce every service property or exact per-token timing.

How to disable. Stop the local server and restore the application’s intended API base URL. Remove the package with `npm uninstall @copilotkit/aimock`. Review fixtures and journals separately; dependency removal does not erase them.

FAQ

How do I install aimock?

Run `npm install @copilotkit/aimock` in the project. Start the full suite with `npx @copilotkit/aimock --config aimock.json` after creating that configuration file.

What is a fixture?

A file defining request matching and prepared responses. It can describe several conversation turns, tool responses and expected errors.

Can I validate fixtures without starting the server?

Yes. `npx @copilotkit/aimock validate ./fixtures/` checks local files in the chosen directory. It does not start a server or test remote fixture sources. Replace the path with your test-data directory.

How do `llmock` and `aimock` differ?

`llmock` is a compatibility command with a narrower set of flags. Use `aimock` for suite configuration, conversion and fixture validation.

Is agent guidance included?

Yes. The `write-fixtures` skill guides fixture authoring for supported protocols. It ships alongside the CLI and uses the same formats.

What license does aimock use?

MIT.

Discussion

No questions or reviews yet.

CLI tools

Prism is a CLI for OpenAPI tests: clients receive responses from the API description while the backend is still being built.

CLIExtended access5.1KRepository stars
Editors’ pick

A CLI for testing and red teaming LLM applications: compares models, runs automated CI checks and finds vulnerabilities

CLIExtended access26.9KRepository stars

MCP server: an agent sends GET, POST, PUT, DELETE and PATCH to your REST API and gets back status, headers and body

MCP serverExtended access103Repository stars
Official

MCP server, agent and skills for end-to-end UI tests where the agent drives the computer through vision on cloud machines

MCP serverBroad access386Repository stars

The CLI generates API tests from schemas and gives agents reproducible failures in responses and operation sequences.

CLIExtended access3.7KRepository stars

MCP Interviewer checks an MCP server before an agent connects: provider limits, tool tests and a Markdown report.

CLIExtended access158Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
aimock (this card)yes1,005
Mock T-Bank API server for developmentno0simulates a banking API for tests; aimock provides model, MCP and agent-protocol substitutes
Dev Proxy skillno842A skill helps an agent configure Dev Proxy to test API errors, rate limiting and delayed responses in an application.

README in short

In a Node.js test, the `LLMock` class from `@copilotkit/aimock` defines responses and starts the server from code. That test does not need a separate terminal command.

README badge

Report a problem

Foxx AIaimock
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.