mrapids 0.1.31

Your OpenAPI, but executable
Documentation
# MicroRapid Quick Reference

## 🎯 Essential Commands

### Project Setup
```bash
mrapids init my-api                          # New project
mrapids init-config --env prod              # Configure environment
mrapids auth login github                   # Set up authentication
```

### Discovery
```bash
mrapids list operations api.yaml            # List all endpoints
mrapids show getUserById --spec api.yaml   # Show endpoint details
mrapids explore "user" --spec api.yaml     # Search operations
```

### Execution
```bash
mrapids run api.yaml --operation getUser --dry-run           # Preview request
mrapids run api.yaml --operation getUser --param id=123      # Execute with params
mrapids test api.yaml --operation getUser --validate         # Test with validation
```

### Development
```bash
mrapids validate api.yaml --strict          # Validate spec
mrapids analyze api.yaml                    # Generate examples
mrapids sdk api.yaml --language typescript  # Generate SDK
mrapids diff v1.yaml v2.yaml               # Compare versions
```

## 🔥 Most Used Patterns

### Daily Development
```bash
# Morning validation
mrapids validate api.yaml && mrapids test api.yaml --operation health

# Test new endpoint
mrapids analyze api.yaml
mrapids run api.yaml --operation newEndpoint --dry-run
mrapids test api.yaml --operation newEndpoint

# Debug failing call
mrapids show failingOp --spec api.yaml --verbose
mrapids run api.yaml --operation failingOp --curl-output
```

### CI/CD Pipeline
```bash
# Validation stage
mrapids validate api.yaml --strict

# Test stage
mrapids test api.yaml --all --env staging

# Breaking change detection
mrapids diff api-prod.yaml api.yaml --breaking-only
```

### Testing Workflows
```bash
# Setup test suite
mrapids setup-tests api.yaml --framework pytest
mrapids analyze api.yaml --output test-data/

# Run all tests
mrapids test api.yaml --all --validate-response

# Performance test
mrapids test api.yaml --operation search --iterations 100 --concurrent 10
```

## ⚡ Command Matrix

| Need to... | Use Command | Example |
|------------|-------------|---------|
| Start new project | `init` | `mrapids init my-api --from-url https://api.example.com/openapi.json` |
| See what's available | `list` | `mrapids list operations api.yaml --method GET` |
| Understand an endpoint | `show` | `mrapids show createUser --spec api.yaml` |
| Test without calling | `run --dry-run` | `mrapids run api.yaml --operation deleteUser --dry-run` |
| Make API call | `run` | `mrapids run api.yaml --operation getUser --param id=123` |
| Validate responses | `test` | `mrapids test api.yaml --operation getUser --validate` |
| Generate examples | `analyze` | `mrapids analyze api.yaml --output examples/` |
| Create SDK | `sdk` | `mrapids sdk api.yaml --language python` |
| Find breaking changes | `diff` | `mrapids diff api-v1.yaml api-v2.yaml` |
| Set up auth | `auth` | `mrapids auth login github` |
| Clean up | `cleanup` | `mrapids cleanup --all --keep-config` |

## 🚀 Speed Tips

### Use Aliases
```bash
alias mr='mrapids'
alias mrt='mrapids test'
alias mrr='mrapids run'
alias mrv='mrapids validate'
```

### Environment Variables
```bash
export MRAPIDS_SPEC=./api.yaml
export MRAPIDS_ENV=staging
mrapids run --operation getUser  # Uses defaults
```

### Common Flags
- `--dry-run` - Preview without executing
- `--env` - Specify environment
- `--format json` - Machine-readable output
- `--validate` - Validate against schema
- `--verbose` - Detailed output
- `--param key=value` - Pass parameters
- `--body file.json` - Request body from file

## 🎪 Output Formats

```bash
# Human-readable (default)
mrapids list operations api.yaml

# JSON (for parsing)
mrapids list operations api.yaml --format json | jq .

# CSV (for reports)
mrapids diff v1.yaml v2.yaml --format csv > changes.csv

# cURL (for debugging)
mrapids run api.yaml --operation getUser --curl-output
```

## 📝 File Locations

```
.mrapids/
├── auth/          # Authentication profiles
├── config/        # Environment configs
├── cache/         # Cached responses
└── requests/      # Saved requests

examples/          # Generated by 'analyze'
├── requests/      # Example requests
└── responses/     # Example responses
```

## 🆘 Help

```bash
mrapids --help                    # General help
mrapids <command> --help         # Command help
mrapids help <command>           # Same as above
```

---
**Remember**: Your OpenAPI spec IS your test - no conversion needed!