{"id":49752,"library":"wishmock","title":"Wishmock","description":"Wishmock is a gRPC and Connect RPC mock server (v0.9.9, released monthly) with hot reload, rule-based responses, built-in protovalidate support, and native gRPC-Web without a proxy. It runs as a global CLI, auto-creates project structure, and features a Web UI, Admin API, and MCP server for AI integration. Compared to alternatives like grpc-mock, it offers Connect RPC support and TLS/mTLS out of the box.","status":"active","version":"0.9.9","language":"javascript","source_language":"en","source_url":"https://github.com/lukmanbaidhowi/wishmock","tags":["javascript","grpc","connect-rpc","grpc-web","mock","mock-server","testing","protobuf","proto"],"install":[{"cmd":"npm install wishmock","lang":"bash","label":"npm"},{"cmd":"yarn add wishmock","lang":"bash","label":"yarn"},{"cmd":"pnpm add wishmock","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Installed globally as a CLI tool. Not imported as a library.","wrong":"yarn global add wishmock","symbol":"wishmock CLI","correct":"npm install -g wishmock"},{"note":"The package exports a startServer function for programmatic use. CJS require may still work but ESM is preferred.","wrong":"const wishmock = require('wishmock')","symbol":"wishmock (programmatic use)","correct":"import { startServer } from 'wishmock'"},{"note":"Separate entrypoint for MCP server, started via CLI or programmatically.","wrong":"","symbol":"wishmock MCP server","correct":"npx wishmock-mcp"}],"quickstart":{"code":"// Install globally\nnpm install -g wishmock\n\n// Initialize project\nmkdir my-grpc-mock && cd my-grpc-mock\n\n// Start server (auto-creates directories)\nwishmock\n\n// In another terminal, test with grpcurl:\ngrpcurl -plaintext localhost:50050 list\ngrpcurl -plaintext -d '{\"name\":\"World\"}' localhost:50050 hello.Greeter/SayHello\n\n// Or use the Admin API:\ncurl http://localhost:4319/admin/status","lang":"bash","description":"Install Wishmock globally, create a project directory, start the server, and test with grpcurl or the Admin API."},"warnings":[{"fix":"Use match.request[\"user.age\"] instead of match.request.user.age (though some parsers may accept both).","message":"When using dot notation in rule keys (e.g., user.age), the key must be quoted in YAML when it contains dots in the match block.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Set environment variables GRPC_PORT_PLAINTEXT=50050 and CONNECT_PORT=50052 explicitly if upgrading from an older version.","message":"Default ports changed between versions: In v0.9.x, the Connect RPC default port is 50052 and gRPC default is 50050. Earlier versions may have used different defaults.","severity":"breaking","affected_versions":"<0.9.0"},{"fix":"Rename GRPC_PORT to GRPC_PORT_PLAINTEXT in your configuration.","message":"The environment variable GRPC_PORT is deprecated; use GRPC_PORT_PLAINTEXT for plaintext connections.","severity":"deprecated","affected_versions":">=0.8.0"},{"fix":"Always create a rule file (e.g., rules/grpc/hello.greeter.sayhello.yaml) defining the response body.","message":"Without any rule file, the server returns an empty object {} with status OK, which may not match the expected proto response shape.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Upgrade Node.js to version 18 or later.","message":"The server requires Node.js >=18 due to ESM features. Using an older version will cause syntax errors.","severity":"gotcha","affected_versions":">=0.9.0"}],"env_vars":null,"search_vec":"'admin':50 'ai':56 'altern':60 'api':51 'auto':41 'auto-cr':40 'base':19 'box':75 'built':22 'built-in':21 'cli':39 'compar':58 'connect':7,67,79 'connect-rpc':78 'creat':42 'featur':46 'global':38 'grpc':5,29,63,77,82 'grpc-mock':62 'grpc-web':28,81 'hot':15 'integr':57 'javascript':76 'like':61 'mcp':53 'mock':9,64,84,86 'mock-serv':85 'month':13 'nativ':27 'offer':66 'project':43 'proto':90 'protobuf':89 'protovalid':24 'proxi':33 'releas':12 'reload':16 'respons':20 'rpc':8,68,80 'rule':18 'rule-bas':17 'run':35 'server':10,54,87 'structur':44 'support':25,69 'test':88 'tls/mtls':71 'ui':49 'v0.9.9':11 'web':30,48,83 'wishmock':1,2 'without':31","created_at":"2026-06-07T17:03:25.550758+00:00","updated_at":"2026-06-07T17:03:25.550758+00:00","problems":[{"fix":"Run 'npm install -g wishmock' and ensure npm global bin directory is in your PATH.","cause":"Wishmock not installed globally or not in PATH.","error":"wishmock: command not found"},{"fix":"Install wishmock globally or use 'npx wishmock' for one-off execution.","cause":"Trying to import wishmock as a local module instead of using the CLI.","error":"Error: Cannot find module 'wishmock'"},{"fix":"Set GRPC_PORT_PLAINTEXT to an available port, e.g., 'GRPC_PORT_PLAINTEXT=50051 wishmock'.","cause":"Default gRPC port 50050 is already in use by another process.","error":"Error: listen EADDRINUSE :::50050"},{"fix":"Check the proto definition and ensure the rule matches the correct field names.","cause":"A rule file references a request field that does not exist in the proto definition.","error":"TypeError: Cannot read properties of undefined (reading 'name')"},{"fix":"Quote keys with dots in the match block: match.request[\"user.age\"].","cause":"Using YAML dot notation incorrectly in rule files (e.g., match.request.user.age instead of match.request[\"user.age\"]).","error":"SyntaxError: Unexpected token '.'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/lukmanbaidhowi/wishmock#readme","github":"https://github.com/lukmanbaidhowi/wishmock","docs":null,"changelog":null,"pypi":null,"npm":"wishmock","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}