
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
CLI tool for generating type-safe code from OpenAPI and AsyncAPI specifications
CLI tool for generating type-safe code from OpenAPI and AsyncAPI specifications.
Requirements: Node.js >= 20.19.6
npm install -g @qraft/cli
The CLI requires additional plugins to be installed depending on which features you want to use:
For OpenAPI generation:
npm install @openapi-qraft/openapi-typescript-plugin @openapi-qraft/tanstack-query-react-plugin
For AsyncAPI generation:
npm install @qraft/asyncapi-typescript-plugin
For both OpenAPI and AsyncAPI:
npm install @openapi-qraft/openapi-typescript-plugin @openapi-qraft/tanstack-query-react-plugin @qraft/asyncapi-typescript-plugin
Note: All plugins are peer dependencies and must be installed alongside
@qraft/clifor the corresponding commands to work.
qraft openapiGenerate code from OpenAPI specification.
Available plugins:
tanstack-query-react - Generates Qraft API services for Reactopenapi-typescript - Generates TypeScript types from OpenAPI DocumentExamples:
# Generate TypeScript types only
qraft openapi --plugin openapi-typescript ./openapi.yaml -o ./src/types
# Generate both services and types
qraft openapi --plugin tanstack-query-react --plugin openapi-typescript ./openapi.yaml -o ./src/api
# Generate from Redocly config
qraft openapi --redocly
qraft asyncapiGenerate code from AsyncAPI specification.
Required: Plugin must be explicitly specified.
Available plugins:
asyncapi-typescript - Generates TypeScript types from AsyncAPI DocumentExamples:
# Generate TypeScript types from AsyncAPI
qraft asyncapi --plugin asyncapi-typescript ./asyncapi.yaml -o ./src/types
# Generate from Redocly config
qraft asyncapi --redocly
The CLI supports using a Redocly configuration file (redocly.yaml) to generate API clients. This allows you to define multiple API entry points and configure generation options in a single file.
x-openapi-qraft - Configuration for OpenAPI generationx-asyncapi-qraft - Configuration for AsyncAPI generation# Generate from default redocly.yaml (both OpenAPI and AsyncAPI)
qraft redocly
# Generate from specific config file
qraft redocly --redocly ./path/to/redocly.yaml
# Generate specific APIs
qraft redocly my-api@v1
# Generate only OpenAPI from Redocly config
qraft openapi --redocly
# Generate only AsyncAPI from Redocly config
qraft asyncapi --redocly
# redocly.yaml
apis:
main:
root: ./openapi.json
x-openapi-qraft:
plugin:
tanstack-query-react: true
openapi-typescript: true
output-dir: src/api
clean: true
events:
root: ./asyncapi.json
x-asyncapi-qraft:
plugin:
asyncapi-typescript: true
output-dir: src/events
clean: true
All options from the underlying plugins are supported. Use --help to see available options for each command:
qraft openapi --help
qraft asyncapi --help
qraft redocly --help
FAQs
CLI tool for generating type-safe code from OpenAPI and AsyncAPI specifications
We found that @qraft/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.