Integration
Use Humanform from your terminal
The @humanform/cli CLI runs predictions, percentile ranges, country comparisons, and measurement search from your shell. Same API, same credits, built for scripting and CI pipelines.
Install
Install globally, or run with npx without installing:
npm install -g @humanform/clinpx @humanform/cli --helpAuthenticate
Run humanform login once with an API key from the dashboard. The key is stored locally in ~/.humanform/config.json (file mode 600). For CI and automation, set HUMANFORM_API_KEY instead; it takes precedence over the stored config.
humanform loginhumanform logoutCommands
Five subcommands mirror the REST API. Browse the full measurement and country datasets, or read the predict API docs.
| Command | API | Description |
|---|---|---|
| predict | POST /v1/predict | Forward lookup: predict one measurement from age, sex, percentile, country, and unit. |
| range | POST /v1/predict/range | Return multiple percentiles for one measurement in a single request. |
| compare | POST /v1/predict/compare | Compare one percentile for a measurement across multiple countries. |
| measurements search | GET /v1/measurements/search | Fuzzy search measurement names. No API key required. |
| percentile-lookup | POST /v1/percentile-lookup | Reverse lookup: given a measured value, return the population percentile. |
Examples
humanform predict \
--measurement Stature \
--gender Female \
--age 34 \
--percentile 50 \
--country US \
--unit cmhumanform range \
--measurement PoplitealHeight \
--gender Female \
--age 34 \
--country US \
--percentiles 5,50,95 \
--unit cmhumanform compare \
--measurement PoplitealHeight \
--gender Female \
--age 34 \
--percentile 50 \
--countries US,UK,JP \
--unit cmhumanform measurements search griphumanform percentile-lookup \
--measurement PoplitealHeight \
--gender Female \
--age 34 \
--country US \
--unit cm \
--value 43.1Scripting with --json
Add --json to any command for machine-readable output. Pipe into jq or other tools. API errors print to stderr with non-zero exit codes for CI pipelines.
humanform predict \
--measurement Stature \
--gender Male \
--age 30 \
--percentile 50 \
--country US \
--unit cm \
--jsonHUMANFORM_API_KEY="hf_live_..." humanform predict \
--measurement Stature \
--gender Male \
--age 30 \
--percentile 50 \
--country US \
--unit cm \
--jsonUse cases
- CI/CD pipelines: gate ergonomic checks in build scripts with
HUMANFORM_API_KEYand--json. - Shell scripting: chain predictions into existing bash or zsh workflows without writing HTTP clients.
- Quick terminal lookups: search measurement names or run a one-off predict without opening the dashboard or an IDE.
Package
- npm: @humanform/cli
Explore
Browse datasets: full measurement list, supported countries, design examples, plugins roadmap, REST API docs, or MCP server install, or CLI install, or Google Sheets install, or Excel install.