Package.json Generator
Generate a package.json scaffold for an app with Vite scripts or a library with tsc and Vitest scripts, set to ESM with type: module.
Package.json Generator
Output
Working…Updated . Provided as is. Check the output before you rely on it in production.
How to use Package.json Generator
- 1
Choose App or Library
App mode marks the package private with dev, build and preview scripts; Library mode adds build, test and lint scripts for publishing.
- 2
Enter name and description
Enter the package name and a one-line description.
- 3
Generate
You get a package.json with ESM type, version 1.0.0 and the scripts for your mode.
- 4
Copy and extend
Copy it into your project, then add dependencies with your package manager.
Questions and answers
Why type: module?
Does it add dependencies?
Use it as an API
Package.json Generator is also callable as a free HTTP JSON API at
https://aidevhub.io/api/package-json-generator/ — GET with query
parameters or POST with a JSON body, no authentication, CORS enabled, fair use
(abusive traffic is throttled at the edge; there is no per-request quota header). Responses return
{ ok, tool, result, meta }.
curl -s "https://aidevhub.io/api/package-json-generator/?name=my-api&description=REST%20API%20service&mode=app"
Machine-readable contract: /api/tool/package-json-generator.json All API endpoints: /agents/ LLM site index: /llms.txt
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Dedicated API endpoint
Deterministic outputs, machine-safe contracts, and production-ready examples.
Dedicated API
https://aidevhub.io/api/package-json-generator/ OpenAPI: https://aidevhub.io/api/openapi.yaml
Unified Runtime API
https://aidevhub.io/api/tools/run/?toolId=package-json-generator&a=my-app
GET and POST are supported at /api/tools/run/ with identical validation and limits.
Limit: 30 req / 60s, input max 256 KB.