Search ClinicalTrials.gov clinical studies from the command line.
clinicaltrials is a single pure-Go binary. It speaks to clinicaltrials.gov
over plain HTTPS via the public REST API v2, shapes the responses into clean
records, and pipes into the rest of your tools. No API key required.
go install github.com/tamnd/clinicaltrials-cli/cmd/clinicaltrials@latestOr grab a prebuilt binary from the releases, or run the container image:
docker run --rm ghcr.io/tamnd/clinicaltrials:latest --help# Search by condition
clinicaltrials search --condition cancer --status RECRUITING
# Search by intervention
clinicaltrials search --intervention insulin --limit 5
# Search by free-text term
clinicaltrials search --term "phase 3 diabetes"
# Get full study details by NCT ID
clinicaltrials study NCT05608876
# Output as JSON
clinicaltrials search --condition cancer -o json
# Output as CSV
clinicaltrials search --condition cancer -o csv-o table (default on TTY), -o jsonl (default piped), -o json, -o csv, -o tsv, -o url
cmd/clinicaltrials/ thin main, wires cli.NewApp into kit.Main
cli/ kit app wiring: identity, defaults, domain registration
clinicaltrials/ the library: HTTP client, data models, kit Domain
docs/ tago documentation site
make build # ./bin/clinicaltrials
make test # go test ./...
make vet # go vet ./...Push a version tag and GitHub Actions runs GoReleaser, which builds the archives, Linux packages, the multi-arch GHCR image, checksums, SBOMs, and a cosign signature:
git tag v0.1.0
git push --tagsApache-2.0. See LICENSE.