| Crates.io | colonizer |
| lib.rs | colonizer |
| version | 0.1.0 |
| created_at | 2025-09-13 20:12:12.606533+00 |
| updated_at | 2025-09-13 20:12:12.606533+00 |
| description | Catalogue of Life (ChecklistBank) client + CLI: search usages, browse tree, vernacular names, and an Inspire mode for crate-name ideas (with Wikipedia summaries). |
| homepage | https://github.com/oolonek/colonizer |
| repository | https://github.com/oolonek/colonizer |
| max_upload_size | |
| id | 1838093 |
| size | 109,972 |
Rust crate and CLI to work with the Catalogue of Life (CoL) via the ChecklistBank API.
Features
Install
cargo install colonizercargo build --releaseCLI Usage
colonizer latest — print latest CoL dataset key.colonizer id "Homo sapiens" — print CoL ID for the name.colonizer list-rank GENUS --max 100 — list genera (ID, label, rank).colonizer roots — list tree roots (e.g., domains).colonizer children Homo --rank GENUS — list children of a taxon by name (or --by-id 636X2).colonizer classify "Homo sapiens" --rank SPECIES — show classification chain.colonizer suggest "homo sa" --limit 10 — quick suggestions.colonizer vernacular "Homo sapiens" --rank SPECIES — common names.colonizer inspire --lang fra [--one-word] — print a random hyphenized vernacular, taxonID, scientificName, and a CoL link. Adds a short Wikipedia summary and links when available.--dataset <key> — operate on a specific dataset instead of the latest CoL release.--json — return JSON instead of TSV.Inspire (random vernacular names)
colonizer inspire --lang fra
scalaire 6FXL3 Epitonium clathrus https://www.catalogueoflife.org/data/taxon/6FXL3[fr wiki] Epitonium clathrus, le scalaire, est une espèce ...https://fr.wikipedia.org/wiki/Epitonium_clathrushttps://www.wikidata.org/wiki/Q1995213colonizer --json inspire --lang eng --one-word
{ "lang": "eng", "vernacularName": "bogue", "vernacularHyphenized": "bogue", "taxonID": "MHY3", "scientificName": "Boops boops", "link": "https://www.catalogueoflife.org/data/taxon/MHY3", "oneWord": true, "wikipediaLang": "en", "wikipediaSummary": "Boops boops, commonly called the boce, ...", "wikipediaUrl": "https://en.wikipedia.org/wiki/Boops_boops", "wikidataUrl": "https://www.wikidata.org/wiki/Q950498" }--lang <iso-639-2>: vernacular language (e.g., fra, eng, spa). Defaults to fra.--one-word: only return vernaculars that are a single token (no spaces). Useful for short crate names; retries internally if needed.taxonID is not a valid ChecklistBank usage id. The command validates IDs and retries when needed.Downloading the full CoL
Easiest and fastest: use the static downloads hosted by ChecklistBank.
curl -L -o col_latest_dwca.zip https://download.checklistbank.org/col/latest_dwca.zipcurl -L -o col_latest_coldp.zip https://download.checklistbank.org/col/latest_coldp.zipcurl -L -o col_latest_txtree.zip https://download.checklistbank.org/col/latest_txtree.zipcurl -L -o col_2025-08-20_dwca.zip https://download.checklistbank.org/col/monthly/2025-08-20_dwca.zipFrom the CLI:
colonizer download dwca --latestcolonizer download coldpcolonizer download txtree --date 2025-08-20When to use the API export:
/dataset/{key}/export) and then GET /export/{id} to fetch the file. The CLI may add this as an advanced option.Library Usage
use colonizer::ColClient;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let col = ColClient::from_latest()?;
let id = col.id_for_name("Homo sapiens", None)?;
println!("id: {:?}", id);
let genera = col.list_by_rank("GENUS", Some(100))?;
println!("{} genera fetched", genera.len());
Ok(())
}
Notes
Listing by rank across all taxa can be extremely large (e.g., species). Use --max to cap results.
The crate targets https://api.checklistbank.org, which powers the Catalogue of Life.
When using name-based targets for commands like children, classify, and vernacular, add --rank to disambiguate homonyms (e.g., GENUS, SPECIES). Use --by-id to pass a usage ID directly.