DataBody databody v2.0
Search docs K
Docs Download · iOS
CLI

Connect any LLM to DataBody.

The DataBody CLI gives any AI assistant full access to your nutrition data. Claude, ChatGPT, Gemini, Llama — any model with tool use. Structured JSON output. OAuth 2.0 with PKCE. 60+ commands.
npm · databody-cli
node >= 20
~/ — databody-cli · install zsh
# install globally
npm install -g databody-cli
→ installed · node >= 20
# or run without installing
npx databody-cli auth login
→ opens browser · oauth2 + pkce
→ token saved to ~/.databody_token.json
✓ authed as [email protected]
first run zsh
databody summary
→ today's dashboard · json
databody today
→ today's food log · json
databody chat "plan dinner"
→ ai coach · streaming
60+ commands JSON output OAuth 2.0 + PKCE Any LLM Node 20+
01BRING YOUR OWN AI

Every command is a tool call waiting to happen.

The DataBody CLI outputs everything as structured JSON, making it a perfect tool layer for any LLM. Feed the output to your AI of choice and let it manage your nutrition autonomously. Works with shell scripts, automation pipelines, or directly as LLM tool definitions.
stdout · stdin
exit-code aware
01

Any LLM

Claude, ChatGPT, Gemini, Llama, or any model with tool use. Pipe the CLI into your favorite runner.

▸ databody summary --pretty | llm ↳ any model · any provider
02

JSON output

Every command returns structured JSON for trivial parsing. Add --pretty for human reading.

▸ databody today --json | jq ↳ {"kcal": 1412, "remaining": 788}
03

Secure auth

OAuth 2.0 with PKCE — opens your browser for secure login. Token stored locally in your home directory.

▸ databody auth login ↳ ~/.databody_token.json
02QUICK START

Three commands. You're wired in.

Install. Authenticate. Use it. The CLI ships with zsh, bash, and fish completions and speaks the same 60+ tools as the agent.
< 60s to first query
step 1 — install npm
# requires Node.js 20+
npm install -g databody-cli
→ databody-cli@latest installed
# or use npx
npx databody-cli --help
step 2 — authenticate oauth
databody auth login
→ opening browser · oauth2 + pkce
→ ✓ authed
→ token saved · ~/.databody_token.json
step 3 — use it zsh
# Check today's nutrition
databody today
# Get your health summary
databody summary
# Log a meal
databody log breakfast '[{"name":"eggs","calories":140,"protein_grams":12,"carbs_grams":1,"fat_grams":10,"fiber_grams":0,"sugar_grams":1}]'
# Chat with AI coach
databody chat "What should I eat for dinner?"
# Get meal suggestions based on remaining macros
databody ai suggestions
# Search food databases
databody food search "chicken breast"
03COMMANDS

60+ commands. Every surface, from the terminal.

All output JSON by default — add --pretty for formatted output. Organized by category so your LLM (or your fingers) can find the right tool fast.
60+ commands
--json · --pretty
01

Health & Summary

Dashboard snapshot and longitudinal trends across your tracked signals.

databody summary databody health history
02

Nutrition

Log food, browse history, and mutate individual items or entire meals.

databody today databody log <meal> <items> databody nutrition history databody nutrition update/delete databody nutrition add-item/ update-item/delete-item
03

Food Search

Query food databases, scan barcodes, and pull favorites & recents.

databody food search <query> databody food details <id> databody food barcode <upc> databody food favorites databody food recents
04

Saved Meals

Create, list, log, update, and delete reusable meal templates.

databody saved-meals databody saved-meals create <name> databody saved-meals log <name> databody saved-meals update <name> databody saved-meals delete <name>
05

AI Features

Chat with the coach, get suggestions, analyze photos, parse text, expand meals.

databody chat <message> databody ai suggestions databody ai analyze-photo <url> databody ai parse <text> databody ai expand <meal> databody ai greeting
06

Goals

Read, create, and calculate macro & micro targets. Water auto-scales from body weight.

databody goals current databody goals list databody goals create databody goals calculate # fiber · sugar · water · caffeine · alcohol
07

Check-ins

1–10 ratings for mood, energy, sleep, hydration, gut, skin, and hangover. Multiple per day.

databody checkins list databody checkins record databody checkins update databody checkins delete
08

Workouts

Read recent sessions, list history, and create, update, or delete logs.

databody workouts recent databody workouts list databody workouts create databody workouts update/delete
09

Chat Threads

Manage coach conversation threads and auto-generate titles.

databody threads list databody threads get <id> databody threads create databody threads generate-title
10

Households

Share a plan across multiple bodies. Coordinate members, invites, and summaries.

databody households list/summary databody households create databody households members databody invites create/accept
11

User & Auth

Sign in, inspect status, export a token for scripts, and manage your profile.

databody auth login/logout/status databody auth export-token databody user profile databody user update
12

Global flags

Consistent flags across every command for machine- or human-friendly output.

--json # default --pretty # formatted --help # on any command
04LLM INTEGRATION

Every command is a tool definition.

Every command outputs JSON, making it trivial to wire up as tool definitions for any LLM. Drop it into Claude Code, pipe it into llm, or schedule it in cron.
stdout-first
exit-code aware
claude code recommended
// Add a .claude/commands file and Claude Code
// can call DataBody CLI directly as a tool.
claude "Log my breakfast: 2 eggs and avocado toast"
→ databody log breakfast [...]
→ ✓ 542 kcal · 24P / 38C / 32F
claude "How are my macros looking today?"
→ databody today --pretty
→ 788 kcal remaining · 82g protein left
claude "Suggest a high-protein dinner"
→ databody ai suggestions
→ sheet-pan chicken · 580 kcal · 52P
shell & automation zsh
# Pipe your nutrition data to any LLM
databody summary --pretty | llm "Analyze my nutrition today"
# Automate daily check-ins
databody ai greeting --pretty
json pipeline jq
databody today | jq '.remaining'
{
"kcal": 788,
"protein": 82,
"on_pace": true
}
05MCP · CLAUDE DESKTOP

Prefer Claude Desktop? There's an MCP server too.

If you use Claude Desktop, connect via the Model Context Protocol. The MCP server provides the same 60+ tools as the CLI, natively integrated into Claude's conversation interface.
@databody/mcp
claude desktop
claude_desktop_config.json mcp
// one line, 60+ tools in Claude Desktop
{
"mcpServers": {
"databody": {
"command": "npx",
"args": ["-y", "@databody/mcp"],
"env": { DB_TOKEN: "..." }
}
}
}
api.databody.ai curl
curl -sH "Authorization: Bearer $DB_TOKEN" \
https://api.databody.ai/v2/today
→ 200 · 18ms
{ "kcal": 1412, "energy": 7.2 }
MCP Setup Guide All 60+ tools REST API
60+ commands OAuth 2.0 + PKCE JSON / --pretty Zsh / Bash / Fish Any LLM Node 20+ MCP-compatible
SHIPPING · v2.0 · APRIL 2026

Ready to connect your AI?

Install the CLI, authenticate, and start managing your nutrition from any LLM.

~/ — get started zsh
npm install -g databody-cli && databody auth login