Sourdough Tracker

Command line (CLI)

A native command-line client for Sourdough Tracker. One install line.

The Sourdough 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://sourdoughtracker.com/xapi2/cli/install.sh | bash
Download script manuallyVersion: 1.2.8·Command: sourdoughcli·checksum: c438839713

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 ~/.sourdoughcli/credentials.json, mode 0600).

sourdoughcli 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.

ModelCommands
log_entry
sourdoughcli log_entry listsourdoughcli log_entry getsourdoughcli log_entry createsourdoughcli log_entry updatesourdoughcli log_entry deletesourdoughcli log_entry upsert
sourdough
sourdoughcli sourdough listsourdoughcli sourdough getsourdoughcli sourdough createsourdoughcli sourdough updatesourdoughcli sourdough deletesourdoughcli sourdough upsert
Useful flags: --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 `sourdoughcli`, the CLI for the Sourdough Tracker app.
Install:
macOS/Linux: curl -fsSL https://sourdoughtracker.com/xapi2/cli/install.sh | bash
Windows PS: irm https://sourdoughtracker.com/xapi2/cli/install.ps1 | iex
Sign in (required before any data command):
sourdoughcli login --token pat_… # personal access token
sourdoughcli login # interactive (token or email + password)
Commands per model:
sourdoughcli log_entry { list | get | create | update | delete | upsert }
fields: --parent-id --kind --title --body --occurred-at --rise-pct --aroma-score --bubble-activity --hydration-pct --flour-used --water-temp-c --ambient-temp-c --feeding-ratio --bake-recipe --bake-outcome --loaf-count --tags
sourdoughcli sourdough { list | get | create | update | delete | upsert }
fields: --name --slug --source --started-at --flour-type --hydration-pct --feeding-ratio --feeding-freq-hours --ambient-temp-c --last-fed-at --retired --favorite --tags --color --notes
Output + 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://sourdoughtracker.com/docs/types/<model>
Full CLI reference: https://sourdoughtracker.com/docs/cli
Task: <describe what you want to do>

Examples

sourdoughcli login --token pat_…
sourdoughcli 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.
sourdoughcli log_entry create \
--csv items.csv \
--map name=Full Name \
--continue-on-error \
--retry 3 --backoff exp

Environment variables

VariablePurpose
XCLI_NO_AUTOUPDATESkip the once-per-day version check + self-replace.
XCLI_NO_TELEMETRYSkip the anonymous CLI usage analytics.
XCLI_BASE_URLOverride the baked-in server URL (testing only).
XCLI_TOKENUse 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.