@smartplant/diary
v3.0.5
Published
The plant writes its own dated journal, grounded in real readings and care events.
Downloads
531
Maintainers
Readme
📔 @smartplant/diary
The plant writes its own dated journal, grounded in real readings and care events.
A plugin for smartplant — a bridge between AI and plants.
Install
npm install smartplant @smartplant/diaryUse
import { createPlant } from 'smartplant'
import diary from '@smartplant/diary'
const plant = await createPlant( {
name : 'Ivy',
species : 'Monstera deliciosa',
sensor : 'mock', // no hardware needed
ai : { provider : 'ollama' }, // or gemini / openai / claude / grok
} )
await plant.use( diary )
await plant.read()
const result = await plant.plugin( 'diary' ).logAndSummarize( { hours : 24 } )
console.log( result.advice, result.emoji )API
logAndSummarize( input? )
Returns { entry, mood, emoji }.
input is optional; anything you pass is handed to the AI as extra context alongside the plant's readings, trends and care history.
If the AI is unreachable or unconfigured, the call returns the deterministic offline result rather than throwing.
Entries are stored in the plant's memory
plant.plugin( 'diary' ).entries( 10 ) // the last ten entries, newest firstWritten in the plant persona, in first person, from what actually happened — not from a generic template.
Test
npm testRuns against the mock sensor and mock AI provider — no hardware, no API key, no network.
📜 License
MIT — see LICENSE.

