Skip to content
Hoody.com

Inspect, verify, and install the npm modules that an exec script depends on. Use these endpoints before running untrusted or user-supplied scripts to confirm which packages are already available, which are missing, and to install any that are required. All endpoints are scoped to a single container’s exec service.

Return the catalog of modules that ship pre-installed with the exec environment. Use this to determine whether a dependency is available out of the box without performing any installation.

Terminal window
curl -X GET "https://proj1-cnt1-exec-1.eu-west-1.containers.hoody.icu/api/v1/exec/dependencies/bundled" \
-H "Authorization: Bearer <token>"

Inspect a piece of source code (or an explicit module list) and report which referenced modules are already installed and which are missing. No modules are installed; the response is informational only.

NameTypeRequiredDescription
codestringNoSource code to scan for require / import references
modulesstringNoA single module spec (e.g. lodash) to check explicitly

Both fields are optional. Send one or both depending on whether you are scanning code or auditing a known list.

Terminal window
curl -X POST "https://proj1-cnt1-exec-1.eu-west-1.containers.hoody.icu/api/v1/exec/dependencies/check" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"code": "const axios = require(\"axios\"); const _ = require(\"lodash\");",
"modules": "dayjs@1.11.10"
}'

Install one or more npm modules into the exec environment. Returns counts of installed and failed modules along with per-module detail entries.

NameTypeRequiredDefaultDescription
modulesstring | arrayYesOne npm module spec (e.g. lodash, axios@1.2.3) or an array of specs. Array form installs every module in sequence
forcebooleanNofalseWhen true, reinstall modules that are already present instead of reporting them as already-installed
Terminal window
curl -X POST "https://proj1-cnt1-exec-1.eu-west-1.containers.hoody.icu/api/v1/exec/dependencies/install" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"modules": ["lodash@4.17.21", "dayjs@1.11.10", "axios@1.6.2"],
"force": false
}'