PHPackages                             vkollin/trefle-php-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. vkollin/trefle-php-client

ActiveLibrary[API Development](/categories/api)

vkollin/trefle-php-client
=========================

Trefle API client

v0.1.0(3y ago)1231MITPHPPHP &gt;=8.1CI failing

Since Apr 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vkollin/trefle.io-php)[ Packagist](https://packagist.org/packages/vkollin/trefle-php-client)[ RSS](/packages/vkollin-trefle-php-client/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Trefle.io PHP client
====================

[](#trefleio-php-client)

This is a client for trefle.io.

Installation
------------

[](#installation)

```
composer require vkollin/trefle-php-client
```

Usage
-----

[](#usage)

```
$trefleClient = TrefleClient::create('your-token');

// get a specific species
$sunflowerSpecies = $trefleClient->getSpecies('helianthus-annuus')->getSpecies();

// get a specific plant
$sunflowerPlant = $trefleClient->getPlant('helianthus-annuus')->getPlant();

// search for species matching a query
$searchRequest = (new SearchRequest())->setQuery('oak')->setLimit(5);

$searchResults = $trefleClient->searchSpecies($searchRequest)->getSpecies();
```

Implemented endpoints
---------------------

[](#implemented-endpoints)

### Species

[](#species)

- [List species](https://docs.trefle.io/reference#tag/Species/operation/listSpecies)
- [Retrieve a species](https://docs.trefle.io/reference#tag/Species/operation/getSpecies)
- [Search for species](https://docs.trefle.io/reference#tag/Species/operation/searchSpecies) *(only query parameters and limit is implemented at the moment, but no filters)*
- [Report an error](https://docs.trefle.io/reference#tag/Species/operation/reportSpecies)

### Plants

[](#plants)

- [List plants](https://docs.trefle.io/reference#tag/Plants/operation/listPlants)
- [Retrieve a plant](https://docs.trefle.io/reference#tag/Plants/operation/getPlant)
- [Search for a plant](https://docs.trefle.io/reference#tag/Plants/operation/searchPlants)
- [Report an error](https://docs.trefle.io/reference#tag/Plants/operation/reportPlants)
- [List plants in a distribution zone](https://docs.trefle.io/reference#tag/Plants/operation/listPlantsZone)
- [List plants of a genus](https://docs.trefle.io/reference#tag/Plants/operation/listPlantsGenus)

### Genus

[](#genus)

- [Search genus](https://docs.trefle.io/reference#tag/Genus/operation/listGenus)
- [Retrieve a genus](https://docs.trefle.io/reference#tag/Genus/operation/getGenus)

### Families

[](#families)

- [Search families](https://docs.trefle.io/reference#tag/Families/operation/listFamilies)
- [Retrieve a family](https://docs.trefle.io/reference#tag/Families/operation/getFamily)

### DivisionOrders

[](#divisionorders)

- [Search division orders](https://docs.trefle.io/reference#tag/DivisionOrders/operation/listDivisionOrders)
- [Retrieve a division order](https://docs.trefle.io/reference#tag/DivisionOrders/operation/getDivisionOrder)

### DivisionClasses

[](#divisionclasses)

- [Search division classes](https://docs.trefle.io/reference#tag/DivisionClasses/operation/listDivisionClasses)
- [Retrieve a division class](https://docs.trefle.io/reference#tag/DivisionClasses/operation/getDivisionClass)

### Divisions

[](#divisions)

- [Search divisions](https://docs.trefle.io/reference#tag/Divisions/operation/listDivisions)
- [Retrieve a division](https://docs.trefle.io/reference#tag/Divisions/operation/getDivision)

### Subkingdoms

[](#subkingdoms)

- [Search subkingdoms](https://docs.trefle.io/reference#tag/Subkingdoms/operation/listSubkingdoms)
- [Retrieve a subkingdom](https://docs.trefle.io/reference#tag/Subkingdoms/operation/getSubkingdom)

### Kingdoms

[](#kingdoms)

- [Search kingdoms](https://docs.trefle.io/reference#tag/Kingdoms/operation/listKingdoms)
- [Retrieve a kingdom](https://docs.trefle.io/reference#tag/Kingdoms/operation/getKingdom)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b623099807ea29e486c2934237b1e45019e629bad0add08767cd8d0be2592a8a?d=identicon)[vinkol](/maintainers/vinkol)

---

Top Contributors

[![vkollin](https://avatars.githubusercontent.com/u/5981580?v=4)](https://github.com/vkollin "vkollin (10 commits)")

---

Tags

phpapiclienttrefle

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vkollin-trefle-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/vkollin-trefle-php-client/health.svg)](https://phpackages.com/packages/vkollin-trefle-php-client)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74331.3k1](/packages/mozex-anthropic-laravel)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
