Package Management
Section titled “Package Management”Read, update, install, compare, and pin package.json dependencies for an exec project. Use these endpoints to bootstrap a project, inspect its current dependency state, install new packages, pin versions for reproducible builds, and compare declared versus installed dependencies.
GET /api/v1/exec/package/read
Section titled “GET /api/v1/exec/package/read”Reads the current package.json for the exec project, returning parsed content, the resolved dependencies, and counts of dependencies and devDependencies.
This endpoint takes no parameters.
curl -X GET https://api.hoody.com/api/v1/exec/package/read \ -H "Authorization: Bearer YOUR_API_KEY"const result = await client.exec.package.readJson();{ "path": "/workspace/project/package.json", "content": { "name": "hoody-exec-project", "version": "1.0.0", "description": "Hoody Exec project", "main": "src/index.ts" }, "dependencies": { "hono": "^4.6.0", "zod": "^3.23.8" }, "devDependencies": { "typescript": "^5.6.0", "@types/node": "^22.7.0" }, "scripts": { "start": "bun src/index.ts", "compile:modern": "bun build --compile --external=* --outfile bin/hoody-exec src/index.ts", "build:openapi": "bun run" }, "dependencyCount": 2, "devDependencyCount": 2}{ "error": "Invalid parameter format", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Resource not found", "code": "NOT_FOUND", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
NOT_FOUND | Resource not found | The requested resource does not exist | Verify the resource identifier |
{ "error": "Internal server error", "code": "ERROR_500", "timestamp": "2026-01-15T12:00:00.000Z"}POST /api/v1/exec/package/compare
Section titled “POST /api/v1/exec/package/compare”Compares the declared dependencies in package.json against what is actually installed on disk, returning missing, outdated, and extra packages along with aggregate counts.
This endpoint takes no parameters.
The request body schema is empty; send {} if no input is needed.
curl -X POST https://api.hoody.com/api/v1/exec/package/compare \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'const result = await client.exec.package.compare({});{ "summary": { "total": 8, "installed": 7, "missing": 1, "outdated": 2, "extra": 0 }, "missing": ["pino"], "outdated": [ { "package": "hono", "declared": "^4.6.0", "installed": "4.5.0" }, { "package": "zod", "declared": "^3.23.8", "installed": "3.22.4" } ], "extra": [], "allInstalled": false, "upToDate": false}{ "error": "Invalid parameter format", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Resource not found", "code": "NOT_FOUND", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
NOT_FOUND | Resource not found | The requested resource does not exist | Verify the resource identifier |
{ "error": "Internal server error", "code": "ERROR_500", "timestamp": "2026-01-15T12:00:00.000Z"}POST /api/v1/exec/package/init
Section titled “POST /api/v1/exec/package/init”Initializes a new package.json for the exec project with sane defaults for name, version, description, and scripts.
This endpoint takes no parameters.
Request Body
Section titled “Request Body”All fields are optional. Omit the body to use defaults.
{ "name": "hoody-exec-project", "version": "1.0.0", "description": "Hoody Exec project", "force": false}| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No | "hoody-exec-project" | Project name written to package.json |
version | string | No | "1.0.0" | Initial semantic version |
description | string | No | "Hoody Exec project" | Short project description |
force | boolean | No | false | Overwrite an existing package.json if present |
curl -X POST https://api.hoody.com/api/v1/exec/package/init \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"my-exec-app","force":false}'const result = await client.exec.package.initJson({ name: "my-exec-app", force: false});{ "message": "package.json created successfully", "path": "/workspace/project/package.json", "content": { "name": "hoody-exec-project", "version": "1.0.0", "description": "Hoody Exec project", "main": "src/index.ts", "scripts": { "start": "bun src/index.ts", "compile:modern": "bun build --compile --external=* --outfile bin/hoody-exec src/index.ts", "build:openapi": "bun run" }, "dependencies": {} }, "created": true}{ "error": "Invalid parameter format", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Resource already exists", "code": "CONFLICT", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
CONFLICT | Resource conflict | Operation conflicts with existing resource state | Check resource state and retry |
{ "error": "Internal server error", "code": "ERROR_500", "timestamp": "2026-01-15T12:00:00.000Z"}POST /api/v1/exec/package/install
Section titled “POST /api/v1/exec/package/install”Installs one or more packages, optionally saving them to devDependencies and forcing a reinstall. The response is returned as 202 Accepted because installation runs asynchronously.
This endpoint takes no parameters.
Request Body
Section titled “Request Body”All fields are optional. Omit the body to perform a plain install of whatever is declared in package.json.
{ "packages": ["hono", "zod"], "dev": false, "save": true, "force": false}| Name | Type | Required | Default | Description |
|---|---|---|---|---|
packages | array | No | — | Package names (and optional @version) to install |
dev | boolean | No | false | Add the packages to devDependencies instead of dependencies |
save | boolean | No | true | Persist the installed versions into package.json |
force | boolean | No | false | Reinstall even if already present |
curl -X POST https://api.hoody.com/api/v1/exec/package/install \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"packages":["hono","zod"],"dev":false,"save":true}'const result = await client.exec.package.install({ packages: ["hono", "zod"], dev: false, save: true});{ "status": "installing", "command": "bun add hono zod", "message": "Installation started for 2 package(s)."}{ "error": "Invalid parameter format", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Internal server error", "code": "ERROR_500", "timestamp": "2026-01-15T12:00:00.000Z"}POST /api/v1/exec/package/pin
Section titled “POST /api/v1/exec/package/pin”Pins the listed dependencies (or all dependencies if omitted) to exact installed versions in package.json, producing a fully reproducible lockfile-like state.
This endpoint takes no parameters.
Request Body
Section titled “Request Body”All fields are optional.
{ "packages": ["hono", "zod"]}| Name | Type | Required | Description |
|---|---|---|---|
packages | array | No | Package names to pin. If omitted, all dependencies are pinned |
curl -X POST https://api.hoody.com/api/v1/exec/package/pin \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"packages":["hono","zod"]}'const result = await client.exec.package.pinVersions({ packages: ["hono", "zod"]});{ "message": "Dependencies pinned to exact versions", "pinned": ["hono", "zod"], "count": 2, "dependencies": { "hono": "4.6.0", "zod": "3.23.8" }}{ "error": "Invalid parameter format", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Resource not found", "code": "NOT_FOUND", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
NOT_FOUND | Resource not found | The requested resource does not exist | Verify the resource identifier |
{ "error": "Internal server error", "code": "ERROR_500", "timestamp": "2026-01-15T12:00:00.000Z"}POST /api/v1/exec/package/update
Section titled “POST /api/v1/exec/package/update”Updates package.json with new dependencies, scripts, metadata, or by removing existing dependencies. Returns a summary of the changes applied.
This endpoint takes no parameters.
Request Body
Section titled “Request Body”All fields are optional. Supply only the operations you want to perform.
{ "dependencies": "hono@^4.6.0,zod@^3.23.8", "scripts": "{\"start\":\"bun src/index.ts\"}", "metadata": { "author": "Hoody Team", "license": "MIT" }, "remove": "lodash"}| Name | Type | Required | Description |
|---|---|---|---|
dependencies | string | No | Comma-separated name@version pairs to add or update |
scripts | string | No | JSON-encoded map of script name to command |
metadata | object | No | Free-form metadata fields merged into the top level of package.json |
remove | string | No | Comma-separated package names to remove from dependencies and devDependencies |
curl -X POST https://api.hoody.com/api/v1/exec/package/update \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "dependencies": "hono@^4.6.0", "scripts": "{\"start\":\"bun src/index.ts\"}", "remove": "lodash" }'const result = await client.exec.package.updateJson({ dependencies: "hono@^4.6.0", scripts: '{"start":"bun src/index.ts"}', remove: "lodash"});{ "message": "package.json updated successfully", "changes": [ "Added dependency hono@^4.6.0", "Removed dependency lodash", "Updated script start" ], "changeCount": 3, "dependencies": { "hono": "^4.6.0", "zod": "^3.23.8" }}{ "error": "Invalid parameter format", "code": "VALIDATION_ERROR", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
VALIDATION_ERROR | Invalid input | Request parameters failed validation | Check parameter format and requirements |
{ "error": "Resource not found", "code": "NOT_FOUND", "timestamp": "2026-01-15T12:00:00.000Z"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
NOT_FOUND | Resource not found | The requested resource does not exist | Verify the resource identifier |
{ "error": "Internal server error", "code": "ERROR_500", "timestamp": "2026-01-15T12:00:00.000Z"}