
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@pondlog/source-trefle
Advanced tools
Trefle.io plant database API client: typed, Zod-validated, rate-limited. Returns Result<T> instead of throwing. Supplies taxonomy, scientific names, and growth metadata to pondlog's garden-planning surface (the planting calendar lives in @pondlog/core).
Typed, Zod-validated, rate-limited TypeScript client for the
Trefle.io plant database API. All functions return
Result<T>, never throw.
Part of pondlog.
Trefle is the taxonomy layer of pondlog's garden surface. It supplies:
It does not supply planting timing. Trefle's growth.days_to_harvest,
growth.sowing, and growth.minimum_temperature fields are universally
null for cultivated vegetables (verified live in May 2026). The 1000-crop
planting calendar in @pondlog/core covers planning logic.
pnpm add @pondlog/source-trefle
import { searchPlants, getGrowingGuide, hasTrefleToken } from "@pondlog/source-trefle";
// Required: TREFLE_API_TOKEN env var.
// Free token at https://trefle.io/users/sign_up
const r = await searchPlants({ commonNameExact: "tomato" });
if (r.ok) {
console.log(r.data.plants.map((p) => p.scientific_name));
}
const guide = await getGrowingGuide("solanum-lycopersicum");
if (guide.ok) {
console.log(guide.data.light, guide.data.phMin, guide.data.phMax);
}
if (!hasTrefleToken()) {
// Aggregate paths can silently skip Trefle when no token is set.
}
| Function | Purpose |
|---|---|
searchPlants(params) | Search by common name, family, genus, or free-text |
getPlant(slugOrId) | Full detail for a single plant |
searchSpecies(params) | Like searchPlants but at the species level |
getGrowingGuide(slugOrId) | Flat gardener-friendly summary of available growth fields |
hasTrefleToken() | Boolean: is TREFLE_API_TOKEN set? |
Trefle is in beta. The q= full-text search matches noisily across author
and bibliography fields. Prefer commonNameExact for precision. Trefle
search endpoints have returned 5xx errors on its public issue tracker
(2025); this client retries transient 5xx with backoff.
MIT.
FAQs
Trefle.io plant database API client: typed, Zod-validated, rate-limited. Returns Result<T> instead of throwing. Supplies taxonomy, scientific names, and growth metadata to pondlog's garden-planning surface (the planting calendar lives in @pondlog/core).
The npm package @pondlog/source-trefle receives a total of 25 weekly downloads. As such, @pondlog/source-trefle popularity was classified as not popular.
We found that @pondlog/source-trefle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.