Communitygithub.com

cli-anything-wiremock

WireMock HTTP 모의 서버 관리를 위한 Python CLI 도구

cli-anything-wiremock란 무엇인가요?

`cli-anything-wiremock`은 WireMock Admin REST API(`/__admin/`)를 래핑한 명령줄 인터페이스로, 개발자와 AI 에이전트가 HTTP 스텁 매핑 관리, 요청 조회, 상태 저장 시나리오 제어, 실제 백엔드 트래픽 기록 등을 터미널이나 에이전트 도구 호출로 수행할 수 있게 해줍니다. 주로 통합 테스트 환경에서 실제 HTTP 백엔드를 통제 가능한 모의 응답으로 대체하는 데 사용됩니다. 이 도구는 `stub`, `request`, `scenario`, `record`, `settings` 등 주요 명령 그룹을 제공하며, 모든 명령에서 `--json` 플래그를 지원하여 에이전트가 파싱하기 쉬운 JSON 출력을 반환합니다. 환경 변수(`WIREMOCK_HOST`, `WIREMOCK_PORT`)를 통해 WireMock 서버 연결을 설정하며, 빠른 스텁 생성, 요청 카운트 검증, 시나리오 기반 상태 전환 등의 워크플로우를 지원합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-wiremock

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

개요

cli-anything-wiremock은 WireMock Admin REST API(/__admin/)를 래핑하는 명령줄 인터페이스입니다. 에이전트와 개발자는 터미널 또는 에이전트 도구 호출을 통해 HTTP 스텁 매핑을 관리하고, 서빙된 요청을 검사하고, 상태 저장 시나리오를 제어하며, 실제 백엔드 트래픽을 기록할 수 있습니다.

WireMock은 일반적으로 통합 테스트 환경에서 실제 HTTP 백엔드를 통제 가능한 모의 응답으로 대체하는 데 사용됩니다.

명령 그룹

stub — HTTP 스텁 매핑 관리

명령어설명
stub list등록된 모든 스텁 목록 표시
stub get <id>UUID로 특정 스텁의 상세 정보 조회
stub create <json>JSON 문자열로 스텁 생성
stub quick M URL S빠른 스텁 생성: METHOD URL STATUS_CODE
stub delete <id>UUID로 스텁 삭제
stub reset모든 스텁을 디스크 기본값으로 리셋
stub save메모리 내 스텁을 디스크에 저장
stub import <file>JSON 파일에서 스텁 가져오기

request — 서빙된 요청 검사

명령어설명
request list최근 서빙된 요청 목록 표시
request find <pattern>JSON 패턴과 일치하는 요청 검색
request count <pattern>JSON 패턴과 일치하는 요청 개수 카운트
request unmatched어떤 스텁과도 일치하지 않은 요청 목록(404)
request reset요청 저널 초기화

scenario — 상태 저장 시나리오 관리

명령어설명
scenario list모든 시나리오 및 현재 상태 목록 표시
scenario set N S시나리오 NAME을 STATE로 설정
scenario reset모든 시나리오를 초기 상태로 리셋

record — 실제 백엔드 트래픽 기록

명령어설명
record start <url>TARGET_URL로 프록시 + 기록 시작
record stop기록 중지, 캡처된 스텁 반환
record status현재 기록 중인지 확인
record snapshot메모리 내 요청을 스텁으로 스냅샷 생성

settings — 글로벌 서버 설정

명령어설명
settings get현재 글로벌 WireMock 설정 조회
settings versionWireMock 서버 버전 표시

최상위 명령어

명령어설명
statusWireMock 실행 상태 확인
reset전체 리셋: 스텁 + 요청 + 시나리오
shutdownWireMock 서버 정상 종료

주요 예제

# 연결 확인
cli-anything-wiremock status

# 빠른 형식으로 스텁 생성
cli-anything-wiremock stub quick GET /api/users 200 --body '[{"id":1}]'

# 전체 JSON으로 스텁 생성
cli-anything-wiremock stub create '{
  "request": {"method": "POST", "url": "/api/orders"},
  "response": {"status": 201, "body": "{\"id\":99}"}
}'

# POST가 정확히 한 번 호출되었는지 확인
cli-anything-wiremock --json request count '{"method":"POST","url":"/api/orders"}'
# → {"count": 1}

# 시나리오: 상태 전환
cli-anything-wiremock scenario set "cart-flow" "item-added"

# 실제 백엔드 기록
cli-anything-wiremock record start https://api.example.com
# ... 요청 보내기 ...
cli-anything-wiremock record stop

에이전트 가이드

에이전트 컨텍스트에서는 항상 --json 사용

스크립트나 에이전트 도구 호출에서는 모든 호출에 --json을 사용하세요. JSON 출력은 명령 유형에 따라 다릅니다(이들은 모든 응답을 감싸는 래퍼가 아닌 별개의 응답 유형입니다):

# 데이터 명령어는 WireMock API JSON을 직접 반환합니다:
cli-anything-wiremock --json stub quick GET /api/hello 200 --body '{"hello":"world"}'
# → {"id": "abc-123", "request": {...}, "response": {...}, ...}

cli-anything-wiremock --json stub list
# → {"mappings": [...], "total": N}

# void 명령어(delete, reset, save)는 다음을 반환합니다:
# → {"status": "ok"}

# 오류는 다음을 반환합니다:
# → {"status": "error", "message": "Connection refused"}

환경 변수를 통한 연결

명령어를 호출하기 전에 환경 변수로 연결 매개변수를 설정하세요:

export WIREMOCK_HOST=localhost
export WIREMOCK_PORT=8080

테스트 검증 워크플로우 패턴

  1. 테스트 대상 시스템을 실행하기 전에 스텁을 설정합니다:
    cli-anything-wiremock --json stub quick POST /api/payment 200 --body '{"success":true}'
    
  2. 테스트 대상 시스템을 실행합니다.
  3. 상호작용을 확인합니다:
    cli-anything-wiremock --json request count '{"method":"POST","url":"/api/payment"}'
    
  4. 정리합니다:
    cli-anything-wiremock reset
    

오류 처리

모든 오류는 0이 아닌 종료 코드를 반환합니다. --json 모드에서 오류는 {"status": "error", "message": "..."}를 반환합니다. 성공 시 원시 WireMock API 응답을 반환합니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

관련 스킬