# @cropgraph/core

> CropGraph core library: curated crop calendar (5,006 entries across 14 categories with 120 climate-modified crops across 6 climate types), 1,004 companion planting relationships, 12 rotation families, 102 succession planting chains, 802 pest/disease assoc

Latest version **3.5.0** (published 2026-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @cropgraph/core
pnpm add @cropgraph/core
yarn add @cropgraph/core
bun add @cropgraph/core
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; large bundle.

## Facts

| | |
|---|---|
| Version | 3.5.0 |
| Published | 2026-09-23 |
| First published | 2026-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 1 |
| Unpacked size | 20.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Andrew Christison |
| Maintainers | andrewchristison |
| Keywords | cropgraph, agriculture, planting-calendar, companion-planting, succession-planting, pest-management, ipm, growing-degree-days, gdd, harvest-prediction, usda-zones, hardiness-zone, climate, garden, crops, permaculture, frost-dates, zod, typescript |

## Links

- npm: https://www.npmjs.com/package/@cropgraph/core
- Repository: https://github.com/Cropgraph/cropgraph
- Homepage: https://github.com/Cropgraph/cropgraph/tree/main/packages/core
- Issues: https://github.com/Cropgraph/cropgraph/issues
- npm.io page: https://npm.io/package/@cropgraph/core

## Dependencies (1)

- [zod](https://npm.io/package/zod.md) ^3.23.8

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 3.5.0 (latest) — 2026-09-23
- 3.4.0 — 2026-05-17
- 3.3.0 — 2026-05-17
- 3.2.0 — 2026-05-14
- 3.1.0 — 2026-05-14
- 3.0.0 — 2026-05-14
- 2.1.0 — 2026-05-13
- 2.0.0 — 2026-05-13
- 1.5.0 — 2026-05-13
- 1.4.0 — 2026-05-13
- 1.2.0 — 2026-05-13
- 1.1.0 — 2026-05-13
- 1.0.0 — 2026-05-13

## README

# CropGraph

Commercial agricultural intelligence. Curated data, MCP server, and CLI for
crop calendars, companion planting, crop rotation, succession planting, pest
and disease management, USDA hardiness zones, and climate classification.

- **Website:** https://cropgraph.com
- **API:** https://api.cropgraph.com (see [cropgraph-api](https://github.com/Cropgraph/cropgraph-api))

## Packages

| Package | What |
|---------|------|
| [`@cropgraph/core`](./packages/core) | Crop calendar (5,006 entries across 14 categories), 1,004 companion relationships, rotation families, succession chains, pest/disease associations, 200 beneficial insects across 5 categories with composite pest intelligence, 120 growing degree day models, USDA zones, climate types. Pure TypeScript, offline. |
| [`@cropgraph/mcp`](./packages/mcp) | Model Context Protocol server (stdio). Eighteen garden-planning tools for AI agents. |
| [`cropgraph`](./packages/cli) | Command-line interface. Subcommands for zones, planting, crop lookup, companions, rotation, succession, pests, pest-detail, pest-intel, beneficials. |

## Quick start

### MCP server (Claude Desktop, Cursor, etc.)

```sh
npx @cropgraph/mcp
```

See [`packages/mcp/README.md`](./packages/mcp/README.md) for client config.

### CLI

```sh
npx cropgraph zone --lat 48.118 --lng -123.43
npx cropgraph companions tomato
npx cropgraph planting --zone 8b --climate maritime
npx cropgraph succession lettuce --zone 8b --climate maritime
npx cropgraph pests tomato
npx cropgraph pest-intel tomato-hornworm --plant tomato
npx cropgraph beneficial seven-spotted-ladybug
```

### Library

```sh
npm install @cropgraph/core
```

```ts
import {
  getHardinessZone,
  getCompanions,
  getPlantingPlan,
  getSuccessionPlan,
} from "@cropgraph/core";

getHardinessZone(48.118, -123.43);   // "8b"
getCompanions("tomato");             // 18 entries
getPlantingPlan({ zone: "8b", climateType: "maritime" });
getSuccessionPlan({ slug: "lettuce-leaf", zone, climateType: "maritime" });
```

## Data

| Asset | Count | Notes |
|-------|-------|-------|
| Crop calendar | 5,006 entries | 14 categories (vegetable, herb, fruit, flower, cover-crop, root, legume, grain, mushroom, native, medicinal, fiber, forage, sprout). Frost-anchored windows; 120 entries carry climate modifiers across 6 climate types |
| Companion relationships | 1,004 | 510 beneficial, 95 antagonist, 12 mechanism categories |
| Growing degree days | 120 models | Cultivar-specific GDD ranges, base temperatures, NOAA Climate Normals harvest prediction |
| Rotation families | 12 | Nightshades, brassicas, cucurbits, alliums, legumes, umbellifers, grasses, amaranthaceae, composites, mints, malvaceae, miscellaneous. Every calendar slug mapped. |
| Succession chains | 33 | Greens, roots, legumes, brassicas, cucurbits, herbs, flowers, cover crops. Frost-anchored phases with per-climate notes. |
| Pest/disease associations | 506 | Crop-to-pest edges with diagnostic symptoms, organic management, prevention, and regions. OMRI-listed management only. |
| Beneficial insects | 200 entries | Predators (62), parasitoids (40), pollinators (50), decomposers (29), microbial controls (22). Prey and attractant cross-references; composite "now what?" intelligence layer with hand-authored notes for the top 40 pest slugs. |
| USDA hardiness zones | 40,283 ZIPs | PRISM 2023 + waldoj/frostline centroids, offline lookup |
| Climate classifier | 6 types | Maritime, mediterranean, continental, humid subtropical, arid, semi-arid |

Sources cited per-entry in the JSON fixtures under
[`packages/core/src/data`](./packages/core/src/data).

## License

MIT. Copyright (c) 2026 Andrew Christison.

---
_Source: https://npm.io/package/@cropgraph/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
