CLI tool for Fatsecret API - track nutrition, meals, and fitness goals
Project description
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
-
Get your Fatsecret API credentials from platform.fatsecret.com
-
Create a
.envfile or export variables:
export FATSECRET_CONSUMER_KEY=your_consumer_key
export FATSECRET_CONSUMER_SECRET=your_consumer_secret
export FATSECRET_CONFIG_DIR=~/.config/fatsecret # optional
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fatcli-0.1.0.tar.gz.
File metadata
- Download URL: fatcli-0.1.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af0f65df57e0bd38b0123619da9ddde74a4aa104fa349e3a2d2f202674a0f5cb
|
|
| MD5 |
d1337bd3786aa0a02cb742cb1beb9c5c
|
|
| BLAKE2b-256 |
d27b4fbc7d4b5ee60e262634a57ff9e963a5d2154d1d53f1492b41934f107b5b
|
Provenance
The following attestation bundles were made for fatcli-0.1.0.tar.gz:
Publisher:
release.yml on nimitbhardwaj/fatcli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fatcli-0.1.0.tar.gz -
Subject digest:
af0f65df57e0bd38b0123619da9ddde74a4aa104fa349e3a2d2f202674a0f5cb - Sigstore transparency entry: 1232773867
- Sigstore integration time:
-
Permalink:
nimitbhardwaj/fatcli@f656679406a3fd5900e4a9833897bf1206c94e51 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nimitbhardwaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f656679406a3fd5900e4a9833897bf1206c94e51 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fatcli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fatcli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cef499faad24025aa60fc2285dd81daf08fff8f988d70fe936cba2c26e1644c
|
|
| MD5 |
10c67de3714464598d928172b4496226
|
|
| BLAKE2b-256 |
5cb9dfe0a4464e693fa4e9d927cda685e2173ca3029674f51a51e0d9f465a48f
|
Provenance
The following attestation bundles were made for fatcli-0.1.0-py3-none-any.whl:
Publisher:
release.yml on nimitbhardwaj/fatcli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fatcli-0.1.0-py3-none-any.whl -
Subject digest:
5cef499faad24025aa60fc2285dd81daf08fff8f988d70fe936cba2c26e1644c - Sigstore transparency entry: 1232773907
- Sigstore integration time:
-
Permalink:
nimitbhardwaj/fatcli@f656679406a3fd5900e4a9833897bf1206c94e51 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nimitbhardwaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f656679406a3fd5900e4a9833897bf1206c94e51 -
Trigger Event:
push
-
Statement type: