mockoon-cli
Use Mockoon CLI to create API proxies with full request/response logging, mock API servers for testing, and record real API interactions for debugging. Use when testing APIs, creating compatibility layers, debugging microservices, analyzing API traffic patterns, or when the user mentions Mockoon, API mocking, mock servers, or API proxies.
What this skill does
# Mockoon CLI for API Proxy Testing and Mock Server Management
## Overview
Mockoon CLI is a production-ready Node.js tool that runs sophisticated mock API servers and transparent proxies for API testing, debugging, and development. With over 400,000 downloads and 7,600+ GitHub stars, it's widely used across Fortune 500 companies for API development workflows.
**Core capabilities:**
- Create transparent proxies to real APIs with full traffic logging
- Run mock API servers from configuration files
- Record and analyze API interactions for debugging
- Generate dynamic responses using templating (Faker.js, Handlebars)
- Combine real and mock endpoints (partial mocking)
## Installation
```bash
# Global installation (recommended)
npm install -g @mockoon/cli
# Verify installation
mockoon-cli --version
# Local project installation
npm install --save-dev @mockoon/cli
```
**Requirements:** Node.js 18+ or 20+
## When to Use Mockoon CLI
**For API Testing:**
- Test your application against controllable mock endpoints
- Simulate error scenarios impossible to trigger in production
- Create reproducible test environments without external dependencies
**For Debugging:**
- Proxy traffic to real APIs and log all requests/responses
- Analyze API behavior across microservices architectures
- Trace correlation IDs and debug integration issues
**For Compatibility Layers:**
- Record real API interactions through proxies
- Design adapters between incompatible API versions
- Convert recorded traffic into permanent mocks
## Quick Start Examples
### Basic Mock Server
```bash
# Start a mock from configuration file
mockoon-cli start --data ./mock-config.json --port 3000
# With transaction logging
mockoon-cli start --data ./mock-config.json --port 3000 --log-transaction
```
### Basic API Proxy
```bash
# Create proxy configuration first (see proxy configuration section)
mockoon-cli start --data ./proxy-config.json --port 3000 --log-transaction
```
## Understanding Mockoon Architecture
Mockoon CLI is fundamentally a companion to the Mockoon desktop GUI application. The workflow is:
1. **Design visually** - Use the desktop app's interface to configure mock APIs
2. **Export configuration** - Save as JSON file (Mockoon data format)
3. **Deploy via CLI** - Run those configurations in headless environments
This separation makes Mockoon uniquely accessible—non-technical team members can design APIs visually while developers automate deployment through CI/CD pipelines.
## Creating API Proxies for Testing and Debugging
### Single API Proxy with Full Logging
**Use case:** Debug interactions with `https://api1.example.com` by proxying all traffic through localhost:3000 and logging everything.
**Proxy configuration** (`api1-proxy.json`):
```json
{
"uuid": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
"lastMigration": 29,
"name": "API1 Proxy",
"port": 3000,
"hostname": "0.0.0.0",
"routes": [],
"proxyMode": true,
"proxyHost": "https://api1.example.com",
"proxyRemovePrefix": false,
"cors": true,
"headers": [
{
"key": "X-Proxy-By",
"value": "Mockoon-Debug"
}
]
}
```
**Start the proxy:**
```bash
mockoon-cli start \
--data ./api1-proxy.json \
--port 3000 \
--log-transaction \
--max-transaction-logs 500
```
**Route traffic through proxy:**
```bash
# Instead of: curl https://api1.example.com/users/123
# Use: curl http://localhost:3000/users/123
curl http://localhost:3000/users/123
curl -X POST http://localhost:3000/orders -d '{"item": "widget"}'
```
**Access logged data:**
```bash
# Get all transaction logs via Admin API
curl http://localhost:3000/mockoon-admin/logs > api1-logs.json
# Analyze with jq
cat api1-logs.json | jq '.transactions[] | select(.request.url | contains("/users"))'
# Count by HTTP method
cat api1-logs.json | jq '.transactions | group_by(.request.method) | map({method: .[0].request.method, count: length})'
# Find slow responses (>1000ms)
cat api1-logs.json | jq '.transactions[] | select(.responseTime > 1000)'
```
### Multiple API Proxies for Microservices
**Use case:** Debug a system with 3 microservices running on different domains.
Create separate proxy configurations for each service, then start all proxies:
```bash
# Background processes
mockoon-cli start --data ./api1-proxy.json --port 3000 --log-transaction &
mockoon-cli start --data ./api2-proxy.json --port 3001 --log-transaction &
mockoon-cli start --data ./api3-proxy.json --port 3002 --log-transaction &
```
**Or use package.json scripts:**
```json
{
"scripts": {
"proxy:api1": "mockoon-cli start -d ./api1-proxy.json -p 3000 --log-transaction",
"proxy:api2": "mockoon-cli start -d ./api2-proxy.json -p 3001 --log-transaction",
"proxy:api3": "mockoon-cli start -d ./api3-proxy.json -p 3002 --log-transaction",
"proxy:all": "run-p proxy:api1 proxy:api2 proxy:api3"
}
}
```
## Partial Mocking: Combining Real and Mock Endpoints
**Use case:** Proxy most traffic to production, but intercept specific problematic endpoints for testing.
```json
{
"uuid": "partial-mock-001",
"lastMigration": 29,
"name": "Partial Mock Proxy",
"port": 3000,
"proxyMode": true,
"proxyHost": "https://api1.example.com",
"routes": [
{
"uuid": "route-001",
"method": "get",
"endpoint": "users/90",
"responses": [
{
"uuid": "response-001",
"statusCode": 200,
"body": "{\"id\": 90, \"name\": \"Test User\", \"error_case\": true}",
"headers": [{"key": "Content-Type", "value": "application/json"}]
}
]
},
{
"uuid": "route-002",
"method": "post",
"endpoint": "orders",
"responses": [
{
"uuid": "response-002",
"statusCode": 500,
"body": "{\"error\": \"Simulated server error\"}",
"headers": [{"key": "Content-Type", "value": "application/json"}]
}
]
}
]
}
```
**Behavior:**
- `GET /users/90` → Mocked (returns test data)
- `POST /orders` → Mocked (simulates 500 error)
- All other requests → Proxied to api1.example.com
## Dynamic Response Templating
### Request-Based Responses
```json
{
"routes": [
{
"uuid": "dynamic-001",
"method": "get",
"endpoint": "users/:userId",
"responses": [
{
"uuid": "resp-001",
"statusCode": 200,
"body": "{\"id\": {{urlParam 'userId'}}, \"name\": \"{{faker 'person.fullName'}}\", \"email\": \"{{faker 'internet.email'}}\"}",
"headers": [{"key": "Content-Type", "value": "application/json"}]
}
]
}
]
}
```
**Available template helpers:**
- `{{urlParam 'name'}}` - Path parameters
- `{{queryParam 'name' 'default'}}` - Query strings
- `{{body 'path.to.field'}}` - Request body properties
- `{{header 'Header-Name'}}` - Request headers
- `{{faker 'category.method'}}` - Generate fake data
- `{{now}}` - Current timestamp
- `{{faker 'string.uuid'}}` - Generate UUID
### Conditional Responses for Error Testing
```json
{
"routes": [
{
"uuid": "conditional-001",
"method": "post",
"endpoint": "payments",
"responses": [
{
"uuid": "resp-success",
"statusCode": 200,
"body": "{\"status\": \"success\", \"transactionId\": \"{{faker 'string.uuid'}}\"}",
"rules": [
{
"target": "body",
"modifier": "amount",
"value": "100",
"operator": "gte"
}
]
},
{
"uuid": "resp-insufficient",
"statusCode": 400,
"body": "{\"error\": \"Insufficient funds\"}",
"default": true
}
]
}
]
}
```
## Minimal Configuration Structure
```json
{
"uuid": "unique-environment-id",
"lastMigration": 29,
"name": "My Mock API",
"port": 3000,
"hostname": "0.0.0.0",
"routes": [],
"cors": true
}
```
## Command Reference
### Core Commands
```bash
# Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.