CLI¶
Fulcra provides an easy to use command line interface to the platform, suitable for use by both humans and agents.
Installation¶
The Fulcra CLI command is included with the fulcra-api package in PyPi.
Via pip
Via uv
Usage¶
Interactive documentation is available via fulcra --help:
❯ fulcra --help
Usage: fulcra [OPTIONS] COMMAND [ARGS]...
Command line interface for authenticating and interacting with the Fulcra
Life API.
Sub-commands return JSON data by default for convienent piping into tools
like `jq` for parsing and filtering.
Options:
--beta Enable beta features
--help Show this message and exit.
Commands:
apple-location-updates Return Apple location update records
apple-location-visits Return Apple location visit records
apple-workouts Return Apple workouts
auth Authentication sub-commands
calendar-events Return Apple calendar events
calendars Return Apple calendars
catalog Return a list of queryable Fulcra data types and
metadata
data-type Data type management sub-commands
data-updates Return data/file updates that occurred during a
period
delete Delete records for a data type
file File management sub-commands
get-records Return raw sample records for a data type
google-location-updates Return Google Maps location update records
location-at-time Return location at specified time
location-time-series Return a calculated time series of location data
metric-time-series Return a calculated time series for a metric
record Record data for a data type
share Data sharing management sub-commands
sleep-cycles Return sleep cycles summarized from sleep stages
sleep-cycles-aggregated Return sleep cycles aggregated by a specific period
sleep-stages Return sleep stages derived from sleep-related
metric records
tag Tag management sub-commands
user-info Return information about the authenticated user
Authentication¶
Most CLI commands require authentication to the Fulcra Platform. Running fulcra auth login will return a URL (as well as opening a browser window to that URL if supported) for users to authenticate or sign up with Fulcra. This command will automatically complete once authentication is finished and save the access credentials for the session to disk.
Agents can also authenticate users in a two step process. Run fulcra auth login --get-auth-url to return a URL and code to prompt the user to authenticate, then run fulcra auth login --device-code <device code> afterwards to poll for an access token.
Example:
> fulcra auth login --get-auth-url Open the web auth URL in a browser, verify the web auth code, and complete the web auth flow. Web auth URL: https://fulcra.us.auth0.com/activate?user_code=MTJJ-NFDF - Web auth code: MTJJ-NFDF - Device code: 7dxrpM_971s4p-WGy2Cs3TUW After finishing the web auth flow, complete authentication with the device code by running: fulcra-api auth login --device-code 7dxrpM_971s4p-WGy2Cs3TUW