Skip to content

Food-Context-Protocol/typescript-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FCP TypeScript SDK

Official TypeScript/JavaScript SDK for the Food Context Protocol.

License npm

Installation

# npm
npm install @fcp/sdk

# yarn
yarn add @fcp/sdk

# pnpm
pnpm add @fcp/sdk

Quick Start

import { FCPClient } from "@fcp/sdk";

// Initialize client
const client = new FCPClient({
  baseUrl: "https://fcp.dev",
  apiKey: "your-api-key"
});

// Analyze a meal photo
const result = await client.analyze.analyzeMeal({
  imageUrl: "https://example.com/food.jpg"
});
console.log(result.nutrition);

// Search recipes
const recipes = await client.recipes.searchRecipes({
  query: "high protein breakfast",
  maxResults: 5
});

// Check food recalls
const recalls = await client.safety.checkFoodRecalls({
  foodItem: "romaine lettuce"
});

Features

  • Type-safe - Full TypeScript types and intellisense
  • Tree-shakeable - Optimized bundle size
  • 40+ endpoints - Nutrition, recipes, safety, inventory, planning
  • Auto-generated - Always in sync with the API via Fern

Documentation

Requirements

  • Node.js 18+
  • TypeScript 5.0+ (optional)

License

Apache-2.0 - See LICENSE


Generated by Fern from the Food Context Protocol OpenAPI specification.

About

Auto-generated TypeScript SDK for the Food Context Protocol

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •