Skip to content

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. 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. 2

    Enter name and description

    Enter the package name and a one-line description.

  3. 3

    Generate

    You get a package.json with ESM type, version 1.0.0 and the scripts for your mode.

  4. 4

    Copy and extend

    Copy it into your project, then add dependencies with your package manager.

Questions and answers

Why type: module?
ESM is the default for modern Node.js and bundlers. Remove it only if you must keep CommonJS.
Does it add dependencies?
No. Install them with npm, pnpm or yarn so the lockfile stays correct.

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

GET /api/package-json-generator/ GET package-json-generator
POST /api/package-json-generator/ POST package-json-generator

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.