npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fitvete-food-cli

v1.3.0

Published

CLI for the FitVete Food & Nutrition API — clean JSON output for scripts and AI agents.

Downloads

171

Readme

fitvete-food-cli

Command-line interface for the FitVete Food & Nutrition API. Zero dependencies (Node 18+, built-in fetch). Prints clean JSON to stdout, so it pipes into jq and is trivial for AI agents to parse. Use --pretty for humans.

Install

# install globally from npm
npm install -g fitvete-food-cli
fitvete-food search-foods chicken

# or run without installing
npx fitvete-food-cli search-foods chicken

Authenticate

Get a free key at https://fitvete.com/api/, then:

export FITVETE_API_KEY=fv_live_your_key
# or pass --key on any command

Commands

| Command | Description | | --- | --- | | search-foods <query...> [--number N] | Search foods; calories, macros, confidence. | | compute <ingredient...> | Full nutrient breakdown for an ingredient list. | | recipes [query...] [filters] | Search recipes by name + filters (--diet --cuisine --type --intolerances --include-ingredients --exclude-ingredients --max-ready-time --min-calories --max-calories --min-protein --sort --offset --number). | | recipe-random [--number N] [--tags ...] | Random recipes. | | recipe-autocomplete <query...> [--number N] | Recipe title suggestions. | | recipes-by-nutrients [--min-protein N --max-calories N ...] | Recipes matching nutrient ranges. | | recipe-similar <id> [--number N] | Recipes similar to an id. | | recipe-diets, recipe-meal-types, recipe-cuisines | Supported filter values. | | recipe <id> [--servings N] | Full recipe detail (ingredients, steps, nutrition); optional servings scaler. | | drinks <query...> [--number N] | Search drinks/cocktails. | | score <name...>\|--barcode CODE [--goals ... --diet ... --allergies ... --avoid ... --explain] | Personalized 0–100 health score + grade. | | analyze-ingredients <text...> | Additives, allergens, NOVA level, diet flags. | | parse <text...> | Free-text meal → structured items + nutrition (NLP). | | alternatives <name...>\|--barcode CODE [--number N] | Healthier swaps, ranked. | | foods-autocomplete <query...> [--number N] | Food name typeahead. | | barcode <code> | Look up a packaged food by UPC/EAN barcode. | | photo <image-path> | Estimate meal nutrition from a JPEG, PNG, or WebP image. | | label <image-path> | Parse a Nutrition Facts label from a JPEG, PNG, or WebP image. | | tools | Print a JSON tool manifest for AI agents (function-calling). | | help, version | Help / version. |

Options

  • --key <key> — API key (overrides FITVETE_API_KEY).
  • --number, -n <N> — result count for search commands (1–25).
  • --base <url> — API base URL (overrides FITVETE_API_BASE).
  • --pretty — human-readable table instead of JSON.
  • --json — force JSON (default).

Exit codes

0 ok · 1 request/HTTP error · 2 usage error · 3 auth or rate-limit.

Examples

fitvete-food search-foods "greek yogurt" --number 3
fitvete-food compute "1 cup rice" "2 eggs" | jq '.calories'
fitvete-food recipe 715538 | jq '.title'
fitvete-food drinks margarita --pretty
fitvete-food barcode 012345678905
fitvete-food photo ./meal.jpg
fitvete-food label ./nutrition-label.jpg | jq '.nutrients[] | select(.name=="Sodium")'

Using it from an AI agent

The CLI is designed to be driven by autonomous agents:

  • Output is pure JSON — no prompts, spinners, or colour codes.
  • Failures return a non-zero exit code and a JSON error body.
  • fitvete-food tools prints a function-calling manifest describing every command and its parameters, so a model can discover the available functions at runtime.
fitvete-food tools     # → { "tools": [ { "name": "fitvete_search_foods", "input_schema": {...} }, ... ] }

As an MCP tool

Expose the CLI to any MCP client (Claude Desktop, Cursor, …) by running it from a shell tool, or wrap each command as an MCP tool. Minimal stdio wrapper sketch:

// mcp-server.js (pseudocode) — map each manifest tool to a CLI call
import { execFile } from "node:child_process";
const run = (cmd, args) => new Promise((res, rej) =>
  execFile("fitvete-food", [cmd, ...args], (e, out) => (e ? rej(e) : res(JSON.parse(out)))));
// tool "fitvete_search_foods" -> run("search-foods", [query, "--number", String(n)])

The same key (FITVETE_API_KEY) and JSON contract apply.

License

MIT