snapapi-cli
v1.0.1
Published
Create instant REST APIs from JSON. No signup required.
Downloads
14
Maintainers
Readme
snapapi
Create instant REST APIs from JSON. No signup required.
Quick Start
npx snapapi create '{"users":[{"id":1,"name":"Alice"}]}'Commands
Create from inline JSON
npx snapapi create '{"users":[{"id":1,"name":"Alice"}]}'Create from file
npx snapapi create data.jsonCreate from stdin
echo '{"users":[{"id":1}]}' | npx snapapi create
cat data.json | npx snapapi createGenerate mock data
npx snapapi generate --resource users --count 10 --fields "id:autoincrement,name:name,email:email"Available field types
| Type | Description | Example |
|------|-------------|---------|
| autoincrement | Sequential integers | 1, 2, 3, ... |
| name | Random full name | Alice Smith |
| email | Random email | [email protected] |
| boolean | Random true/false | true |
| number | Random integer 0-999 | 42 |
| date | Random date (past year) | 2025-08-15 |
| text | Lorem ipsum text | lorem ipsum dolor... |
| uuid | Random UUID v4 | 550e8400-e29b... |
Output
✓ Mock API created!
Base URL: https://snapapi.akokoa1221.workers.dev/api/mock/abc-123
Webhook: https://snapapi.akokoa1221.workers.dev/api/webhook/abc-123
Docs: https://snapapi.akokoa1221.workers.dev/docs/abc-123
Endpoints: users
Try it:
curl https://snapapi.akokoa1221.workers.dev/api/mock/abc-123/usersRequirements
- Node.js 18+
Links
License
MIT
