Quick Start Guide

Get up and running with MicroRapid in 30 seconds. This guide demonstrates the complete workflow using the JSONPlaceholder API - a free fake REST API for testing.

Prerequisites

Install MicroRapid using your preferred package manager:

# Cargo (Recommended)
cargo install mrapids

# npm
npm install -g mrapids

# pip
pip install mrapids

# Or download pre-built binary
curl -fsSL https://microrapid.dev/install.sh | sh

Verify installation:

mrapids --version

Step-by-Step Workflow

1. Initialize Project

Create a MicroRapid project from any OpenAPI specification:

# From URL
$ mrapids init jsonplaceholder --from-url https://raw.githubusercontent.com/deepwissen/specs/main/jsonplaceholder.yaml

 Downloaded OpenAPI specification
 Created project structure:
  📁 jsonplaceholder/
    ├── 📁 specs/
   └── api.yaml
    ├── 📁 requests/
    ├── 📁 data/
    ├── 📁 config/
    └── mrapids.yaml

$ cd jsonplaceholder

Alternative: Initialize from popular APIs

# GitHub API
$ mrapids init github --example github

# Stripe API  
$ mrapids init stripe --example stripe

2. List Available Operations

See what operations are available in the API:

$ mrapids list

╭────────────────────────┬────────┬─────────────────────────────╮
 Operation Method Path
├────────────────────────┼────────┼─────────────────────────────┤
 listPosts GET /posts
 createPost POST /posts
 getPost GET /posts/{id}
 updatePost PUT /posts/{id}
 deletePost DELETE /posts/{id}
 getPostComments GET /posts/{id}/comments
 listUsers GET /users
╰────────────────────────┴────────┴─────────────────────────────╯

Total: 11 operations

3. Analyze and Generate Examples

Generate example requests for all operations:

$ mrapids analyze --all

🔍 Analyzing OpenAPI specification...
 Found 11 operations

📝 Generating examples:
 listPosts requests/examples/list-posts.yaml
 createPost requests/examples/create-post.yaml
 getPost requests/examples/get-post.yaml
 updatePost requests/examples/update-post.yaml

📄 Generated data files:
 data/examples/create-post.json
 data/examples/update-post.json

 Analysis complete! Generated 11 request examples

4. Explore Operations

Search for specific operations:

$ mrapids explore post

🔍 Searching for 'post' in operations...

╭───┬─────────────────┬────────┬──────────────────────┬───────╮
 # │ Operation       │ Method │ Path                 │ Score │
├───┼─────────────────┼────────┼──────────────────────┼───────┤
 1 createPost POST /posts 100
 2 updatePost PUT /posts/{id} 100
 3 getPost GET /posts/{id} 95
 4 listPosts GET /posts 90
╰───┴─────────────────┴────────┴──────────────────────┴───────╯

5. Show Operation Details

Get detailed information about a specific operation:

$ mrapids show createPost --examples

╭─────────────────────────────────────────────────╮
 Operation: createPost
├─────────────────────────────────────────────────┤
 Method:      POST
 Path:        /posts
 Description: Create a new post
 Tags:        posts
╰─────────────────────────────────────────────────╯

Request Body (required):
  Content-Type: application/json
  
  Schema:
  {
    "title": "string (required)",
    "body": "string (required)",
    "userId": "integer (required)"
  }

Example Request:
  POST https://jsonplaceholder.typicode.com/posts
  
Example Response (201):
{
  "id": 101,
  "title": "Example post title",
  "body": "Example post body content",
  "userId": 1
}

6. Run Operations

Execute API operations with one-line commands:

Get a Post

$ mrapids run getPost --id 1

GET https://jsonplaceholder.typicode.com/posts/1

Response (87ms): 200 OK
{
  "userId": 1,
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati excepturi",
  "body": "quia et suscipit suscipit recusandae consequuntur..."
}

Create a New Post

# Method 1: Use inline parameters
$ mrapids run createPost --title "Hello from MicroRapid" --body "This is fast!" --userId 1

# Method 2: Use data file
$ cat > my-post.json << EOF
{
  "title": "MicroRapid: The Future of API Testing",
  "body": "MicroRapid makes API testing fast and enjoyable...",
  "userId": 1
}
EOF

$ mrapids run createPost --data @my-post.json

POST https://jsonplaceholder.typicode.com/posts
Content-Type: application/json

Response (523ms): 201 Created
{
  "id": 101,
  "title": "MicroRapid: The Future of API Testing",
  "body": "MicroRapid makes API testing fast and enjoyable...",
  "userId": 1
}

7. Generate SDK

Generate client code for your preferred language:

# TypeScript SDK
$ mrapids generate specs/api.yaml --target typescript --output ./sdk

 Generated TypeScript SDK
  📁 ./sdk/
    ├── src/
   ├── client.ts
   ├── models.ts
   └── index.ts
    ├── package.json
    └── README.md

Complete Example Workflow

Here’s a real-world example of building a blog post manager:

# 1. Initialize from any OpenAPI spec
mrapids init blog --from-url https://api.example.com/openapi.yaml
cd blog

# 2. Generate examples for all endpoints
mrapids analyze --all

# 3. Explore available operations
mrapids explore user

# 4. Test an endpoint instantly
mrapids run getUser --id 123

# 5. Create content with one command
mrapids run createPost --title "My Post" --body "Content here" --userId 1

# 6. Generate SDK for your app
mrapids generate specs/api.yaml --target python --output ./sdk

Why It’s Fast

Traditional Way (30s)

  1. Open Postman
  2. Find collection
  3. Set authentication
  4. Configure request
  5. Execute

MicroRapid Way (87ms)

mrapids run getUser --id 123

Tips and Best Practices

  1. Always run analyze first: Generate examples after initializing
  2. Use explore to find operations: Search by keyword instead of scrolling docs
  3. Save successful requests: Use --save to create reusable templates
  4. Leverage tab completion: MicroRapid supports shell completions

Next Steps

Troubleshooting

# Verbose output for debugging
mrapids run getPost --id 1 -v

# Validate your spec
mrapids validate

# Get help for any command
mrapids help run
  </article>
</div>