Docs CLI Command Reference

CLI command reference

This page lists the commands mockarty-cli provides and what each one is for.
Every command also documents its own flags:

mockarty-cli <command> --help

Start with Mockarty CLI if you want the task-first
walkthrough instead of a catalogue.

Global flags

These flags work on every command:

Flag Environment variable Meaning
--server URL MOCKARTY_SERVER Mockarty server URL
--token TOKEN MOCKARTY_TOKEN API token
--namespace NS MOCKARTY_NAMESPACE Namespace
-o, --output FMT MOCKARTY_OUTPUT table (default), json, wide, quiet
--insecure MOCKARTY_TLS_INSECURE Skip TLS verification (lab use only)
--no-color NO_COLOR Disable coloured output
--help — Show help for the command

Flags beat environment variables, which beat the saved context.

Command groups at a glance

Group Use it for
login, logout, auth, config, refresh Signing in, saved contexts, token refresh
health, verify, wait Checking a server before a run
namespace, token, delegated-credential Namespaces and credentials
serve, mock serve Running a mock server on this machine
mock Creating, listing, exporting, importing and applying mocks
generate, mock convert Turning specifications and foreign stubs into mocks
run, test, postman Running API tests
perf, fuzz, contract, chaos, security Load, fuzzing, contracts, fault injection, security scans
testplan, test-plans, test-runs, watch Test Plans, their runs and reports
tcm, attachments, ui, mobile Test-case management and artefacts
results, allure, testit Importing and exporting test results
ci, flow, git-sync CI orchestration and flows
store, trash, audit, search, prompts, secrets Workspace data
install, update, upgrade, uninstall, versions, self-update, setup Installing and upgrading components
util, tunnel, sniff, mcp, init, extension, support-bundle Local utilities and diagnostics
tui Interactive terminal UI
completion Shell completion scripts

Sign-in and saved contexts

Command What it does
login --server URL --token mk_xxx Save a named connection and check it
login --server URL --token mk_xxx --name staging Save it under a context name
login --status Show the current context
logout Remove the current context’s credentials
auth login [--server URL] [--no-browser] Interactive OAuth device-flow sign-in
refresh Rotate the OAuth access and refresh tokens
config view Print the saved configuration
config get-contexts List contexts
config use-context NAME Switch context
config set-context NAME --server URL --token TOKEN [--namespace NS] Create or update a context
config delete-context NAME Remove a context
health [--verbose] [--wait] Server health; --verbose adds version, uptime and licence tier
verify Pre-flight: server reachable, token valid, namespace accessible, features active
wait [--mocks IDS] [--mock-count N] [--timeout D] Block until the server (and the requested mocks) are ready

Mocks

Command What it does
mock create -f FILE Create or update mocks from a file, directory, or stdin (-)
mock list [--protocol P] [--route R] List mocks in the namespace
mock get ID Print one mock
mock logs ID Recent invocations of a mock
mock delete ID Soft-delete (recoverable from the recycle bin)
mock export -d DIR|FILE Export all mocks to a directory (one file per mock) or one JSON file
mock import -f DIR|FILE Create or update mocks from an export
mock apply -f DIR [--prune] Declarative apply; --prune deletes mocks absent from the files
mock convert INPUT --from wiremock|mockoon|gripmock --out DIR Convert foreign stubs into Mockarty mock files
mock serve [--data-dir DIR] [--port N] Local WireMock/Mockoon/Mockarty stub server

Generating mocks

Command What it does
generate openapi FILE [--upload] [--out FILE] OpenAPI/Swagger → mocks (preview unless --upload)
generate grpc FILE [--upload] Protobuf service → gRPC mocks
generate soap FILE [--upload] WSDL → SOAP mocks
generate graphql FILE [--upload] GraphQL SDL → mocks
generate mcp FILE [--upload] MCP tool manifest → mocks
generate har FILE --out DIR HAR recording → mock files (local)
generate postman FILE --out DIR Postman collection → mock files (local)
generate spec [--format openapi|asyncapi] [--out FILE] Build a specification from the mocks on the server

Running tests

