Friendship Tracker
Command line (CLI)
A native command-line client for Friendship Tracker. One install line.
The Friendship Tracker CLI is auto-generated from the same models the HTTP API exposes - every endpoint you can hit with curl is also a subcommand here. The script is one self-contained Python file (no pip install), checks for updates once a day, and authenticates with the same Bearer tokens the rest of the API accepts.
Install
One line, one file. The script lands under your home directory - no pip install, no system-wide changes. Pick your OS in the tabs below.
curl -fsSL https://friendship-tracker.com/xapi2/cli/install.sh | bash
1.2.8·Command: friendshipcli·checksum: e7e3a48b71…Sign in
Every command except login / version / update requires a valid token. Two ways in: a personal access token (PAT) from the Integrations menu (recommended for scripts + CI), or interactive email + password (saved as a session token under ~/.friendshipcli/credentials.json, mode 0600).
friendshipcli login --token pat_…
Commands
Each data model is a subgroup. Click a model name to jump to its detail page; the available ops mirror the HTTP API one-to-one.
| Model | Commands |
|---|---|
| activity | friendshipcli activity listfriendshipcli activity getfriendshipcli activity createfriendshipcli activity updatefriendshipcli activity deletefriendshipcli activity upsert |
| contact | friendshipcli contact listfriendshipcli contact getfriendshipcli contact createfriendshipcli contact updatefriendshipcli contact deletefriendshipcli contact upsert |
| conversation | friendshipcli conversation listfriendshipcli conversation getfriendshipcli conversation createfriendshipcli conversation updatefriendshipcli conversation deletefriendshipcli conversation upsert |
| custom_field | friendshipcli custom_field listfriendshipcli custom_field getfriendshipcli custom_field createfriendshipcli custom_field updatefriendshipcli custom_field deletefriendshipcli custom_field upsert |
| gift | friendshipcli gift listfriendshipcli gift getfriendshipcli gift createfriendshipcli gift updatefriendshipcli gift deletefriendshipcli gift upsert |
| journal_entry | friendshipcli journal_entry listfriendshipcli journal_entry getfriendshipcli journal_entry createfriendshipcli journal_entry updatefriendshipcli journal_entry deletefriendshipcli journal_entry upsert |
| life_event | friendshipcli life_event listfriendshipcli life_event getfriendshipcli life_event createfriendshipcli life_event updatefriendshipcli life_event deletefriendshipcli life_event upsert |
| note | friendshipcli note listfriendshipcli note getfriendshipcli note createfriendshipcli note updatefriendshipcli note deletefriendshipcli note upsert |
| pet | friendshipcli pet listfriendshipcli pet getfriendshipcli pet createfriendshipcli pet updatefriendshipcli pet deletefriendshipcli pet upsert |
| relationship | friendshipcli relationship listfriendshipcli relationship getfriendshipcli relationship createfriendshipcli relationship updatefriendshipcli relationship deletefriendshipcli relationship upsert |
| reminder | friendshipcli reminder listfriendshipcli reminder getfriendshipcli reminder createfriendshipcli reminder updatefriendshipcli reminder deletefriendshipcli reminder upsert |
--filter name=Foo (repeatable), --all (auto-paginate), --fields id,name (project response), --cache N (local cache, N s), --file p.json / --csv p.csv / --stdin (bulk input; arrays + CSV rows), --continue-on-error (don't stop on bulk failure; exit 1 if any failed), --dry-run (preview the request), --idempotency-key K / --auto-idempotency (safe retries), --retry N + --backoff exp (auto-retry 429/5xx), --format json|ndjson|table (output shape), --stderr-json (machine-readable errors), --profile NAME (switch credentials).Use with an AI assistant
Models like Claude, ChatGPT, or Gemini will write scripts that drive this CLI for you - they only need the context below. Copy the block into your chat, then describe what you want to do.
Help me write scripts using `friendshipcli`, the CLI for the Friendship Tracker app.Install:macOS/Linux: curl -fsSL https://friendship-tracker.com/xapi2/cli/install.sh | bashWindows PS: irm https://friendship-tracker.com/xapi2/cli/install.ps1 | iexSign in (required before any data command):friendshipcli login --token pat_… # personal access tokenfriendshipcli login # interactive (token or email + password)Commands per model:friendshipcli activity { list | get | create | update | delete | upsert }fields: --parent-id --kind --summary --description --occurred-at --locationfriendshipcli contact { list | get | create | update | delete | upsert }fields: --name --nickname --pronouns --email --phone --secondary-email --secondary-phone --company --job-title --address-line --city --country --website --linkedin --twitter --birthday --anniversary --gender --how-we-met --food-prefs --allergies --last-contacted-at --stay-in-touch-frequency --stay-in-touch-topic --notes --tags --favorite --avatar-blob-id --colorfriendshipcli conversation { list | get | create | update | delete | upsert }fields: --parent-id --channel --summary --content --occurred-at --sentiment --duration-minutesfriendshipcli custom_field { list | get | create | update | delete | upsert }fields: --parent-id --label --value --kind --iconfriendshipcli gift { list | get | create | update | delete | upsert }fields: --parent-id --title --occasion --status --occurred-at --price --currency --url --notesfriendshipcli journal_entry { list | get | create | update | delete | upsert }fields: --title --body --mood --occurred-at --tagsfriendshipcli life_event { list | get | create | update | delete | upsert }fields: --parent-id --kind --title --occurred-at --description --location --recurringfriendshipcli note { list | get | create | update | delete | upsert }fields: --parent-id --body --pinnedfriendshipcli pet { list | get | create | update | delete | upsert }fields: --parent-id --name --species --species-other --breed --born-at --color --notesfriendshipcli relationship { list | get | create | update | delete | upsert }fields: --parent-id --target-id --kind --label --since --notesfriendshipcli reminder { list | get | create | update | delete | upsert }fields: --parent-id --message --due-date --completedOutput + flags:- stdout is JSON (one object, or {data:[...], meta:{...}} on list).- errors go to stderr; non-zero exit (3=auth, 5=not found, 6=validation, 7=conflict, 8=rate-limited).- --filter name=Foo (friendly key, repeatable) on `list`.- --all auto-paginates; --fields id,name projects; --cache N caches list/get for N s.- writes accept --json '{...}', --file path.json (arrays = bulk), --stdin, or --csv path [--map k=COL,…].- upsert needs --unique <field>; --dry-run previews any write.- --retry N --backoff exp survives 429/5xx; --stderr-json gives machine-readable errors.Field schemas + constraints per model: https://friendship-tracker.com/docs/types/<model>Full CLI reference: https://friendship-tracker.com/docs/cliTask: <describe what you want to do>
Examples
friendshipcli login --token pat_…friendshipcli whoami
Recipes
End-to-end snippets for the workflows people actually run. Pick a tab.
# items.csv has columns: parent_id,Full Name,status# --map renames CSV headers to API field names; missing cells skipped.friendshipcli activity create \--csv items.csv \--map name=Full Name \--continue-on-error \--retry 3 --backoff exp
Environment variables
| Variable | Purpose |
|---|---|
| XCLI_NO_AUTOUPDATE | Skip the once-per-day version check + self-replace. |
| XCLI_NO_TELEMETRY | Skip the anonymous CLI usage analytics. |
| XCLI_BASE_URL | Override the baked-in server URL (testing only). |
| XCLI_TOKEN | Use this PAT for the current invocation without saving it. |
Telemetry + auto-update
The CLI sends one anonymous analytics event per command (command name, version, OS - no request bodies, no field values) so the team running this app can see how it's used in the same dashboard as the web UI. The data is processed securely; an audit log of every event tied to you can be requested at any time from the company operating the app. We strongly encourage leaving telemetry on - it's how reliability issues surface and how the team prioritises improvements that affect you. It can be turned off with XCLI_NO_TELEMETRY=1. Separately, the CLI checks for a newer version at most once every 24 hours and updates itself in place; XCLI_NO_AUTOUPDATE=1 disables that.