Metadata-Version: 2.4
Name: fieldnotes-farm
Version: 0.2.0
Summary: Read a farm field from the photos of a walk with AI (SAM 3.1 segments; any OpenAI-compatible chat model reads), keep plain-text records the farmer marks right or wrong, and serve them to any MCP client.
Author: Yasuhiro Niji
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://github.com/aiseed-dev/fieldnotes
Project-URL: Source, https://github.com/aiseed-dev/fieldnotes
Project-URL: Issues, https://github.com/aiseed-dev/fieldnotes/issues
Keywords: natural farming,agriculture,field records,SAM,Muse Spark,MCP,abandoned farmland
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: End Users/Desktop
Classifier: Natural Language :: English
Classifier: Natural Language :: Japanese
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=3
Requires-Dist: meta-sam-parser>=0.1
Requires-Dist: pillow
Requires-Dist: numpy
Requires-Dist: pyyaml
Requires-Dist: pillow-heif
Requires-Dist: httpx
Requires-Dist: mcp>=2.3
Provides-Extra: app
Requires-Dist: flet[all]==1.0.5; extra == "app"
Provides-Extra: voice
Requires-Dist: av; extra == "voice"
Provides-Extra: all
Requires-Dist: fieldnotes-farm[app,voice]; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: fieldnotes-farm[app,voice]; extra == "dev"
Dynamic: license-file

# fieldnotes-farm

A phone app, a command line, records and an MCP server for reading a farm field from the photos of a walk with AI. The app is the main way to use it; the command and the import are `fieldnotes`.

What does the work:

- Segmenting each photo (crops, weeds, bare soil → cover): SAM 3.1 on the Meta Model API.
- Reading the walk as one field, checking hypotheses, sorting what you said: any OpenAI-compatible chat model. Default Muse Spark on the Meta Model API; or a server in your house (llama.cpp, Ollama, …) with `fieldnotes reader glimmer --url http://<host>/v1 --model <name>`.
- Writing down your voice recordings: Meta's transcription API.
- Using the records: any MCP client (Claude Code, Claude Desktop, Muse Code, …) through `fieldnotes mcp`.

## Requirements

- Python 3.11 or later
- A Meta Model API key (dev.meta.ai → API keys) for SAM, the voice and, unless the reader is at home, Muse Spark; in `MODEL_API_KEY` or in `~/.config/fieldnotes/model_api_key`
- Internet access for the models (unless the reader is at home), the weather and the land data; the records are written to a folder on your PC

## Install

```bash
pip install fieldnotes-farm                  # command line, records, MCP server
pip install "fieldnotes-farm[app,voice]"     # plus the phone app (Flet) and m4a/aac voice recordings (PyAV)
```

## Use

```bash
fieldnotes --root ~/farm/myfield init --place "<town, region, country>" --country <ISO code> --lat <lat> --lon <lon>
fieldnotes --root ~/farm/myfield lookup                       # public land data → records/lookup.md (Japan in detail, world maps elsewhere)
fieldnotes --root ~/farm/myfield observe <field> <date>       # photos/<field>/<date>/*.jpg → records/<field>/<date>.md + overlays
fieldnotes --root ~/farm/myfield show <field>                 # the latest record
fieldnotes --root ~/farm/myfield mark <field> <date> dominant wrong "clover, not vetch"
fieldnotes --root ~/farm/myfield voice <field> memo.m4a <date>    # what you said in the field → work / seen / marks
fieldnotes --root ~/farm/myfield propose <field> --cut        # where to cut first and how high → records/_proposals/
fieldnotes --root ~/farm/myfield timeline <field>             # every day's lines in order
fieldnotes --root ~/farm/myfield reader glimmer --url http://<host>:<port>/v1 --model <name> --check   # read with a server at home
fieldnotes --root ~/farm/myfield app                          # the phone app on the home network (port 8550)
fieldnotes --root ~/farm/myfield mcp                          # stdio MCP server; --http for an AI on another machine
```

`--root` is the folder that holds `photos/` and `records/` (default: `$FIELDNOTES_ROOT`, else the current folder). Photos go in `photos/<field>/<date>/`; the app files them from the phone. Every record is Markdown with YAML front matter; the format is in `docs/records.md`, so any program or AI can read a farm folder. This package is the code that runs and nothing else; the sample farm, the record format, the manuals and the design notes are on GitHub (links below).

## Links

- Manual: https://github.com/aiseed-dev/fieldnotes/blob/main/docs/manual.md (日本語: https://github.com/aiseed-dev/fieldnotes/blob/main/docs/manual.ja.md)
- Record format: https://github.com/aiseed-dev/fieldnotes/blob/main/docs/records.md
- Source, issues: https://github.com/aiseed-dev/fieldnotes

Licence: AGPL-3.0-or-later.
