🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@humanform/cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@humanform/cli

Command-line interface for the Humanform anthropometric prediction API

latest
npmnpm
Version
0.1.1
Version published
Weekly downloads
2
-50%
Maintainers
1
Weekly downloads
 
Created
Source

Humanform CLI

Command-line interface for the Humanform anthropometric prediction API. Run predictions, percentile ranges, country comparisons, and measurement search from your terminal or CI pipelines.

Setup

  • Install globally, or use npx without installing:
npm install -g @humanform/cli
npx @humanform/cli --help
humanform login

This stores your key in ~/.humanform/config.json (file mode 600). To remove it:

humanform logout

For CI and scripting, set HUMANFORM_API_KEY instead of using login. The environment variable takes precedence over the stored config.

Optional: override the API base URL (defaults to https://api.humanform.app):

export HUMANFORM_API_URL="https://api.humanform.app"

Commands

CommandAPIDescription
predictPOST /v1/predictForward lookup: percentile → measurement value
rangePOST /v1/predict/rangeMultiple percentiles for one measurement
comparePOST /v1/predict/compareOne percentile across multiple countries
measurements searchGET /v1/measurements/searchFuzzy search measurement names (no API key required)
percentile-lookupPOST /v1/percentile-lookupReverse lookup: measured value → percentile

predict

humanform predict \
  --measurement Stature \
  --gender Female \
  --age 34 \
  --percentile 50 \
  --country US \
  --unit cm

range

humanform range \
  --measurement PoplitealHeight \
  --gender Female \
  --age 34 \
  --country US \
  --percentiles 5,50,95 \
  --unit cm

compare

humanform compare \
  --measurement PoplitealHeight \
  --gender Female \
  --age 34 \
  --percentile 50 \
  --countries US,UK,JP \
  --unit cm
humanform measurements search grip

percentile-lookup

humanform percentile-lookup \
  --measurement PoplitealHeight \
  --gender Female \
  --age 34 \
  --country US \
  --unit cm \
  --value 43.1

Scripting with --json

Add --json to any command for machine-readable output suitable for piping into jq or other tools:

humanform predict \
  --measurement Stature \
  --gender Male \
  --age 30 \
  --percentile 50 \
  --country US \
  --unit cm \
  --json

In CI, pass the API key via environment variable:

HUMANFORM_API_KEY="hf_live_..." humanform predict --measurement Stature ...

API errors (401, 402, 404, 422, 429, etc.) are printed to stderr with non-zero exit codes for scripting.

Local development

For contributors working in the humanform-api monorepo:

pnpm --filter @humanform/api-client build
pnpm --filter @humanform/cli build
pnpm --filter @humanform/cli test:smoke

Run against a local build:

pnpm --filter @humanform/cli build
node apps/cli/dist/index.js predict --measurement Stature --gender Male --age 30 --percentile 50 --country US --unit cm

Or during development:

pnpm dev:cli

FAQs

Package last updated on 08 Jul 2026

Did you know?

Socket

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.

Install

Related posts