Command line

The mock

CommandWhat it does
start [--port 8080] [--admin-port 8081] [--foreground]Start the mock
stopStop it
statusShow the mode, the enabled packs and the active snapshot
url [service]Print the base URL to point a workflow at
log [--service s] [--limit n] [--follow]Show the requests the mock received
up / downStart or remove n8n and the mock together in Docker

Packs

CommandWhat it does
packs list [--installed]List shipped, installed and available packs
packs enable <ids…> / packs disable <ids…>Choose which services are mocked
packs install <ids…> [--ref r]Download a pack that is not shipped in the package
packs init <service> --domain <host>Scaffold a pack to write by hand
packs validate [service] [--json]Check hand-written packs
packs build <service> [--spec f] [--fetch] [--domains a,b]Generate a pack from an OpenAPI file
packs update [services…]Refresh the cached OpenAPI files and rebuild what changed
packs eject <service> [--force]Copy a shipped pack into your project so you can edit it
packs resetReset stored resources to their seed data
packs auditDownload every source OpenAPI file and report on it

Faults

CommandWhat it does
faults set <service> [--status n] [--delay ms] [--empty] [--after n] [--once]Make calls to a service fail or slow down
faults clear [service]Remove faults

Proxy mode and recording

CommandWhat it does
ca install [--host h] [--port n]Print the environment variables that point n8n at the proxy
on / offTurn interception on (replay) or off
record start / record stopRecord real traffic into a pack

Your n8n instance

CommandWhat it does
instances add <name> <url> <apiKey> [--default]Save an n8n instance and its API key
instances use <name> / instances listPick the default instance, or list them
snapshot <id|latest> [--workflow id] [--no-activate] [--commit]Turn one execution into mocks and activate them
diff [id]Compare a later execution against the active snapshot
creds push <type> [--name n] [--field k=v] [--dry-run]Create a placeholder credential on the instance
creds swap <workflow.json> [--in-place] [--real] [--via proxy]Point a workflow's URLs at the mock, or back at the real service
verify <service> --base-url u [--header h] [--param k=v] [--unsafe] [--patch]Compare a pack against the real service

Fault injection

integration-mock faults set slack --status 503 --once

A 503 once, then a 200, and the log marking the fault

FlagEffect
--status nAnswer with this HTTP status
--delay msWait before answering
--emptyAnswer with an empty body
--after nLet the first n calls through
--onceRemove the fault after it fires

Faulted calls are marked FAULT in the log.

The request log

integration-mock log --limit 3

Each line has the time, method, service, path, status and the route that answered. A call that no route matched shows unmatched.

Where files live

PathContentsCommit it?
./.integration-mock/packs/Packs you wrote, recorded or ejectedYes
./.integration-mock/config.jsonWhich packs are enabledNo. It is gitignored
./.integration-mock/snapshots/SnapshotsNo, unless you pass --commit
~/.integration-mock/config.jsonSaved n8n instances and API keys, in plain text
~/.integration-mock/requests.jsonlThe request log, in plain text
~/.integration-mock/ca.pem, ca-key.pemThe local certificate authority for proxy mode. Created on first start

Set INTEGRATION_MOCK_HOME to move the ~/.integration-mock folder.