An interactive CLI tool to set up front-end API tooling for REST, GraphQL, and gRPC (coming soon).
npm install -g pax-api-wizard
# or
npx pax-api-wizard- 🚀 Interactive CLI interface
- 🔄 REST API client generation from OpenAPI specs
- ⚡ GraphQL client generation with type support
- 🔜 gRPC support (coming soon)
- 🔍 Automatic package manager detection (npm, yarn, pnpm)
- 📦 Handles dependency installation automatically
Simply run the CLI and follow the prompts:
npx pax-api-wizard- REST API Client For REST APIs:
- Select REST API type
- Enter your OpenAPI specification URL or file path
- Specify output directory (defaults to "api")
- The tool will:
- Generate a TypeScript Axios client
- Install axios dependency
- Place generated code in your specified directory
- GraphQL Client For GraphQL APIs:
- Select GraphQL API type
- Enter your GraphQL schema URL or file path
- Specify output directory (defaults to "api")
- The tool will:
- Create a GraphQL client with TypeScript types
- Set up codegen configuration
- Install necessary GraphQL dependencies
- Generate the client code
- Node.js (>= 14.x recommended)
- Internet connection for dependency installation
The tool installs the following dependencies as needed:
- REST clients: axios
- GraphQL clients: graphql, @graphql-codegen/cli and related packages
MIT
Batur Akkurt