physıque

Docs

Pi and other agents

Anything that can run a shell command can use the Physique CLI. It is one Python 3 file with no dependencies. Pi Coding Agent, OpenHands, a cron job, a Raspberry Pi in the kitchen: same three commands.

Install

mkdir -p ~/.config/physique
curl -fsSL https://physique.syncgr.com/agent/physique.py -o ~/.config/physique/physique.py && chmod +x ~/.config/physique/physique.py
curl -fsSL https://physique.syncgr.com/agent/profile.example.json -o ~/.config/physique/profile.json
# set credential_command in profile.json, or export PHYSIQUE_TOKEN for the session
~/.config/physique/physique.py discover

Tell the agent about it

Drop this in the project's AGENTS.md (Pi, Codex) or CLAUDE.md so the agent knows the tool exists and how to behave with it:

## Physique
My food / workout / weigh-in log is reachable with `~/.config/physique/physique.py`.
- Run `discover` first in a new environment; read the granted scopes and date rules.
- Query the smallest Detroit-local date range that answers the question:
  `days --from YYYY-MM-DD --to YYYY-MM-DD`, `foods`, `photos --from … --to …`.
- Absent nutrients are unknown, not zero. `base` macros do not scale with quantity.
- Never print the credential. Writes need a separate write credential and explicit intent.

Commands

CommandDoes
discoverScopes you hold, timezone, units, routes, limits.
days --from A --to B [--limit N] [--cursor C]Days in range: weight, workout, foodItems, foodNotes, prepNotes, steps, revision.
foodsSaved foods and recipes with macros, base, aliases, provenance.
export --from A --to BVersioned JSON pages of days plus foods.
photos --from A --to BPhoto metadata (needs photos:metadata).
photo-content ID [--thumbnail]Five-minute signed URL (needs photos:content).
put-day DATE --expected-revision R --request-id ID --json '{…}'Write a day (needs fitness:write).

Pi specifically

Pi runs tools through the shell, so the block above is all it needs. If you launch Pi with a pinned model and a handoff file, mention the CLI path in the handoff. If your Pi build supports stdio MCP servers, the MCP server works there too with the same profile.