Command What it does
run -f FILE|DIR [--reporter FMT] Run a Mockarty or Postman collection
run --har FILE Run a HAR recording as a collection
run collection NAME|ID Run a collection stored on the server
test run MANIFEST Run a Mockarty-native test manifest
postman run COLLECTION Run a Postman v2.1 collection (Newman-compatible)
perf run SCRIPT Local k6-style load test
perf run-config NAME|ID [--wait] Dispatch a saved load profile to the server
fuzz --target URL [--spec FILE] [--strategy S] Fuzz an API
contract validate --spec FILE Check the server’s mocks against a spec
contract verify --spec FILE --target URL Check a live service against a spec
contract drift --target URL Compare mocks with a live API
contract can-i-deploy --participant NAME --version V --to ENV Deploy gate
contract record-deployment --service NAME --version V --environment ENV Record a deployment
contract deploy-check --role consumer|provider Check one side of a contract before deploying
contract pact import FILE / contract pact verify Publish and verify Pact contracts
contract registry list / contract registry versions [ID] Published API registry
contract health Contract-broker health
security start-scan --target URL Start a security scan
security get-report ID / security list-findings ID Read scan results
security export ID Export a report (SARIF, VEX, HTML, PDF, Allure)
security list-scanners / security list-agents / security cancel ID Scan providers, agents, cancellation
chaos run ... / chaos abort ID Run or abort a chaos experiment
chaos list / chaos get ID / chaos report ID Experiment history and reports
chaos cluster ... / chaos operator ... Cluster connections and the chaos operator
ci run-suite FILE Run a CI suite manifest (test jobs)
results upload DIR|ZIP Upload local results to the server
results convert DIR|ZIP --output FILE Convert results offline
allure upload DIR / allure export / allure launch ... Allure results in and out
testit results upload / testit testrun ... Test IT-compatible result upload
migrate testit|testrail|zephyr|qase Bulk-pull cases from another TMS
migrate from-allure Rewrite Allure SDK imports

chaos fault injection changes a live cluster and asks for an explicit
acknowledgement: --i-know-this-is-preview or MOCKARTY_CHAOS_PREVIEW=1.
Read-only chaos commands work without it.

Test Plans and runs

Command What it does
testplan list / testplan get ID List and inspect plans
testplan create -f plan.yaml / testplan update ID -f plan.yaml Create and edit a plan
testplan delete ID Soft-delete a plan
testplan run ID [--wait] [--timeout D] Run a plan
testplan runs ID / testplan stream RUN / testplan run-status RUN Run history and live progress
testplan run-cancel RUN / testplan pause-run RUN / testplan resume-run RUN Control a run
testplan report RUN --plan PLAN [--format FMT] Download a run report
testplan compare-runs Diff two runs
testplan aggregate-report Transient report across runs
testplan notifications Plan-level notification subscriptions
testplan schedule ... / testplan webhook ... Schedules and webhooks
test-plans merge Merge several runs into one report
test-runs list [--mode functional|load|fuzz|chaos|contract] / test-runs get ID / test-runs report ID Unified run feed
watch plan-run ID Stream a plan run and exit with a CI-friendly code
me awaiting-manual Case steps waiting for your manual resolution

Test-case management and artefacts

Command What it does
tcm folders tree Print the folder tree
tcm folders create --name NAME [--parent-id ID] Create a folder
tcm folders move FOLDER_ID PARENT_ID Reparent a folder
tcm folders rm FOLDER_ID Soft-delete a folder
tcm discover --manifest FILE Sync a framework’s case list into the catalogue
attachments upload FILE --parent-kind K --parent-id ID Upload an artefact to a case, run or step
attachments list --parent-kind K --parent-id ID List a parent’s attachments
attachments get ID / attachments url ID --variant view Metadata and content links
attachments delete ID Soft-delete an attachment
ui list / ui export ID --lang go|python|java|playwright|appium Recorded UI tests
mobile devices / mobile apps upload|list / mobile run ID Device grid and mobile runs

Workspace data

Command What it does
namespace list / namespace current / namespace use NAME Namespaces (ns is an alias)
namespace create NAME Create a namespace (administrator)
token list / token create --name N [--expires 90d] / token delete ID API tokens
delegated-credential create --name N --namespaces NS --actions read --expires 30d Frozen-scope credential
delegated-credential list / rotate ID / revoke ID Manage delegated credentials
store global get|set|delete Global store
store chain get|set|delete Chain stores
trash list / trash summary / trash restore CASCADE_ID / trash purge CASCADE_ID Recycle bin
trash settings get / trash settings set Retention settings
audit export --format csv|json|syslog|cef Audit log export (administrator or support)
search TYPE --query TEXT Entity search (mock, test_plan, perf_config, fuzz_config, chaos_experiment, contract_pact, collection, test_case, …)
prompts list|get|create|update|delete / prompts versions AI prompt library
secrets store ... / secrets entry ... Secret stores and entries
git-sync add|list|pull|push|rm Bind and sync autotest collections with git
collection export-git ID -d DIR / collection import-git DIR Git-friendly collection trees
backup create|list|download Workspace backups
cluster status|upgrade|scale|restart|logs Kubernetes cluster management
connections create|get|advance|revoke Immutable external connections
llm-security get|events|preview|test|set Layered LLM guardrails
delivery-policy environments ... / delivery-policy grants ... Delivery-policy environments
autonomy settings get|set Autonomous-run retention policy
autonomy missions list|get|submit|answer|cancel|flow Autonomous missions
agent "prompt" AI agent chat
agent knowledge review list|show|decide Agent knowledge lifecycle

Local utilities

Command What it does
serve -f FILE|DIR [--port N] [--watch] [--har FILE] Standalone mock server
mcp Run the CLI as a stdio MCP server
recorder start|list|get|stop|export|replay|correlate Server-side traffic recorder
sniff --target URL --port N --output FILE Local HTTP proxy that writes a HAR
tunnel --local PORT --remote HOST:PORT Port forwarding (TCP or SSH)
util ssh-tunnel / util k8s / util gen / util ci Offline helpers
init [--flavor generic|python|go] Scaffold a project
extension download|launch|path Browser capture extension
matcher status HTTP matcher rollout status
plugin list|install|enable|disable|... Plugin management
support-bundle --url URL --out FILE Redacted diagnostic archive

Installation and upgrades

Command What it does
install COMPONENT / install --all Download and install server components such as mockarty, mockarty-resolver, and mockarty-runner
install --mode docker-compose|sqlite|kubernetes Generate a deployment instead of a bare binary
install bundle / install bundle-verify FILE / install airgap-install FILE Air-gapped bundles
upgrade [COMPONENT|all] [--version V] Re-install one or all components
uninstall [COMPONENT|all] Remove installed binaries
versions Installed and latest versions
update Report the latest published version of each component
self-update [--check] [--version V] Replace mockarty-cli itself
setup docker-compose|env|kubernetes --dir DIR Generate deployment configuration

Install current releases of Mockarty Desktop from their native package. Desktop installation

Mockarty Cloud

cloud-spaces, cloud-backups, cloud-connectors, cloud-customer,
cloud-entitlements, cloud-hosted-llm, cloud-oauth-providers,
cloud-operations, cloud-refunds, cloud-risk, cloud-service-account,
cloud-service-accounts, cloud-shared-projects and cloud-webhooks manage a
Mockarty Cloud account (Spaces, billing evidence, connectors, webhooks). They
need a Cloud account and are not served by a self-hosted admin node.

TUI

Command Opens
tui Welcome menu
tui auth Auth status
tui login Sign-in screen
tui test-plans Test Plan picker
tui results [--plan ID] Results viewer
tui mocks Mock list
tui perf Perf configurations
tui fuzz Fuzz targets
tui chaos Chaos experiments

See TUI user guide.

Completion

mockarty-cli completion bash > /etc/bash_completion.d/mockarty-cli
mockarty-cli completion zsh  > "${fpath[1]}/_mockarty-cli"
mockarty-cli completion fish > ~/.config/fish/completions/mockarty-cli.fish
mockarty-cli completion powershell | Out-String | Invoke-Expression

Exit codes

Code Meaning
0 The work ran and the result is good
1 The work ran and the result is bad — a test failed, a contract was violated, findings were raised, nothing was executed
2 The work did not run — no server configured, a credential/licence/quota refusal, or a usage error a command reports as code 2 (unknown flag, unknown subcommand inside a group, a missing required option such as fuzz --target). A missing positional argument or an unknown top-level command exits 1.

Some commands add their own codes on top:

Command Codes
perf run 99 — a threshold was breached, the run stopped abnormally, or it measured nothing
testplan run --wait 1 failed · 2 cancelled · 3 wait timed out
mobile run 1 run failed · 2 the server returned no task id

-o json never changes the verdict: the exit code is the same as with the
human-readable output.

Where to next