๐จ 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:
-
curlfor 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
First request:
apicraft get https://api.github.com/users/sanjaysah101
Set environments:
apicraft set baseUrl https://api.example.com
apicraft get {{baseUrl}}/users
๐ญ 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
Now you can call:
http://localhost:3000/users
๐ 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 (1)
great