DEV Community

Sanjay Kumar Sah
Sanjay Kumar Sah

Posted on

Meet Apicraft – A Zero-Dependency CLI that Replaces Postman, curl, and Mock Servers

🎨 Introducing Apicraft – A Unified CLI for the Complete API Development Lifecycle

If you’re a developer who lives in the terminal, chances are you juggle multiple tools:

  • curl for quick requests
  • Postman or Insomnia for testing and environments
  • Mock servers for frontend dev
  • And maybe code snippets for fetch/axios

Wouldn’t it be great if you could do all of that in one CLI tool β€” with zero dependencies?

That’s exactly why I built Apicraft πŸš€


✨ What is Apicraft?

Apicraft is a unified CLI tool for API development. It handles everything from testing to mocking to code generation β€” all inside your terminal.

πŸ”‘ Key features:

  • πŸš€ Send beautifully formatted HTTP requests (GET, POST, PUT, DELETE, PATCH)
  • πŸ”§ Manage environments (dev/prod) and use variable interpolation
  • πŸ’Ύ Save & replay requests (never retype the same curl again!)
  • πŸ“œ Track request history and replay any request
  • 🎭 Spin up mock servers from JSON files instantly
  • πŸ”„ Generate fetch/axios/curl code from requests
  • ⚑ Zero dependencies β€” pure Node.js built-ins

πŸš€ Quick Start

Install globally:

pnpm install -g @ansospace/apicraft
# or
npm install -g @ansospace/apicraft
Enter fullscreen mode Exit fullscreen mode

First request:

apicraft get https://api.github.com/users/sanjaysah101
Enter fullscreen mode Exit fullscreen mode

Set environments:

apicraft set baseUrl https://api.example.com
apicraft get {{baseUrl}}/users
Enter fullscreen mode Exit fullscreen mode

🎭 Mock Server Example

Need a quick backend while your team builds APIs? Just drop JSON files in a folder and run:

apicraft mock ./mocks 3000
Enter fullscreen mode Exit fullscreen mode

Now you can call:

http://localhost:3000/users
Enter fullscreen mode Exit fullscreen mode

πŸ† Why Apicraft?

Unlike Postman, curl, or httpie β€” Apicraft is:

  • CLI-native
  • Zero-dependency
  • Git-friendly (config in version control)
  • Includes built-in mocking + code generation

πŸ’‘ Why I Built This

I created Apicraft for the 100lines.dev Hackathon with a strict 300-line limit. That constraint forced me to focus only on features that matter most β€” and make them as compact and efficient as possible.


πŸ“¦ Try it Out

πŸ‘‰ Install from npm: @ansospace/apicraft
πŸ‘‰ GitHub repo: github.com/sanjaysah101/apicraft

Would love to hear your thoughts β€” what would make this CLI even more useful for your workflow? πŸš€

Top comments (0)