Metadata-Version: 2.4
Name: fern-memory
Version: 0.2.2
Summary: Local long-memory MCP server for coding agents, powered by the Fern-LS1 model
License: Apache-2.0
Project-URL: Homepage, https://www.coelfern.com
Project-URL: Model, https://huggingface.co/BunkerOfficial/Fern-LS1
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.3
Requires-Dist: transformers>=4.48
Requires-Dist: huggingface_hub>=0.24
Requires-Dist: safetensors>=0.4
Requires-Dist: mcp>=2.0
Requires-Dist: pypdf>=5.0
Requires-Dist: numpy
Dynamic: license-file

# Fern

Fern is a local long-memory MCP server for coding agents. It indexes your project, your
docs, and your past agent sessions, and verifies answers on your own GPU using the all-in-one
[Fern-LS1](https://huggingface.co/BunkerOfficial/Fern-LS1) looped System-1 model.

Setup guide for each harness: [coelfern.com](https://www.coelfern.com)

## Install

```bash
uv tool install fern-memory --torch-backend=auto
```

Requires Python 3.11+. Runs on CUDA, MPS, or CPU and uses **~1.6 GB VRAM** with the default
all-in-one Cached-KV + 4-bit RotorQuant + Loop-0 Semantic Head FP8 checkpoint
(`Fern-LS1-CachedKV-FP8.safetensors`, ~1.5 GB download on first use — zero second embedder
required). Set `FERN_CKPT` to use a local checkpoint or `FERN_HF_FILE=Fern-LS1.pt` for BF16.

## Connect a harness

```bash
fern install claude    # or: cursor, codex, pi, generic
fern sync-sessions     # auto-link Claude Code, Codex, and Pi session logs into ~/.fern/sessions
```

All open harnesses share one local GPU daemon, which unloads after 15 minutes idle.

## Commands

| Command | What it does |
|---|---|
| `/fern <question>` | Ask in chat. Your agent also calls Fern on its own. |
| `fern ask "<question>"` | Ask from the terminal. |
| `fern check [--staged]` | Decision Guard: check your git diff against past project decisions & sessions. |
| `fern sync-sessions` | Auto-discover and link Claude Code, Codex, Pi, and OpenCode sessions. |
| `fern watch` | Watch project files and keep the encode-once SQLite & vector cache continuously hot. |
| `fern link <path>` | Add a folder, repo, or paper library to memory. |
| `fern status` | Show what is indexed. |
| `fern daemon unload` | Free the GPU now instead of waiting for the idle timer. |

## License

Apache-2.0. Fern-LS1 is trained from [ByteDance/Ouro-1.4B](https://huggingface.co/ByteDance/Ouro-1.4B).
