Recipes
Workflows that chain the CLI with jq, the shell and Python. Every command prints JSON by default, so the pieces fit together.
A target landscape
# One line per drug, most advanced first
gosset drugs --target TL1A --limit 100 \
| jq -r '.[] | "\(.phase)\t\(.name)\t\(.developers // [] | join(", "))"' \
| column -t -s $'\t' | head -53 afimkibart Roche, Roivant Sciences, Pfizer
3 duvakitug Teva Pharmaceutical Industries, Sanofi
3 tulisokibart Merck
2 risankizumab + ABBV-701 AbbVie
2 ABBV-701 AbbVie--limit 100 keeps the default most-advanced-first order. --all would page on a stable id order instead, so sort afterwards if you use it.
Count the drugs by phase:
gosset drugs --target TROP2 --all --fields name,phase \
| jq -c 'group_by(.phase) | map({phase: .[0].phase, n: length}) | sort_by(-.n)'The competitive-landscape skill turns this into a full landscape with charts, trials and deals.
The Phase 3 field in a disease
gosset drugs --disease "ulcerative colitis" --phase 3 --industry-only \
| jq -r '.[] | "\(.name) [\(.targets // [] | join(", "))] · \(.developers // [] | join(", "))"'afimkibart [TL1A] · Roche, Roivant Sciences, Pfizer
obefazimod [CBP80, CBP20] · Abivax
duvakitug [TL1A, DR3] · Teva Pharmaceutical Industries, Sanofi
…Some fields can be missing from a record (empty fields are left out), so use // [] before join in jq.
Readouts to watch
Predicted primary completion for a drug's running Phase 3 trials:
for nct in $(gosset trials --drug "disitamab vedotin" --phase 3 --status Active | jq -r '.[].nct_id // empty'); do
gosset timeline "$nct" \
| jq -r 'select(.trial_status == "running")
| "\(.nct_id) model: \(.expected_completion_date) sponsor: \(.sponsor_estimated_completion)"'
doneNCT05911295 model: 2027-04-22 sponsor: 2027-01-29
NCT04400695 model: 2027-04-01 sponsor: 2027-12-31
NCT04714190 model: 2024-12-01 sponsor: 2024-12-01The select skips trials the model doesn't cover (outside_coverage); see Predictions. The loop makes one call per trial, so it takes a few seconds.
Follow a trial across meetings
# Every presentation of DESTINY-Breast09, oldest first
gosset abstracts --nct NCT04784715 --all --fields date,edition,title \
| jq -r 'sort_by(.date)[] | "\(.edition)\t\(.title[0:70])"'SABCS 2022 Abstract PD18-11: Dose-Expansion Study of Trastuzumab Deruxtecan as Mo
ASCO 2025 Trastuzumab deruxtecan (T-DXd) + pertuzumab (P) vs taxane + trastuzuma
ESMO 2025 LBA18 Trastuzumab deruxtecan (T-DXd) + pertuzumab (P) vs taxane + tras
ESMO Asia 2025 88MO Trastuzumab deruxtecan (T-DXd) + pertuzumab (P) vs taxane + trast
SABCS 2025 Abstract RF6-07: Trastuzumab deruxtecan (T-DXd) + pertuzumab (P) vs ta
ASCO 2026 A DESTINY-Breast09 analysis of treatment duration and clinical outcome
ESMO 2026 LBA49 - A DESTINY-Breast09 (DB-)09 analysis of trastuzumab deruxtecan# What one company presented at one meeting, by drug
gosset abstracts --company AstraZeneca --conference "ESMO 2025" --all --fields drug,title \
| jq -r 'group_by(.drug)[] | "\(length)\t\(.[0].drug // "no drug")"' | sort -rn | head -534 durvalumab
30 immunotherapy
23 trastuzumab deruxtecan
22 osimertinib
12 olaparibdrug is the primary drug as the abstract names it, so a class ("immunotherapy") can appear where no single drug is named.
Deal comps
# HER2 licensing deals since 2024 with a disclosed upfront, largest first
gosset deals --target HER2 --deal-type Licensing --since 2024-01-01 --all \
| jq -r '.[] | select(.upfront_usd != null)
| "\(.date)\t\(.upfront_usd)\t\([.buyers[]?.name] | join(", "))"' \
| sort -t $'\t' -k2 -rn | head -5A company's pipeline by phase
gosset drugs --company AstraZeneca --modality ADC --all --fields name,phase \
| jq -r 'group_by(.phase)[] | "\(.[0].phase): \(length)"'Watch a space (cron-friendly)
# Print a line when a TL1A deal appeared since yesterday
gosset deals --target TL1A --since "$(date -d yesterday +%F)" \
| jq -e 'length > 0' >/dev/null && echo "New TL1A deal activity: gosset deals --target TL1A"(On macOS, date -v-1d +%F replaces date -d yesterday +%F.)
Call it from Python
Clean JSON and meaningful exit codes make the CLI easy to call from a script or an agent:
import json, subprocess
def gosset(*args):
out = subprocess.run(["gosset", *args], capture_output=True, text=True)
if out.returncode != 0: # 1 = API or auth error, 2 = a name didn't resolve
raise RuntimeError(out.stderr.strip())
return json.loads(out.stdout)
drugs = gosset("drugs", "--target", "TROP2", "--phase", "3", "--fields", "name,developers")
print(len(drugs), "Phase 3 TROP2 drugs on the first page")For heavier work, the Python SDK gives you the same queries without a subprocess.
Hand it to an AI agent
Save a focused result and give it to your agent with the question:
gosset drugs --target "KRAS G12C" --phase 2,3 --fields name,phase,developers,diseases > kras_g12c.jsonTo let an agent run the CLI itself, see Teach your agent.
Tips
- Use names, not ids.
--target PD-1,--disease "atopic dermatitis",--company AstraZeneca.--debugshows the query that was sent. --sort=-field(with the=) for descending order, e.g.--sort=-phase.--allfor whole sets,--limitfor a quick look.- Exit codes:
2means a name didn't resolve (an empty result),1an API or sign-in error.