Skip to main content

fatcli

A CLI tool for Fatsecret API - track your nutrition, meals, and fitness goals from the command line.

Features

  • Authentication - OAuth flow with Fatsecret API
  • Profile - View your profile, weight, BMI, and goals
  • Meals - View, search, add, and delete food entries
  • Agent-friendly - Designed for LLM agent integration

Installation

pip install fatcli

Or from source:

git clone https://github.com/nimitbhardwaj/fatcli.git
cd fatcli
uv pip install -e .

Setup

  1. Get your Fatsecret API credentials from platform.fatsecret.com

  2. Create a .env file or export variables:

export FATSECRET_CONSUMER_KEY=your_consumer_key
export FATSECRET_CONSUMER_SECRET=your_consumer_secret
export FATSECRET_CONFIG_DIR=~/.config/fatsecret  # optional
  1. Authenticate:
fatcli init --url-only
# Visit the URL, get PIN, then:
fatcli init --pin 123456

Or interactive mode:

fatcli init

Usage

View Profile

fatcli profile

Output:

Profile
  Height:        173 cm
  Current Weight: 84.0 kg (as of 2026-04-03)
  Goal Weight:    74.0 kg
  Difference:     +10.0 kg
  BMI:            28.1
  Status:         Overweight

Log Weight

fatcli profile --weight 83.5 --goal 74

View Meals

# Today's meals
fatcli meals get --date 2026-04-04

# With macro summary
fatcli meals get --date 2026-04-04 --summary

Search Foods

fatcli meals search chicken

Get Food Details

fatcli meals info 1641

Add Food Entry

fatcli meals add 1641 --serving 50321 --units 1 --meal lunch

Delete Food Entry

# First get the entry ID from meals get
fatcli meals delete 23112601131

Help

fatcli                    # Show main help
fatcli -h                 # Same as --help
fatcli meals              # Show meals subcommands
fatcli meals get --help   # Help for specific command

Environment Variables

Variable Required Default Description
FATSECRET_CONSUMER_KEY Yes - API consumer key
FATSECRET_CONSUMER_SECRET Yes - API consumer secret
FATSECRET_CONFIG_DIR No ~/.config/fatsecret Config directory

Agent Integration

This CLI is designed for LLM agent use:

# Get authorization URL
fatcli init --url-only

# Complete with PIN (from human)
fatcli init --pin 123456

# View meals for analysis
fatcli meals get --date 2026-04-04 --summary

# Check profile
fatcli profile

License

MIT

Metadata

Release files for fatcli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fatcli 0.1.0
File Size Uploaded
fatcli-0.1.0.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fatcli 0.1.0
File Interpreter ABI Platform
fatcli-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.9 kB

Release files / fatcli-0.1.0.tar.gz

Download URL fatcli-0.1.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
af0f65df57e0bd38b0123619da9ddde74a4aa104fa349e3a2d2f202674a0f5cb
BLAKE2b-256 checksum
How to use checksums
d27b4fbc7d4b5ee60e262634a57ff9e963a5d2154d1d53f1492b41934f107b5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Release files / fatcli-0.1.0-py3-none-any.whl

Download URL fatcli-0.1.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cef499faad24025aa60fc2285dd81daf08fff8f988d70fe936cba2c26e1644c
BLAKE2b-256 checksum
How to use checksums
5cb9dfe0a4464e693fa4e9d927cda685e2173ca3029674f51a51e0d9f465a48f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page