cli-anything-wiremock
यह क्या करती है
यह स्किल AI एजेंट को WireMock नियंत्रित करने देती है, जो टेस्टिंग के दौरान किसी वेब सेवा की जगह लेने वाला टूल है। यह उन डेवलपर्स के लिए है जिन्हें असली बैकएंड इस्तेमाल किए बिना टेस्ट के लिए नकली जवाब चाहिए।
कब इस्तेमाल करें
- ✓जब आप टेस्ट वातावरण के लिए नकली API जवाब सेट करना चाहते हैं।
- ✓जब आपको जाँचना है कि mock सर्वर को असल में कौन से अनुरोध मिले।
- ✓जब आप असली बैकएंड का ट्रैफ़िक रिकॉर्ड करके उसे mock जवाबों के रूप में दोबारा इस्तेमाल करना चाहते हैं।
Skill का लिंक
https://github.com/HKUDS/CLI-Anything/blob/main/skills/cli-anything-wiremock/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे टेस्ट सर्वर पर /orders पेज के लिए एक नकली जवाब सेट कीजिए, जो status 200 लौटाए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट WireMock के admin इंटरफ़ेस को कमांड भेजता है, ताकि stub mappings बनाए, सूचीबद्ध करे या हटाए, और आए अनुरोधों की जाँच करे। बदलाव चल रहे mock सर्वर पर लागू होते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Overview
cli-anything-wiremock is a command-line interface that wraps the WireMock Admin REST API (/__admin/). It allows agents and developers to manage HTTP stub mappings, inspect served requests, control stateful scenarios, and record real backend traffic — all from the terminal or from agent tool calls.
WireMock is commonly used in integration testing environments to replace real HTTP backends with controllable mock responses.
Command Groups
stub — Manage HTTP stub mappings
| Command | Description |
|---|---|
stub list |
List all registered stubs |
stub get <id> |
Get details of a specific stub by UUID |
stub create <json> |
Create a stub from a JSON string |
stub quick M URL S |
Quickly create a stub: METHOD URL STATUS_CODE |
stub delete <id> |
Delete a stub by UUID |
stub reset |
Reset all stubs to the defaults on disk |
stub save |
Persist in-memory stubs to disk |
stub import <file> |
Import stubs from a JSON file |
request — Inspect served requests
| Command | Description |
|---|---|
request list |
List recent served requests |
request find <pattern> |
Find requests matching a JSON pattern |
request count <pattern> |
Count requests matching a JSON pattern |
request unmatched |
List requests that matched no stub (404s) |
request reset |
Clear the request journal |
scenario — Stateful scenario management
| Command | Description |
|---|---|
scenario list |
List all scenarios and current states |
scenario set N S |
Set scenario NAME to STATE |
scenario reset |
Reset all scenarios to their initial state |
record — Record traffic from a real backend
| Command | Description |
|---|---|
record start <url> |
Start proxying + recording to TARGET_URL |
record stop |
Stop recording, return captured stubs |
record status |
Check if currently recording |
record snapshot |
Snapshot in-memory requests as stubs |
settings — Global server settings
| Command | Description |
|---|---|
settings get |
Get current global WireMock settings |
settings version |
Show WireMock server version |
Top-level commands
| Command | Description |
|---|---|
status |
Check if WireMock is running |
reset |
Full reset: stubs + requests + scenarios |
shutdown |
Gracefully shut down the WireMock server |
Key Examples
# Check connectivity
cli-anything-wiremock status
# Create a stub using quick form
cli-anything-wiremock stub quick GET /api/users 200 --body '[{"id":1}]'
# Create a stub using full JSON
cli-anything-wiremock stub create '{
"request": {"method": "POST", "url": "/api/orders"},
"response": {"status": 201, "body": "{\"id\":99}"}
}'
# Verify a POST was made exactly once
cli-anything-wiremock --json request count '{"method":"POST","url":"/api/orders"}'
# → {"count": 1}
# Scenario: advance state
cli-anything-wiremock scenario set "cart-flow" "item-added"
# Record a real backend
cli-anything-wiremock record start https://api.example.com
# ... make requests ...
cli-anything-wiremock record stop
Agent Guidance
Always use --json in agent contexts
Use --json for all invocations in scripts or agent tool calls. JSON output varies by command type (these are distinct response types, no
अक्सर पूछे जाने वाले सवाल
क्या WireMock चालू होना चाहिए?
हाँ। स्किल WireMock admin API से बात करती है, इसलिए mock सर्वर चल रहा होना चाहिए।
क्या stubs को डिस्क पर सेव किया जा सकता है?
हाँ। एक save कमांड मेमोरी के stubs को डिस्क पर लिखता है, और एक import कमांड उन्हें फ़ाइल से लोड करता है।
क्या समय के साथ बदलने वाले जवाब संभाले जा सकते हैं?
हाँ। स्किल में stateful scenarios के कमांड हैं, जो अनुरोधों के क्रम के साथ जवाब बदलते हैं।
जानकारी
लेखक का मूल विवरण
Python CLI harness for WireMock HTTP mock server administration
repo: HKUDS/CLI-Anything
लोकप्रियता
- GitHub स्टार
- 58k
- रैंकिंग में स्थान
- #3255
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 21/9/2026
कमेंट
- …
इस repository की और skills
cli-anything-3mf
58kयह आपके एजेंट को 3D प्रिंटिंग फ़ाइलों का निरीक्षण और सुधार करने देती है, जिसमें गोल छेद खोजना, उनका आकार बदलना, मेश ठीक करना और दो फ़ाइलों की तुलना शामिल है।
cli-anything-qgis
58kयह आपके एजेंट को टर्मिनल से QGIS मैप प्रोजेक्ट खोलने, संपादित करने और निर्यात करने देती है, जिसमें लेयर, फ़ीचर, प्रिंट लेआउट और प्रोसेसिंग टूल शामिल हैं।
cli-anything-adguardhome
58kयह आपके एजेंट को AdGuard Home, एक नेटवर्क-व्यापी ऐड ब्लॉकर, प्रबंधित करने देती है, जिसमें फ़िल्टर, DNS rewrites, क्लाइंट और क्वेरी लॉग शामिल हैं।
cli-anything-anygen
58kयह आपके एजेंट को लिखे गए प्रॉम्प्ट से AnyGen सेवा का उपयोग करके स्लाइड, दस्तावेज़, वेबसाइट और आरेख बनवाने देती है।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।