What I Built
I built DoppelAPI, a powerful CLI tool designed to solve the age-old bottleneck in software development: Frontend developers waiting for backend APIs to be implemented.
DoppelAPI takes your existing OpenAPI (Swagger) definition and instantly converts it into a fully functional, intelligent mock server. It creates a "Digital Twin" of your future backend, allowing teams to build, test, and integrate immediately.
Unlike standard mock servers that return static or empty data, DoppelAPI is intelligent:
Smart Data Generation: Instead of returning null or "string", it uses AI-driven Faker.js integration to generate realistic data (real names, UUIDs, avatars) based on your schema types.
Visual Dashboard: It launches a beautiful local web interface that serves as live documentation, showing precise JSON request bodies and response examples.
Chaos & Latency Simulation: It allows you to simulate "Real World" conditions. With flags like --delay (network lag) and --chaos (random server crashes), you can test how your app handles edge cases.
Postman Ready: One-click export of your entire mock API as a Postman Collection.
It transforms a static YAML file into a living, breathing API ecosystem.
Demo
You can find the source code and full documentation here: https://github.com/sametuca/doppelapi
Quick Start
You can run it instantly using the interactive wizard or command line arguments:
Bash
Install globally
npm install -g doppelapi
Run the wizard (Auto-discovers your OpenAPI files)
doppelapi
Or use specific flags
doppelapi start ./openapi.yaml --watch --delay --chaos
My Experience with GitHub Copilot CLI
Building DoppelAPI was an intense sprint, and GitHub Copilot CLI was my pair programmer throughout the entire process. It fundamentally changed how I approached CLI development.
Here is how Copilot CLI helped me build the specific features of DoppelAPI:
- Building the "Chaos Mode" Logic I wanted a feature to simulate server instability. I asked Copilot CLI directly in the terminal:
"How can I write an Express middleware that randomly returns a 500 error 10% of the time to simulate server instability?"
It generated the exact math (Math.random() < 0.1) and middleware structure, which I instantly integrated into the --chaos flag logic.
- Smart Data Mapping (Faker.js) Mapping complex OpenAPI types to Faker.js functions is tedious. I used Copilot to generate the mapping logic:
"Write a function that maps OpenAPI types like 'string', 'uuid', and 'email' to corresponding Faker.js methods."
This helped me implement the "Smart Data" feature where users can even use x-faker extensions in their schema.
- Visual Dashboard & Postman Export Generating a Postman collection JSON from an OpenAPI object is complex. Copilot CLI helped me understand the structure required by Postman:
"Convert an OpenAPI path object into a Postman Collection item format using JavaScript."
This allowed me to build the "One-Click Export" feature that developers love.
- Interactive CLI Wizard To make the tool user-friendly, I wanted an auto-discovery feature. Copilot guided me on how to use glob patterns to find .yaml files in the current directory and present them in a selection list.
Conclusion: GitHub Copilot CLI didn't just write code; it helped me design features. It acted as a bridge between my ideas (like "Chaos Mode") and the implementation, allowing me to build a production-grade tool in a fraction of the time.
Copilot cli usage phase






























Top comments (0)